bash# dd if=/dev/ram7 of=~/phase8−image bs=1k
bash# gzip −9 ~/phase8−image
Insert the diskette labeled "root disk" into drive fd0.
bash# dd if=~/phase8−image.gz of=/dev/fd0 bs=1k
A.3.3. Create a compressed /usr disk for mp3blaster
The compressed /usr diskette will be created in using the same process that is used to create the compressed
root disk. We will copy files to a staging area, copy the staging area to ramdisk, compress the ramdisk and
write it to diskette.
A.3.3.1. Create a staging area
bash# mkdir ~/usr−staging
bash# cd ~/usr−staging
bash# mkdir bin lib
bash# mkdir −p share/terminfo/l
A.3.3.2. Install the mp3blaster program
Download the latest version of mp3blaster source code from its home at
http://www.stack.nl/~brama/mp3blaster/.
bash# cd ~/usr/src/mp3blaster−3.2.0
bash# ./configure
bash# make
bash# cp src/mp3blaster ~/usr−staging/bin
A.3.3.3. Copy additional libraries and terminfo
Use ldd to find out which libraries are needed for mp3blaster.
The following is an example from the author's development system. It is possible that different systems
may yield slightly different results in terms of library requirements.
bash# cd ~/usr−staging/lib
bash# ldd ~/usr−staging/bin/mp3blaster
bash# cp /usr/lib/ncurses.so.5.0 .
bash# cp /usr/lib/stdc++.so.3 .
bash# cp /lib/libm.so.6 .
bash# cp /usr/lib/libgcc_s.so.1 .
bash# cd ~/usr−staging/share/terminfo/l
bash# cp /usr/share/terminfo/l/linux .
A.3.3.4. Make a compressed image and copy it to diskette
bash# cd /
bash# dd if=/dev/zero of=/dev/ram7 bs=1k count=4096
bash# mke2fs −m0 /dev/ram7
bash# mount /dev/ram7 /mnt
bash# cp −dpR ~/usr−staging/* /mnt
bash# umount /dev/ram7
Pocket Linux Guide
Appendix A. Hosting Applications 53