MTD 248-645A Manual de usuario Pagina 102

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 347
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 101
Linux From Scratch - Version 7.0
82
Notice that /tools/bin comes last in the PATH. This means that a temporary tool will no longer be used once
its final version is installed. This occurs when the shell does not “remember” the locations of executed binaries—for
this reason, hashing is switched off by passing the +h option to bash.
Note that the bash prompt will say I have no name! This is normal because the /etc/passwd file has not
been created yet.
Note
It is important that all the commands throughout the remainder of this chapter and the following chapters
are run from within the chroot environment. If you leave this environment for any reason (rebooting for
example), ensure that the virtual kernel filesystems are mounted as explained in Section 6.2.2, “Mounting
and Populating /dev” and Section 6.2.3, “Mounting Virtual Kernel File Systems” and enter chroot again
before continuing with the installation.
6.5. Creating Directories
It is time to create some structure in the LFS file system. Create a standard directory tree by issuing the following
commands:
mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt,run}
mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
install -dv -m 0750 /root
install -dv -m 1777 /tmp /var/tmp
mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir -pv /usr/{,local/}share/man/man{1..8}
for dir in /usr /usr/local; do
ln -sv share/{man,doc,info} $dir
done
case $(uname -m) in
x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;;
esac
mkdir -v /var/{log,mail,spool}
ln -sv /run /var/run
ln -sv /run/lock /var/lock
mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
Directories are, by default, created with permission mode 755, but this is not desirable for all directories. In the
commands above, two changes are made—one to the home directory of user root, and another to the directories
for temporary files.
The first mode change ensures that not just anybody can enter the /root directory—the same as a normal user would
do with his or her home directory. The second mode change makes sure that any user can write to the /tmp and
/var/tmp directories, but cannot remove another user's files from them. The latter is prohibited by the so-called
“sticky bit,” the highest bit (1) in the 1777 bit mask.
Vista de pagina 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 346 347

Comentarios a estos manuales

Sin comentarios