Take a moment to skim through the Bootdisk-HOWTO or the From-PowerUp-to-BASH-Prompt-HOWTO. These HOWTO documents can be found online at http://www.tldp.org/docs.html#howto. Both documents offer an excellent view of what it takes to get a GNU/Linux system up and running. There is also a lot of information to digest. Remember that one of our goals is, "keep it simple to avoid stressing out," so we want to ignore everything but the absolutely critical pieces of a boot / root diskset.
Basically it boils down to the following required items:
A boot loader
The Linux kernel
A shell
Some /dev files
We don't even need an init daemon. The kernel can be told to run the shell directly by passing it an option through the boot loader.
For easy construction we will build a two-disk boot / root set rather than trying to get everything onto a single diskette. The boot loader and kernel will go on the boot disk and the shell will reside on the root disk. Both disks will need device files to function properly.
For the boot disk we'll want to use a kernel that does not require modules for the hardware we need to access. Mainly, it should have compiled-in support for the floppy drive, ram disk, second extended filesystem and a text-based console. If such a kernel is not available, it will need to be built from source code using the Kernel-HOWTO as a guide. Once the kernel is ready we can copy it to a diskette that has been prepared with a filesystem (a.k.a. formatted). The diskette will need a few /dev files and a lilo.conf file in order to get LILO installed. The Bootdisk-HOWTO and the lilo.conf(5) manpage will be helpful in designing the lilo.conf file.
It is also possible to build a boot disk using GRUB instead of LILO. For more information, visit the resource site and look under "related projects" for Rick Stocker's instructions on using GRUB. |
For the root disk we will need a floppy that has been prepared with a filesystem. We will also need a BASH shell that is statically-linked so we can avoid the additional complexities of shared libraries. The configure program in the BASH source code recognizes the --enable-static-link option for this feature. We will also be using the --enable-minimal-config option to keep the BASH binary down to a manageable size. Additional requirements for the root disk are a /dev directory and a device file for the console. The console device is required for BASH to be able to communicate with the keyboard and video display.
There is one other, less obvious requirement to keep in mind and that is CPU compatibility. Each generation of CPU features a more complex architecture than its predecessor. Late generation chips have additional registers and instructions when compared to an older 486 or 386. So a kernel optimized for a new, fast 6x86 machine will not run on an older boxes. (See the README file in the Linux kernel source code for details.) A BASH shell built for a 6x86 will probably not run on an older processor either. To avoid this problem, we can choose the 386 as a lowest common denominator CPU and build all the code for that architecture.