Changeset ef13657 for chapter06/devices.xml
- Timestamp:
- 08/08/2004 02:11:09 AM (20 years ago)
- Branches:
- 6.0
- Children:
- 5ba3d1d
- Parents:
- 6e41459
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/devices.xml
r6e41459 ref13657 11 11 12 12 <sect2> 13 <title>Creating initial device nodes</title>13 <title>Creating Initial Device Nodes</title> 14 14 15 15 <para>When the kernel boots the system, it requires the presence of a few device 16 16 nodes, in particular the <filename class="devicefile">console</filename> and 17 <filename class="devicefile">null</filename> devices:</para> 17 <filename class="devicefile">null</filename> devices. Create these by 18 running the following commands:</para> 18 19 19 20 <screen><userinput>mknod -m 600 /dev/console c 5 1 … … 24 25 <title>Mounting ramfs and populating /dev</title> 25 26 26 <para>The ideal way to populate <filename class="directory">/dev</filename> is 27 to mount a <systemitem class="filesystem">ramfs</systemitem> onto <filename class="directory">/dev </filename> 28 like <systemitem class="filesystem">tmpfs</systemitem>, but it 29 cannot be swapped) and create the devices on there during each bootup. Since we haven't 30 booted the system, we have to do what the bootscripts would otherwise do for us, and 31 populate <filename class="directory">/dev</filename> ourselves. Begin by mounting <filename class="directory">/dev</filename>:</para> 27 <para>The ideal way to populate <filename 28 class="directory">/dev</filename> is to mount a ramfs onto <filename 29 class="directory">/dev</filename> like <systemitem 30 class="filesystem">tmpfs</systemitem>, and create the devices on there 31 during each bootup. Since the system has not been booted, it is 32 necessary to do what the bootscripts would otherwise do and populate 33 <filename class="directory">/dev</filename>. Begin by mounting 34 <filename class="directory">/dev</filename>:</para> 32 35 33 36 <screen><userinput>mount -n -t ramfs none /dev</userinput></screen> 34 37 35 <para>Now use the provided udevstart utility to create the initial devices based on 36 all the information in <filename class="directory">/sys</filename>:</para> 38 <para>Now run the installed <command>udevstart</command> program to 39 create the initial devices based on all the information in <filename 40 class="directory">/sys</filename>:</para> 37 41 38 42 <screen><userinput>/tools/sbin/udevstart</userinput></screen> 39 43 40 <para>There are some symlinks and directories required by LFS that are not created by41 Udev, so we create those ourselveshere:</para>44 <para>There are some symlinks and directories required by LFS that are 45 not created by Udev, so create those here:</para> 42 46 43 47 <screen><userinput>ln -s /proc/self/fd /dev/fd … … 49 53 mkdir /dev/shm</userinput></screen> 50 54 51 <para>Finally, mount the proper virtual (kernel) file systems on the directories we just52 created:</para>55 <para>Finally, mount the proper virtual (kernel) file systems on the 56 newly-created directories:</para> 53 57 54 58 <screen><userinput>mount -t devpts -o gid=4,mode=620 none /dev/pts … … 56 60 </sect2> 57 61 62 </sect1> 58 63 59 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.