home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # remove /etc/mtab* so mount creates the /etc/mtab file
- /bin/rm -f /etc/mtab* /etc/nologin /etc/utmp
- echo -n "" >> /etc/utmp
-
- # You may wish to clip this one down as well
- #/bin/mv -f /etc/wtmp /etc/wtmp.old
- #touch /etc/wtmp
- echo -n "" >> /etc/utmp
-
- # should check fs before mounting
- #e2fsck -av /dev/sda2
-
- /bin/mount -av -t nonfs
- /bin/swapon -a
-
- /bin/rm -f /usr/spool/uucp/LCK*
- /bin/rm -f /auto/run/*
-
- /bin/hostname -S slackware
- HOSTNAME=slackware
- # Attach the loopback device.
- /etc/ifconfig lo 127.0.0.1
- /etc/route add 127.0.0.1
- # Constants.
- NET="/usr/etc"
- IN_SERV="syslogd klogd"
- LPSPOOL="/var/spool/lpd"
-
- # At this point, we are ready to talk to The World...
- echo "Mounting remote file systems..."
- /etc/mount -a -t nfs # This may be our /usr runtime!!!
-
- # Start the INET SuperServer
- if [ -f ${NET}/inetd ]
- then
- echo -n "inetd "
- ${NET}/inetd
- else
- echo "no INETD found. INET cancelled!"
- exit 1
- fi
-
- echo
-
- if [ -x /etc/syslogd ]; then
- syslogd # turn on logging of su's, logins etc.
- fi
-
- if [ -x /etc/syslogk ]; then
- syslogk on > /usr/log/kernel& # log all kernel messages.
- fi
-
- #/bin/syslogk on 1> /dev/null 2> /dev/null
- /bin/mount /proc /proc -t proc 1> /dev/null 2> /dev/null
-
- echo > /etc/motd
- echo "`/bin/uname -a | /bin/cut -d\ -f1,3`. (Posix)." >> /etc/motd
- echo >> /etc/motd
- echo "If you're upgrading an existing Slackware system, you might want to" >> /etc/motd
- echo "remove old packages before you run 'setup' to install the new ones. If" >> /etc/motd
- echo "you don't, your system will still work but there might be some old files" >> /etc/motd
- echo "left laying around on your drive." >> /etc/motd
- echo >> /etc/motd
- echo "Just mount your Linux partitions under /mnt and type 'pkgtool'. If you" >> /etc/motd
- echo "don't know how to mount your partitions, type 'pkgtool' and it will tell" >> /etc/motd
- echo "you how it's done." >> /etc/motd
- echo >> /etc/motd
- echo "To start the main installation, type 'setup'." >> /etc/motd
- echo >> /etc/motd
-
- #Scan for potential swap space:
- echo
- echo "Slackware Linux UMSDOS install disk v. 2.1.0."
- echo
- echo "Hello, and welcome to Linux. Unless have more than 4 megabytes of RAM,"
- echo "you'll need a swap file to install. This should be created on the DOS"
- echo "partition that you plan to install on."
- echo
- echo " Device Boot Begin Start End Blocks Id System"
- fdisk -l > /tmp/dosp
- fgrep DOS /tmp/dosp
- rm -f /tmp/dosp
- echo
- echo -n "Use which device (such as /dev/hda1, or ENTER to skip)? "
- read ROOT_DEV;
- if [ ! "$ROOT_DEV" = "" ]; then
- if [ -r $ROOT_DEV ]; then
- echo $ROOT_DEV > /tmp/used4swap # this will be good to know later
- echo
- echo "Mounting device $ROOT_DEV under /mnt:"
- mount $ROOT_DEV /mnt -t umsdos
- echo "Making directory /mnt/linux/dev:"
- mkdir -p /mnt/linux/dev
- echo
- echo "What size swap file would you like to create?"
- echo
- echo "To give you an idea, you will specify a number such as 4096 if you want"
- echo "to use 4 megabytes of your DOS partition for a swap file. Assuming you"
- echo "have 4 megabytes of RAM, you will need a swap file of size 2048 to install"
- echo "the system and try a few things out. If you're planning to run X, you'll"
- echo "probably want to use a larger swapfile (around 8192 or so)."
- echo
- echo -n "Enter swap file size: "
- read SIZE;
- if [ "$SIZE" = "0" -o "$SIZE" = "" ]; then
- echo "size is 0!"
- echo
- echo "ABORTING! Please reboot now."
- echo
- sleep 20000
- fi
- echo
- echo "Creating a ${SIZE}K swapfile in your /dev directory:"
- dd if=/dev/zero of=/mnt/linux/dev/swapfile ibs=1024 count=$SIZE
- if [ ! $? = 0 ]; then
- echo
- echo "Whoooops. I think there was an error there. It's possible if it"
- echo "was an 'out of space' error that your partition wasn't mounted"
- echo "properly in the first place. You'll probably have to reboot and"
- echo "try again, but you might want to log in anyway and type 'mount'"
- echo "to see if the partition shows up. If it does, you probably did"
- echo "just run out of space."
- echo
- echo "In just a moment, I'm going to continue onward and you may see a"
- echo "whole bunch of errors."
- echo
- echo "Try not to look."
- echo
- sleep 50
- fi
- echo "Running mkswap on the new swapfile:"
- mkswap /mnt/linux/dev/swapfile $SIZE
- echo "Activating swap partition:"
- swapon /mnt/linux/dev/swapfile
- echo
- echo "Memory status:"
- /bin/free
- echo
- echo "You should see your swapspace indicated on the table above."
- echo
- echo "Now just go ahead and log in, run the 'setup' program and give it"
- echo "the same partition that you used here for your swap space."
- echo
- echo -n "Press ENTER to continue."
- read junk;
- echo
- fi
- fi
-