next up previous contents
Next: And Further Up: Getting Linux into Small Previous: Making a Bootable Diskette   Contents

Using the Boot Disks

First boot Linux by putting the appropriate Linux diskette into the floppy drive.

As soon as the root file system is mounted, you should see a message from Busybox. A few seconds later you are invited to press enter. After you press enter, you get a root shell prompt, which should be very familiar. With the function keys ALT-F1, ALT-F2, ALT-F3 and ALT-F4 you can switch to four virtual terminals and you should be able to get a shell prompt on all four of them.

WARNING: If your root file system is on a floppy disk (you are not using a RAM disk), do not remove this diskette from the drive when Linux is running. If you use a RAM disk or if you moved all of your root file system to the hard disk and booted with the option root=/dev/hd??, then it is OK to remove the diskette as soon as Linux has started.

Type the reboot command in order to shut the system down. If you are using a root file system on a diskette, you should wait until the PC has rebooted before removing the diskette.

What we can do is installing the linux root file system on the hard disk. First we have to (re)partition the hard disk. Type the following command:

fdisk /dev/hda
While inside fdisk use the p command to show the current partition table. Maybe you find an old DOS partition that you still want to backup. If so, quit fdisk now using the q command. If you can part with that old DOS partition, you can delete partitions with the d command and create new partitions with the n command. Finally you can write the modified partition table with the w command. Using fdisk you should be able to create the following partitions:

After partitioning the hard disk, create a swap partition with the mkswap command, create an ext2 file system and copy all data to it. Type the following commands. Of course we assume that the Linux partition is /dev/hda1 and the swap partition is /dev/hda2. Otherwise you must supply appropriate device names.

mkswap /dev/hda2
swapon /dev/hda2
mke2fs /dev/hda1
mount /dev/hda1 /mnt
mkdir /mnt/proc /mnt/mnt
cp -a /bin /sbin /usr /etc /lib /dev /tmp  /mnt

Edit the file /mnt/etc/init.d/rcS. If you haven't learned vi by now, tough luck.

#!/bin/sh
mount -a
swapon -a

Edit the file /mnt/etc/fstab as follows:

/dev/hda1 /     ext2 defaults 0 0
none      /proc proc defaults 0 0
/dev/hda2 swap  swap defaults 0 0

Now we can shut the system down.

umouunt /dev/hda1
reboot

Reboot the system with the boot diskette in the drive.

As soon as you see the word LILO, press the SHIFT key. Now you see a boot prompt. If you use a boot diskette without a RAM disk, type:

linux root=/dev/hda1

If you use a boot diskette with a RAM disk, type this at the boot prompt:

noram root=/dev/hda1

If you have a boot diskette without LILO, you have to go to the host system and change the root device using the rdev command:

rdev /dev/fd0 /dev/hda1
After this, reboot the target system with the modified diskette.

In any case, your system should now mount the root file system on your hard disk and your floppy drive will be free to mount other diskettes, so you can copy more files to the hard disk.


next up previous contents
Next: And Further Up: Getting Linux into Small Previous: Making a Bootable Diskette   Contents
Lennart Benschop 2003-05-29