Changeset 83d8de03 for chapter07/kernfs.xml
- Timestamp:
- 03/07/2022 08:15:47 PM (3 years ago)
- Branches:
- arm
- Children:
- 4926bf2
- Parents:
- 4a54194
- git-author:
- Xi Ruoyao <xry111@…> (03/07/2022 05:19:06 PM)
- git-committer:
- William Harrington <kb0iic@…> (03/07/2022 08:15:47 PM)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/kernfs.xml
r4a54194 r83d8de03 25 25 <screen><userinput>mkdir -pv $LFS/{dev,proc,sys,run}</userinput></screen> 26 26 27 <sect2>28 <title>Creating Initial Device Nodes</title>29 30 <para>When the kernel boots the system, it requires the presence of a few31 device nodes, in particular the <filename32 class="devicefile">console</filename> and <filename33 class="devicefile">null</filename> devices. The device nodes must be34 created on the hard disk so that they are available before the kernel35 populates <systemitem class="filesystem">/dev</systemitem>), and36 additionally when Linux is started with37 <parameter>init=/bin/bash</parameter>. Create the devices by running the38 following commands:</para>39 40 <screen><userinput>mknod -m 600 $LFS/dev/console c 5 141 mknod -m 666 $LFS/dev/null c 1 3</userinput></screen>42 43 </sect2>44 45 27 <sect2 id="ch-tools-bindmount"> 46 28 <title>Mounting and Populating /dev</title> 47 29 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 Udev. Since this new system does not yet have Udev and 36 has not yet been booted, it is necessary to mount and populate 37 <filename class="directory">/dev</filename> manually. This is 38 accomplished by bind mounting the host system's 39 <filename class="directory">/dev</filename> directory. A bind mount is 40 a special type of mount that allows you to create a mirror of a 41 directory or mount point to some other location. Use the following 42 command to achieve this:</para> 62 43 63 44 <screen><userinput>mount -v --bind /dev $LFS/dev</userinput></screen>
Note:
See TracChangeset
for help on using the changeset viewer.