2.3.6. Copy the kernel to diskette
bash# cp /usr/src/linux/arch/i386/boot/bzImage /mnt/boot/vmlinuz
2.3.7. Unmount the boot disk
bash# cd /
bash# umount /mnt
2.3.8. Prepare the root disk media
Insert a blank diskette labeled "root disk".
bash# mke2fs −m0 /dev/fd0
bash# mount /dev/fd0 /mnt
2.3.9. Build BASH
Get the bash−3.0 source code package from ftp://ftp.gnu.org/gnu/bash/ and untar it into the
/usr/src
directory.
Build BASH for an i386 CPU with the following commands:
bash# cd /usr/src/bash−3.0
bash# export CC="gcc −mcpu=i386"
bash# ./configure −−enable−static−link \
−−enable−minimal−config −−host=i386−pc−linux−gnu
bash# make
bash# strip bash
2.3.10. Copy BASH to the root disk
bash# mkdir /mnt/bin
bash# cp bash /mnt/bin/bash
bash# ln −s bash /mnt/bin/sh
2.3.11. Create device files that BASH needs
bash# mkdir /mnt/dev
bash# mknod /mnt/dev/console c 5 1
2.3.12. Unmount the root disk
bash# cd /
bash# umount /mnt
Pocket Linux Guide
Chapter 2. A Simple Prototype
9