This is a highly nontrivial exercise. Creating a Linux distribution involves a great deal of effort in verifying inter-operability. This is a major contribution of the Linux From Scratch project. In general, you must read the README files associated with each package to determine which versions of other packages are required for correct operation.
A usable Linux system includes the following additional packages:
Note that configure will determine your CPU type and build the software for that processor. Since not all processors have the same capabilities, you should build the software on the same type of CPU, or a lower class of compatible CPU, that you intend to run it on. For instance, software built on a Pentium will run on any class of Pentium, but software built on a Pentium II will only run on a Pentium II or better. It is possible to build for a different processor, but that is outside the scope of this class.
Be sure to check the output of configure to make sure the package will be built to your needs; some of these builds are LONG!
(./configure) 2>&1 | tee package.logThe "2>&1" will redirect stderr to stdout, and the tee will allow you to see the output as it is written to the log file (the "-a" tells tee to append to the log file). The "&&" ensures that the "make install" will not run if the "make" fails. Of course, you should not do either if there were problems with the configure.(make && make install) 2>&1 | tee -a package.log
If you install software which includes new libraries, the install process will use ldconfig to rebuild the runtime linkages. /etc/ld.so.conf contains a list of the directories in which the dynamic loader is to look for libraries. Any library directories other than /lib and /usr/lib must be included in /etc/ld.so.conf. ldd can be used to determine which libraries are required by a given program.
strip --strip-debug (library file name)Be sure NOT to do the latter on libraries!strip --strip-unneeded (binary executable file name)
The mkisofs creates an ISO-9660 filesystem in the file output.iso, which is then burned using cdrecord.mkisofs -l -R -allow-leading-dots -o output.iso (input directory) cdrecord -v dev=/dev/sg1 -data output.iso
To burn a music CD, simply cd to a directory with wav files to be burned (make sure they will fit!), and
cdrecord -v dev=/dev/sg1 driveropts=burnfree -audio -pad *.wav
Making video DVDs are, alas, outside the scope of this course.growisofs -dvd-compat -Z /dev/sr0=output.iso
If you have blank DVDs which are rated at a speed slower than your burner, you will want to include the option -speed=1 to force the speed to a lower value (it won't actually burn at 1X, but it should burn slowly enough to work).
©2012, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.