8.3.5. Install ed
The ed package also comes from GNU at ftp://ftp.gnu.org/gnu/ed/
bash# cd /usr/src/ed−0.2
bash# ./configure −−host=i386−pc−linux−gnu
bash# make
bash# cp ed ~/staging/bin
8.3.6. Strip binaries to save space
bash# strip ~/staging/bin/*
8.3.7. Ensure proper permissions
bash# chown 0:0 ~/staging/bin/*
bash# chmod −R 755 ~/staging/bin
bash# chmod 4750 ~/staging/bin/su
8.3.8. Create the root disk image
bash# cd /
bash# dd if=/dev/zero of=/dev/ram7 bs=1k count=4096
bash# mke2fs −m0 /dev/ram7 4096
bash# mount /dev/ram7 /mnt
bash# cp −dpR ~/staging/* /mnt
bash# umount /dev/ram7
bash# dd if=/dev/ram7 of=~/phase7−image bs=1k
bash# gzip −9 ~/phase7−image
8.3.9. Copy the image to diskette
Insert the diskette labeled "root disk" into drive fd0.
bash# dd if=~/phase7−image.gz of=/dev/fd0 bs=1k
8.4. Implementation
8.4.1. System startup
Boot from the diskset in the usual way and log in as root.
8.4.2. Test the "more" script
Display kernel messages by piping the output of dmesg to more.
bash# dmesg | more
Examine the
local_fs
script by using more with a command−line argument.
Pocket Linux Guide
Chapter 8. Filling in the Gaps
45