In this section, we will be building the actual boot disk and root disk floppies. Lines starting with bash# indicate a shell command.
Insert a blank diskette labeled "boot disk".
It may be necessary to erase the "blank" diskette if it comes factory pre-formatted for another, non-Linux operating system. This can be done using the command dd if=/dev/zero of=/dev/fd0 bs=1k count=1440 |
bash# mke2fs -m0 /dev/fd0 bash# mount /dev/fd0 /mnt |
The steps for building the kernel were tested using Linux kernel version 2.4.18 and should work any 2.4.x kernel. The latest version of the kernel source code may be downloaded from http://www.kernel.org or one of its mirrors.
bash# cd /usr/src/linux bash# make menuconfig |
Be sure to configure support for the following:
386 processor
Floppy disk
RAM disk
Second extended (ext2) filesystem
Console on virtual terminal
bash# make dep bash# make clean bash# make bzImage |
bash# mkdir /mnt/boot bash# cp /usr/src/linux/arch/i386/boot/bzImage /mnt/boot/vmlinuz |
bash# mkdir /mnt/dev bash# cd /mnt/dev bash# mknod fd0 b 2 0 bash# mknod console c 5 1 |
bash# mkdir /mnt/etc bash# cd /mnt/etc |
Use an editor like vi, emacs or pico to create the following lilo.conf file:
# /etc/lilo.conf - boot loader configuration file # boot=/dev/fd0 compact prompt read-only vga=normal image=/boot/vmlinuz label=bootdisk append="load_ramdisk=1 prompt_ramdisk=1" root=/dev/fd0 # # end of /etc/lilo.conf |
Insert a blank diskette labeled "root disk".
bash# mke2fs -m0 /dev/fd0 bash# mount /dev/fd0 /mnt |
Get the bash-2.05 source code package from ftp://ftp.gnu.org/gnu/bash/ and untar it into the /usr/src directory.
BASH version 2.05b, the latest version at the time of this writing, will not build successfully when using the --enable-minimal-config option. This leaves two choices. We can either fix 2.05b by applying the patch posted on news://gnu.bash.bug under the subject, "Compile error in execute_cmd.c with --enable-minimal-config" or we can simply use the 2.05a version. |
Build BASH for an i386 CPU with the following commands:
bash# cd /usr/src/bash-2.05a bash# export CC="gcc -mcpu=i386" bash# ./configure --enable-static-link \ --enable-minimal-config --host=i386-pc-linux-gnu bash# make bash# strip bash |