source: BOOK/boot/common/devices.xml@ d150ded

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since d150ded was 229ed25, checked in by Chris Staub <chris@…>, 11 years ago

Merge branch 'master' into systemd

Conflicts:

BOOK/appendices/dependencies/common.xml
BOOK/boot/common/devices.xml
BOOK/boot/common/pwdgroup.xml
BOOK/boot/ppc64-64/powerpc-utils.xml
BOOK/boot/ppc64/util-linux-32.xml
BOOK/bootscripts/common/bootscripts.xml
BOOK/final-system/alpha-chapter.xml
BOOK/final-system/common/coreutils.xml
BOOK/final-system/common/eudev.xml
BOOK/final-system/common/kbd.xml
BOOK/final-system/mips-chapter.xml
BOOK/final-system/mips64-64-chapter.xml
BOOK/final-system/mips64-chapter.xml
BOOK/final-system/multilib/udev-64bit.xml
BOOK/final-system/multilib/util-linux.xml
BOOK/final-system/ppc-chapter.xml
BOOK/final-system/ppc64-chapter.xml
BOOK/final-system/sparc-chapter.xml
BOOK/final-system/sparc64-64-chapter.xml
BOOK/final-system/sparc64-chapter.xml
BOOK/final-system/x86-chapter.xml
BOOK/final-system/x86_64-64-chapter.xml
BOOK/final-system/x86_64-chapter.xml
BOOK/introduction/common/changelog.xml
BOOK/materials/common/packages.xml
BOOK/packages.ent

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-boot-devices">
9 <?dbhtml filename="devices.html"?>
10
[91ad4a4]11 <title>Populating /dev</title>
[3f8be484]12
13 <indexterm zone="ch-boot-devices">
[91ad4a4]14 <primary sortas="e-/dev/*">/dev/*</primary>
[3f8be484]15 </indexterm>
16
17 <sect2>
18 <title>Creating Initial Device Nodes</title>
19
[bf3dcb3f]20 <note os="a">
21 <para>The commands in the remainder of the book should be run as
[92581b4d]22 the <systemitem class="username">root</systemitem> user. Check
23 that ${CLFS} is set in the
24 <systemitem class="username">root</systemitem> user&rsquo;s environment
25 before proceeding.</para>
[bf3dcb3f]26 </note>
27
28 <para os="b">When the kernel boots the system, it requires the presence
[3f8be484]29 of a few device nodes, in particular the <filename
30 class="devicefile">console</filename> and <filename
31 class="devicefile">null</filename> devices. The device nodes will
32 be created on the hard disk so that they are available before
33 <command>udev</command> has been started, and additionally when Linux
34 is started in single user mode (hence the restrictive permissions on
35 <filename class="devicefile">console</filename>). Create these by running
36 the following commands:</para>
37
[2572b8e]38<screen><userinput>mknod -m 0600 ${CLFS}/dev/console c 5 1
39mknod -m 0666 ${CLFS}/dev/null c 1 3
40mknod -m 0666 ${CLFS}/dev/zero c 1 5</userinput></screen>
41
42 <para>When systemd starts a tmpfs filesystem is mounted over
43 <filename class="directory">/dev</filename> and the previous entries are
44 no-longer available. The folling command creates files that are copied
45 over when udevd starts:</para>
46
47<screen><userinput>mkdir -pv ${CLFS}/lib/udev/devices/{pts,shm}
48mknod -m 0600 ${CLFS}/lib/udev/devices/console c 5 1
49mknod -m 0666 ${CLFS}/lib/udev/devices/null c 1 3
50mknod -m 0666 ${CLFS}/lib/udev/devices/zero c 1 5
51mknod -m 0600 ${CLFS}/lib/udev/devices/kmsg c 1 11
52ln -snvf /proc/self/fd ${CLFS}/lib/udev/devices/fd
53ln -snvf /proc/self/fd/0 ${CLFS}/lib/udev/devices/stdin
54ln -snvf /proc/self/fd/1 ${CLFS}/lib/udev/devices/stdout
55ln -snvf /proc/self/fd/2 ${CLFS}/lib/udev/devices/stderr
56ln -snvf /proc/kcore ${CLFS}/lib/udev/devices/core</userinput></screen>
[ef7cdfb]57
[3f8be484]58 </sect2>
59
60</sect1>
Note: See TracBrowser for help on using the repository browser.