Changeset 03e6a40 for BOOK/chroot/common


Ignore:
Timestamp:
Apr 20, 2014, 8:57:39 AM (11 years ago)
Author:
Chris Staub <chris@…>
Children:
0be79ea
Parents:
88ef769 (diff), 578ca586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'systemd' into simp

Conflicts:

BOOK/final-system/common/bash.xml
BOOK/final-system/mips64-chapter.xml
BOOK/final-system/multilib/bash.xml
BOOK/final-system/ppc64-chapter.xml
BOOK/final-system/sparc64-chapter.xml
BOOK/final-system/x86_64-chapter.xml
BOOK/general.ent
BOOK/packages.ent
BOOK/temp-system/common/bash.xml
BOOK/temp-system/mips64-64-chapter.xml
BOOK/temp-system/mips64-chapter.xml
BOOK/temp-system/multilib/bash.xml
BOOK/temp-system/ppc64-64-chapter.xml
BOOK/temp-system/ppc64-chapter.xml
BOOK/temp-system/sparc64-64-chapter.xml
BOOK/temp-system/sparc64-chapter.xml
BOOK/temp-system/x86_64-64-chapter.xml
BOOK/temp-system/x86_64-chapter.xml

Location:
BOOK/chroot/common
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • BOOK/chroot/common/changingowner.xml

    r88ef769 r03e6a40  
    1111  <title>Changing Ownership</title>
    1212
    13     <note>
    14       <para>This step is not optional as some of the binaries in
    15       <filename class="directory">/tools</filename> are set u+s.
    16       leaving the permissions as is could cause some commands,
    17       mount in particular, to fail later.</para>
    18     </note>
    19 
    2013    <para os="a">Currently, the <filename class="directory">/tools</filename>
    2114    and <filename class="directory">/cross-tools</filename> directories
    2215    are owned by the user <emphasis>clfs</emphasis>, a user that
    23     exists only on the host system. Although the <filename
     16    exists only on the host system. Although <filename
    2417    class="directory">/tools</filename> and <filename
    25     class="directory">/cross-tools</filename> directories can be deleted
    26     once the CLFS system has been finished, they can be retained to build
     18    class="directory">/cross-tools</filename> can be deleted once the CLFS
     19    system has been finished, they can be retained to build
    2720    additional CLFS systems. If the <filename class="directory">/tools</filename>
    2821    and <filename class="directory">/cross-tools</filename> directories are
    2922    kept as is, the files are owned by a user ID without a corresponding
    3023    account. This is dangerous because a user account created later could
    31     get this same user ID and would own the <filename
    32     class="directory">/tools</filename> directory and all the files therein,
    33     thus exposing these files to possible malicious manipulation.</para>
     24    get this same user ID and would own these directories and all the files
     25    therein, thus exposing those files to possible malicious manipulation.</para>
    3426
    35     <para os="b">To avoid this issue, add the <systemitem
    36     class="username">clfs</systemitem> user to the new CLFS system later when
    37     creating the <filename>/etc/passwd</filename> file, taking care to assign
    38     it the same user and group IDs as on the host system. Alternatively,
     27    <para os="b">One possible fix for this issue might be to add the
     28    <systemitem class="username">clfs</systemitem> user to the new CLFS system
     29    later when creating the <filename>/etc/passwd</filename> file, taking care
     30    to assign it the same user and group IDs as on the host system. Alternatively,
    3931    assign the contents of the <filename class="directory">/tools</filename>
    4032    and <filename class="directory">/cross-tools</filename> directories to
  • BOOK/chroot/common/createfiles.xml

    r88ef769 r03e6a40  
    1111  <title>Creating Essential Symlinks</title>
    1212
    13   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    14   href="../../boot/common/createfiles.xml"
    15   xpointer="xpointer(//*[@os='a'])"/>
     13    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     14    href="../../boot/common/createfiles.xml"
     15    xpointer="xpointer(//*[@os='a'])"/>
    1616
    1717<screen><userinput>ln -sv /tools/bin/{bash,cat,echo,grep,pwd,stty} /bin
    1818ln -sv /tools/bin/file /usr/bin
    1919ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
    20 ln -sv /tools/lib/libstd* /usr/lib
     20ln -sv /tools/lib/libstdc++.so{.6,} /usr/lib
     21sed -e 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la
    2122ln -sv bash /bin/sh
    2223ln -sv /run /var/run</userinput></screen>
    2324
     25    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     26    href="../../boot/common/createfiles.xml"
     27    xpointer="xpointer(//*[@os='c'])"/>
     28
     29<screen os="d"><userinput>ln -sv /proc/self/mounts /etc/mtab</userinput></screen>
     30
    2431</sect1>
  • BOOK/chroot/common/creatingdirs.xml

    r88ef769 r03e6a40  
    1313  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    1414  href="../../boot/common/creatingdirs.xml"
    15   xpointer="xpointer(//*[@os='a'])"/>
     15  xpointer="xpointer(//*[@os='b'])"/>
    1616
    17 <screen os="b"><userinput>mkdir -pv /{bin,boot,dev,{etc/,}opt,home,lib,mnt}
     17<screen os="c"><userinput>mkdir -pv /{bin,boot,dev,{etc/,}opt,home,lib,mnt}
    1818mkdir -pv /{proc,media/{floppy,cdrom},run/shm,sbin,srv,sys}
    1919mkdir -pv /var/{lock,log,mail,spool}
     
    2424mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
    2525mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}
    26 mkdir -pv /usr/{,local/}share/man/man{1..8}
    27 for dir in /usr{,/local}; do
    28   ln -sv share/{man,doc,info} $dir
    29 done</userinput></screen>
    30 
    31   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    32   href="../../boot/common/creatingdirs.xml"
    33   xpointer="xpointer(//*[@os='c'])"/>
     26mkdir -pv /usr/{,local/}share/man/man{1..8}</userinput></screen>
    3427
    3528  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     
    4134  xpointer="xpointer(//*[@os='e'])"/>
    4235
     36  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     37  href="../../boot/common/creatingdirs.xml"
     38  xpointer="xpointer(//*[@os='f'])"/>
     39
    4340</sect1>
  • BOOK/chroot/common/kernfs.xml

    r88ef769 r03e6a40  
    1111  <title>Mounting Virtual Kernel File Systems</title>
    1212
    13     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    14     href="../../boot/common/devices.xml"
    15     xpointer="xpointer(//*[@os='a'])"/>
     13    <note os="a">
     14      <para>The commands in the remainder of the book should be run as
     15      the <systemitem class="username">root</systemitem> user. Check
     16      that ${CLFS} is set in the
     17      <systemitem class="username">root</systemitem> user&rsquo;s environment
     18       before proceeding.</para>
     19    </note>
    1620
    1721  <para>Various file systems exported by the kernel are used to communicate
     
    4246
    4347  <para>Once the system is complete and booting, the rest of our device
    44   nodes are created by the Eudev package.  Since this package is not
     48  nodes are created by Udev, part of Systemd.  Since this package is not
    4549  available to us right now, we must take other steps to provide device
    4650  nodes under on the CLFS filesystem.  We will use the <quote>bind</quote>
  • BOOK/chroot/common/pwdgroup.xml

    r88ef769 r03e6a40  
    99  <?dbhtml filename="pwdgroup.html"?>
    1010
    11   <title>Creating the passwd, group, and log Files</title>
     11  <title>Creating the passwd and group Files</title>
    1212
    1313  <indexterm zone="ch-chroot-pwdgroup">
     
    1717  <indexterm zone="ch-chroot-pwdgroup">
    1818    <primary sortas="e-/etc/group">/etc/group</primary>
    19   </indexterm>
    20 
    21   <indexterm zone="ch-chroot-pwdgroup">
    22     <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
    23   </indexterm>
    24 
    25   <indexterm zone="ch-chroot-pwdgroup">
    26     <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
    27   </indexterm>
    28 
    29   <indexterm zone="ch-chroot-pwdgroup">
    30     <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
    31   </indexterm>
    32 
    33   <indexterm zone="ch-chroot-pwdgroup">
    34     <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
    3519  </indexterm>
    3620
     
    4428<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
    4529<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
     30<literal>bin:x:&uid-bin;:&gid-bin;:/bin:/bin/false</literal>
     31<literal>daemon:x:&uid-daemon;:&gid-daemon;:/sbin:/bin/false</literal>
     32<literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
     33<literal>nobody:x:&uid-nobody;:&gid-nogroup;:Unprivileged User:/dev/null:/bin/false</literal>
    4634EOF</userinput></screen>
    4735
     
    7361utmp:x:&gid-utmp;:
    7462usb:x:&gid-usb;:
    75 cdrom:x:&gid-cdrom;:</literal>
     63cdrom:x:&gid-cdrom;:
     64adm:x:&gid-adm;:
     65messagebus:x:&gid-messagebus;:
     66systemd-journal:x:&gid-systemd-journal;:
     67mail:x:&gid-mail;:
     68wheel:x:&gid-wheel;:
     69nogroup:x:&gid-nogroup;:</literal>
    7670EOF</userinput></screen>
    7771
     
    9993  for the duration of the next chapters.</para>
    10094
    101   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    102   href="../../boot/common/pwdgroup.xml"
    103   xpointer="xpointer(//*[@os='f'])"/>
    104 
    105 <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
    106 chgrp -v utmp /var/run/utmp /var/log/lastlog
    107 chmod -v 664 /var/run/utmp /var/log/lastlog
    108 chmod -v 600 /var/log/btmp</userinput></screen>
    109 
    110   <para>The <filename>/var/run/utmp</filename> file records the users that
    111   are currently logged in. The <filename>/var/log/wtmp</filename> file records
    112   all logins and logouts. The <filename>/var/log/lastlog</filename> file
    113   records when each user last logged in. The <filename>/var/log/btmp</filename>
    114   file records the bad login attempts.</para>
    115 
    11695</sect1>
Note: See TracChangeset for help on using the changeset viewer.