First boot Linux by putting the appropriate Linux diskette into the floppy drive.
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/hdaWhile 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:
If you use a boot diskette with a RAM disk, type this at the boot prompt:
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/hda1After 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.