Changeset 0976a9a


Ignore:
Timestamp:
04/02/2006 03:09:47 PM (18 years ago)
Author:
Archaic <archaic@…>
Children:
26e2ce40
Parents:
0b528e48
Message:
  • Moved the chowning of /tools to the end of chapter 5 and rewrote note about backing up or re-using /tools.
  • Moved the mounting of kernel filesystems before pkgmgt page and rewrote the page to mount --bind /dev and mount all other kernel filesystems while outside chroot.
  • Rewrote note about re-entering chroot and remounting kernel filesystems.
  • Removed /dev from the list of dirs created in chroot and added it before chroot.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/udev_update/BOOK@7486 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
1 added
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r0b528e48 r0976a9a  
    3636    </listitem>
    3737-->
     38
     39    <listitem>
     40      <para>April 2, 2006</para>
     41      <itemizedlist>
     42        <listitem>
     43          <para>[archaic] - Moved the chowning of /tools to the end of chapter 5
     44          and rewrote note about backing up or re-using /tools. Moved the
     45          mounting of kernel filesystems before pkgmgt page and rewrote the page
     46          to mount --bind /dev and mount all other kernel filesystems while
     47          outside chroot. Rewrote note about re-entering chroot and remounting
     48          kernel filesystems. Removed /dev from the list of dirs created in
     49          chroot and added it before chroot.</para>
     50        </listitem>
     51      </itemizedlist>
     52    </listitem>
    3853
    3954    <listitem>
  • chapter05/chapter05.xml

    r0b528e48 r0976a9a  
    4545  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
    4646  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/>
     47  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/>
    4748
    4849</chapter>
  • chapter06/chapter06.xml

    r0b528e48 r0976a9a  
    1313
    1414  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
     15  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernfs.xml"/>
    1516  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pkgmgt.xml"/>
    16   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernfs.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chroot.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/>
    1918  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingdirs.xml"/>
    2019  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="createfiles.xml"/>
    2120  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pwdgroup.xml"/>
    22   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="devices.xml"/>
    2321  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/>
    2422  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-pages.xml"/>
  • chapter06/chroot.xml

    r0b528e48 r0976a9a  
    4545  to <command>bash</command>.</para>
    4646
    47   <para>It is important that all the commands throughout the remainder of this
    48   chapter and the following chapters are run from within the chroot environment.
    49   If you leave this environment for any reason (rebooting for example), remember
    50   to first mount the <systemitem class="filesystem">proc</systemitem> and
    51   <systemitem class="filesystem">devpts</systemitem> file systems (discussed
    52   in the previous section) and enter chroot again before continuing with the
    53   installations.</para>
    54 
    5547  <para>Note that the <command>bash</command> prompt will say
    5648  <computeroutput>I have no name!</computeroutput> This is normal because the
    5749  <filename>/etc/passwd</filename> file has not been created yet.</para>
    5850
     51  <note>
     52    <para>It is important that all the commands throughout the remainder of this
     53    chapter and the following chapters are run from within the chroot
     54    environment. If you leave this environment for any reason (rebooting for
     55    example), ensure that the virtual kernel filesystems are mounted as
     56    explained in <xref linkend="ch-system-bindmount"/> and <xref
     57    linkend="ch-system-kernfsmount"/> and enter chroot again before continuing
     58    with the installation.</para>
     59  </note>
     60
    5961</sect1>
  • chapter06/creatingdirs.xml

    r0b528e48 r0976a9a  
    1414  standard directory tree by issuing the following commands:</para>
    1515
    16 <screen><userinput>install -dv /{bin,boot,dev,etc/opt,home,lib,mnt}
     16<screen><userinput>install -dv /{bin,boot,etc/opt,home,lib,mnt}
    1717install -dv /{sbin,srv,usr/local,var,opt}
    1818install -dv /root -m 0750
  • chapter06/introduction.xml

    r0b528e48 r0976a9a  
    5656  these) that the package installs.</para>
    5757
    58   <note>
    59     <para>At this point, you may wish to keep your finished temporary
    60     tools for use in future LFS builds by creating a tarball of the
    61     <filename class="directory">/tools</filename> directory and
    62     storing it in a safe location.</para>
    63   </note>
    64 
    6558</sect1>
  • chapter06/kernfs.xml

    r0b528e48 r0976a9a  
    99  <?dbhtml filename="kernfs.html"?>
    1010
    11   <title>Mounting Virtual Kernel File Systems</title>
     11  <title>Preparing Virtual Kernel File Systems</title>
    1212
    13   <para>Various file systems exported by the kernel are used to communicate to and
    14   from the kernel itself. These file systems are virtual in that no disk space is
    15   used for them. The content of the file systems resides in memory.</para>
     13  <indexterm zone="ch-system-kernfs">
     14    <primary sortas="e-/dev/">/dev/*</primary>
     15  </indexterm>
    1616
    17   <para>Begin by creating directories onto which the file systems will be
    18   mounted:</para>
     17    <para>Various file systems exported by the kernel are used to communicate to
     18    and from the kernel itself. These file systems are virtual in that no disk
     19    space is used for them. The content of the file systems resides in
     20    memory.</para>
    1921
    20 <screen><userinput>mkdir -pv $LFS/{proc,sys}</userinput></screen>
     22    <para>Begin by creating directories onto which the file systems will be
     23    mounted:</para>
    2124
    22   <para>Now mount the file systems:</para>
     25<screen><userinput>mkdir -pv $LFS/{dev,proc,sys}</userinput></screen>
    2326
    24 <screen><userinput>mount -vt proc proc $LFS/proc
     27  <sect2>
     28    <title>Creating Initial Device Nodes</title>
     29
     30    <para>When the kernel boots the system, it requires the presence of a few
     31    device nodes, in particular the <filename
     32    class="devicefile">console</filename> and <filename
     33    class="devicefile">null</filename> devices. The device nodes will be created
     34    on the hard disk so that they are available before <command>udev</command>
     35    has been started, and additionally when Linux is started in single user mode
     36    (hence the restrictive permissions on <filename
     37    class="devicefile">console</filename>). Create the devices by running the
     38    following commands:</para>
     39
     40<screen><userinput>mknod -m 600 $LFS/dev/console c 5 1
     41mknod -m 666 $LFS/dev/null c 1 3</userinput></screen>
     42
     43  </sect2>
     44
     45  <sect2 id="ch-system-bindmount">
     46    <title>Mounting and Populating /dev</title>
     47
     48      <para>The recommended method of populating the <filename
     49      class="directory">/dev</filename> directory with devices is to mount a
     50      virtual filesystem (such as <systemitem
     51      class="filesystem">tmpfs</systemitem>) on the <filename
     52      class="directory">/dev</filename> directory, and allow the devices to be
     53      created dynamically on that virtual filesystem as they are detected or
     54      accessed. This is generally done during the boot process by Udev. Since
     55      this new system does not yet have Udev and has not yet been booted, it is
     56      necessary to mount and populate <filename
     57      class="directory">/dev</filename> manually. This is accomplished by bind
     58      mounting the host system's <filename class="directory">/dev</filename>
     59      directory. A bind mount is a special type of mount that allows you to
     60      create a mirror of a directory or mount point to some other location. Use
     61      the following command to achieve this:</para>
     62
     63<screen><userinput>mount --bind /dev $LFS/dev</userinput></screen>
     64
     65  </sect2>
     66 
     67  <sect2 id="ch-system-kernfsmount">
     68    <title>Mounting Virtual Kernel File Systems</title>
     69
     70      <para>Now mount the remaining virtual kernel filesystems:</para>
     71
     72<screen><userinput>mount -vt devpts devpts $LFS/dev/pts
     73mount -vt tmpfs shm $LFS/dev/shm
     74mount -vt proc proc $LFS/proc
    2575mount -vt sysfs sysfs $LFS/sys</userinput></screen>
    2676
    27   <para>Remember that if for any reason you stop working on the LFS
    28   system and start again later, it is important to check that these file
    29   systems are mounted again before entering the chroot
    30   environment.</para>
    31 
    32   <para>Additional file systems will soon be mounted from within the
    33   chroot environment. To keep the host up to date, perform a <quote>fake
    34   mount</quote> for each of these now:</para>
    35 
    36 <screen><userinput>mount -vft tmpfs tmpfs $LFS/dev
    37 mount -vft tmpfs tmpfs $LFS/dev/shm
    38 mount -vft devpts -o gid=4,mode=620 devpts $LFS/dev/pts</userinput></screen>
     77  </sect2>
    3978
    4079</sect1>
  • chapter06/pkgmgt.xml

    r0b528e48 r0976a9a  
    3939  the <ulink url="&hints-root;">Hints subproject</ulink> and see if one of them
    4040  fits your need.</para>
    41 
    42   <note>
    43     <para>As no particular package management technique is mentioned in LFS,
    44     the commands in the remainder of this book must be performed while logged in
    45     as user <systemitem class="username">root</systemitem> and no longer as user
    46     <systemitem class="username">lfs</systemitem>. Also, double check that
    47     <envar>$LFS</envar> is set.</para>
    48   </note>
    4941
    5042  <sect2>
  • general.ent

    r0b528e48 r0976a9a  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!ENTITY version "udev_update-20060330">
    3 <!ENTITY releasedate "March 30, 2006">
     2<!ENTITY version "udev_update-20060402">
     3<!ENTITY releasedate "April 2, 2006">
    44<!ENTITY milestone "6.2">
    55<!ENTITY generic-version "udev_update"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
Note: See TracChangeset for help on using the changeset viewer.