Ignore:
Timestamp:
May 29, 2006, 2:45:38 AM (18 years ago)
Author:
Jeremy Utley <jerutley@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
a8952fe
Parents:
7eb92df
Message:

Mount --bind host /dev to LFS's dev on chroot builds - fixes ticket #27

File:
1 edited

Legend:

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

    r7eb92df r27e1607  
    3434  are mounted again before entering the chroot environment.</para>
    3535
    36   <para>Additional file systems will soon be mounted from within the
    37   chroot environment. To keep the host up to date, perform a <quote>fake
    38   mount</quote> for each of these now:</para>
     36  <para>Two device nodes, /dev/console and /dev/null, are required to be
     37  present on the filesystem.  These are needed by the kernel even before
     38  starting Udev early in the boot process, so we create them here:</para>
    3939
    40 <screen><userinput>mount -f -vt tmpfs tmpfs $LFS/dev
    41 mount -f -vt tmpfs tmpfs $LFS/dev/shm
     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  <para>Once the system is complete and booting, the rest of our device
     44  nodes are created by the Udev package.  Since this package is not
     45  available to us right now, we must take other steps to provide device
     46  nodes under on the LFS filesystem.  We will use the <quote>bind</quote>
     47  option in the mount command to make our host system's /dev structure
     48  appear in the new LFS filesystem:</para>
     49
     50<screen><userinput>/tools/bin/mount -o bind /dev $LFS/dev</userinput></screen>
     51
     52  <para>Additional file systems will soon be mounted from within the chroot
     53  environment. To keep the host up to date, perform a <quote>fake mount</quote>
     54  for each of these now:</para>
     55
     56<screen><userinput>mount -f -vt tmpfs tmpfs $LFS/dev/shm
    4257mount -f -vt devpts -o gid=10,mode=620 devpts $LFS/dev/pts</userinput></screen>
    4358
Note: See TracChangeset for help on using the changeset viewer.