Библиотека сайта rus-linux.net
4.3. Construction
Rather than copying files directly to the ramdisk, we can make things easier by setting up a staging area. The staging area will give us room to work without worrying about the space constraints of the ramdisk. It will also provide a way to save our work and make it easier to enhance the rootdisk in later phases of the project.
The staging procedure will work like this:
Create a directory structure as defined in the FHS.
Copy in the files from phase 2's root disk.
Build the new package from source code.
Install files into the correct FHS directories.
Strip the binaries to save space.
Check library dependencies.
Copy to the whole directory structure to the ramdisk.
Compress the ramdisk and write it out to floppy.
4.3.1. Create a staging area
|
4.3.2. Copy contents of phase 2 rootdisk
|
4.3.3. Install binaries from GNU coreutils
Download a recent version of coreutils from ftp://ftp.gnu.org/gnu/coreutils/
|
4.3.4. Copy additional libraries
Check library requirements by using ldd on some of the new binaries.
|
Note the differences in the required libraries, as shown by the ldd command, and the libraries present in the staging area, as shown by the ls command, then copy any missing libraries to the staging area.
|
4.3.5. Strip binaries and libraries
|
4.3.6. Create a compressed root disk image
|
The process for creating the compressed root disk image will change very little throughout the remaining chapters. Writing a small script to handle this function can be a great time saver. |