MTD 248-645A Manual de usuario Pagina 95

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 347
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 94
Linux From Scratch - Version 7.0
75
5.34. Stripping
The steps in this section are optional, but if the LFS partition is rather small, it is beneficial to learn that unnecessary
items can be removed. The executables and libraries built so far contain about 70 MB of unneeded debugging symbols.
Remove those symbols with:
strip --strip-debug /tools/lib/*
strip --strip-unneeded /tools/{,s}bin/*
These commands will skip a number of files, reporting that it does not recognize their file format. Most of these are
scripts instead of binaries.
Take care not to use --strip-unneeded on the libraries. The static ones would be destroyed and the toolchain
packages would need to be built all over again.
To save more, remove the documentation:
rm -rf /tools/{,share}/{info,man,doc}
At this point, you should have at least 850 MB of free space in $LFS that can be used to build and install Glibc in
the next phase. If you can build and install Glibc, you can build and install the rest too.
5.35. Changing Ownership
Note
The commands in the remainder of this book must be performed while logged in as user root and no
longer as user lfs. Also, double check that $LFS is set in root's environment.
Currently, the $LFS/tools directory is owned by the user lfs, a user that exists only on the host system. If
the $LFS/tools directory is kept as is, the files are owned by a user ID without a corresponding account. This
is dangerous because a user account created later could get this same user ID and would own the $LFS/tools
directory and all the files therein, thus exposing these files to possible malicious manipulation.
To avoid this issue, you could add the lfs user to the new LFS system later when creating the /etc/passwd file,
taking care to assign it the same user and group IDs as on the host system. Better yet, change the ownership of the
$LFS/tools directory to user root by running the following command:
chown -R root:root $LFS/tools
Although the $LFS/tools directory can be deleted once the LFS system has been finished, it can be retained to
build additional LFS systems of the same book version. How best to backup $LFS/tools is a matter of personal
preference.
Caution
If you intend to keep the temporary tools for use in building future LFS systems, now is the time to back
them up. Subsequent commands in chapter 6 will alter the tools currently in place, rendering them useless
for future builds.
Vista de pagina 94
1 2 ... 90 91 92 93 94 95 96 97 98 99 100 ... 346 347

Comentarios a estos manuales

Sin comentarios