Ignore:
Timestamp:
03/17/2022 02:30:05 PM (2 years ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
multilib
Children:
85acfcb0
Parents:
d9bec1e (diff), 43149b9 (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:

Automatic merge of trunk into multilib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/kernfs.xml

    rd9bec1e r02c702c  
    2525<screen><userinput>mkdir -pv $LFS/{dev,proc,sys,run}</userinput></screen>
    2626
    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 must be
    34     created on the hard disk so that they are available before the kernel
    35     populates <systemitem class="filesystem">/dev</systemitem>), and
    36     additionally when Linux is started with
    37     <parameter>init=/bin/bash</parameter>. Create the devices by running the
    38     following commands:</para>
    39 
    40 <screen><userinput>mknod -m 600 $LFS/dev/console c 5 1
    41 mknod -m 666 $LFS/dev/null c 1 3</userinput></screen>
    42 
    43   </sect2>
    44 
    4527  <sect2 id="ch-tools-bindmount">
    4628    <title>Mounting and Populating /dev</title>
    4729
    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. Device creation is generally done during the boot process
    55       by Udev. Since this new system does not yet have Udev and has not yet
    56       been booted, it is 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>
     30      <para>During a normal boot, the kernel automatically mounts the
     31      <systemitem class="filesystem">devtmpfs</systemitem> filesystem on the
     32      <filename class="directory">/dev</filename> directory, and allow the
     33      devices to be created dynamically on that virtual filesystem as they
     34      are detected or accessed. Device creation is generally done during the
     35      boot process by the kernel and Udev.
     36      Since this new system does not yet have Udev and
     37      has not yet been booted, it is necessary to mount and populate
     38      <filename class="directory">/dev</filename> manually. This is
     39      accomplished by bind mounting the host system's
     40      <filename class="directory">/dev</filename> directory. A bind mount is
     41      a special type of mount that allows you to create a mirror of a
     42      directory or mount point to some other location. Use the following
     43      command to achieve this:</para>
    6244
    6345<screen><userinput>mount -v --bind /dev $LFS/dev</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.