To boot from this new root device all that is required is that the floppy disk prepared as described above is inserted for the PC to boot from.
You will see the following sequence of events.
/linuxrc file on the initial ramdisk is run
When this is complete you can remove the boot floppy and use the Linux system.
There are a number of stages where this process could fail, I will try to explain what they are and what to check.
DOS booting is easy to recognise by the message that it prints
MS-DOS Starting ... on the screen. If this is not
seen then the floopy disk is either not-bootable or the PC is not
bootable from the floppy disk drive.
When the AUTOEXEC.BAT file is run the commands in it
should be echoed to the screen by default. In this case there is
just the single line in the file that starts
LOADLIN.
When LOADLIN executes it will do two very visible
things, firstly it will load the kernel into memory, secondly it
will copy the ramdisk into memory. Both of these are indicated by
a Loading... message.
The kernel starts by uncompressing itself, this can give crc errors if the kernel image is corrupted. Then it will start running the initialisation sequence which is very verbose with diagnostic messages. Loading of the initial ramdisk device is also visible during this phase.
When the /linuxrc file is run there is no diagnostic
messages, but you can add these yourself as an aid to debugging.
If this stage fails to set up the loopback device as the root
device then you may see a message that there is no root device
and the kernel aborts.
The normal boot sequence of the new root device will now continue
and this is quite verbose. There may be problems about the root
device being mounted read-write, but the LOADLIN
command line option 'ro' should stop that. Other
problems that can occur are that the boot sequence is confused
about where the root device is, this is probably due to a problem
with /etc/fstab.
When the boot sequence has completed, the remaining problem is that programs are confused about whether the DOS partition is mounted or not. This is why it is a good idea to use the fake mount command described earlier. This makes life a lot easier if you want to access the files on the DOS device.
The documents that I used to create my first loopback root filesystem were:
init/main.c
Documentation/initrd.txt and
Documentation/ramdisk.txt.
LILO documentation.
LOADLIN documentation