Changeset b340d68c
- Timestamp:
- 04/08/2006 06:31:59 PM (18 years ago)
- Children:
- e560e2e
- Parents:
- 8eef135
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter01/changelog.xml
r8eef135 rb340d68c 36 36 </listitem> 37 37 --> 38 39 <listitem> 40 <para>April 8, 2006</para> 41 <itemizedlist> 42 <listitem> 43 <para>[jhuntwork] - Added a command to create an empty /etc/mtab file early 44 in chapter 6. This avoids testsuite failures in e2fsprogs and possibly other 45 programs that expect /etc/mtab to be present. Explanation from Dan Nicholson, 46 slightly modified. Also merged the 'Creating Essential Symlinks' section with 47 'Creating passwd, group and log Files'.</para> 48 </listitem> 49 </itemizedlist> 50 </listitem> 38 51 39 52 <listitem> -
chapter06/chapter06.xml
r8eef135 rb340d68c 18 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingdirs.xml"/> 19 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="createfiles.xml"/> 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pwdgroup.xml"/>21 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/> 22 21 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-pages.xml"/> -
chapter06/createfiles.xml
r8eef135 rb340d68c 9 9 <?dbhtml filename="createfiles.html"?> 10 10 11 <title>Creating Essential Symlinks</title> 11 <title>Creating Essential Files and Symlinks</title> 12 13 <indexterm zone="ch-system-createfiles"> 14 <primary sortas="e-/etc/passwd">/etc/passwd</primary> 15 </indexterm> 16 17 <indexterm zone="ch-system-createfiles"> 18 <primary sortas="e-/etc/group">/etc/group</primary> 19 </indexterm> 20 21 <indexterm zone="ch-system-createfiles"> 22 <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> 23 </indexterm> 24 25 <indexterm zone="ch-system-createfiles"> 26 <primary sortas="e-/var/log/btmp">/var/log/btmp</primary> 27 </indexterm> 28 29 <indexterm zone="ch-system-createfiles"> 30 <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary> 31 </indexterm> 32 33 <indexterm zone="ch-system-createfiles"> 34 <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary> 35 </indexterm> 12 36 13 37 <para>Some programs use hard-wired paths to programs which do not exist yet. In … … 21 45 ln -sv bash /bin/sh</userinput></screen> 22 46 47 <para>A proper Linux system maintains a list of the mounted file systems in 48 the file <filename>/etc/mtab</filename>. Normally, this file would be 49 created when we mount a new file system. Since we will not be mounting any 50 file systems inside our chroot environment, create an empty file for 51 utilities that expect the presence of <filename>/etc/mtab</filename>:</para> 52 53 <screen><userinput>touch /etc/mtab</userinput></screen> 54 55 <para>In order for user <systemitem class="username">root</systemitem> to be 56 able to login and for the name <quote>root</quote> to be recognized, there 57 must be relevant entries in the <filename>/etc/passwd</filename> and 58 <filename>/etc/group</filename> files.</para> 59 60 <para>Create the <filename>/etc/passwd</filename> file by running the following 61 command:</para> 62 63 <screen><userinput>cat > /etc/passwd << "EOF" 64 <literal>root:x:0:0:root:/root:/bin/bash</literal> 65 EOF</userinput></screen> 66 67 <para>The actual password for <systemitem class="username">root</systemitem> 68 (the <quote>x</quote> used here is just a placeholder) will be set later.</para> 69 70 <para>Create the <filename>/etc/group</filename> file by running the following 71 command:</para> 72 73 <screen><userinput>cat > /etc/group << "EOF" 74 <literal>root:x:0: 75 bin:x:1: 76 sys:x:2: 77 kmem:x:3: 78 tty:x:4: 79 tape:x:5: 80 daemon:x:6: 81 floppy:x:7: 82 disk:x:8: 83 lp:x:9: 84 dialout:x:10: 85 audio:x:11: 86 video:x:12: 87 utmp:x:13: 88 usb:x:14: 89 cdrom:x:15:</literal> 90 EOF</userinput></screen> 91 92 <para>The created groups are not part of any standard—they are groups 93 decided on in part by the requirements of the Udev configuration in this 94 chapter, and in part by common convention employed by a number of existing 95 Linux distributions. The Linux Standard Base (LSB, available at <ulink 96 url="http://www.linuxbase.org"/>) recommends only that, besides the group 97 <systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0, 98 a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be 99 present. All other group names and GIDs can be chosen freely by the system 100 administrator since well-written programs do not depend on GID numbers, but 101 rather use the group's name.</para> 102 103 <para>To remove the <quote>I have no name!</quote> prompt, start a new 104 shell. Since a full Glibc was installed in <xref 105 linkend="chapter-temporary-tools"/> and the 106 <filename>/etc/passwd</filename> and <filename>/etc/group</filename> 107 files have been created, user name and group name resolution will now 108 work.</para> 109 110 <screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen> 111 112 <para>Note the use of the <parameter>+h</parameter> directive. This tells 113 <command>bash</command> not to use its internal path hashing. Without this 114 directive, <command>bash</command> would remember the paths to binaries it has 115 executed. To ensure the use of the newly compiled binaries as soon as they are 116 installed, the <parameter>+h</parameter> directive will be used for the duration 117 of this chapter.</para> 118 119 <para>The <command>login</command>, <command>agetty</command>, and 120 <command>init</command> programs (and others) use a number of log 121 files to record information such as who was logged into the system and 122 when. However, these programs will not write to the log files if they 123 do not already exist. Initialize the log files and give them 124 proper permissions:</para> 125 126 <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} 127 chgrp -v utmp /var/run/utmp /var/log/lastlog 128 chmod -v 664 /var/run/utmp /var/log/lastlog</userinput></screen> 129 130 <para>The <filename>/var/run/utmp</filename> file records the users 131 that are currently logged in. The <filename>/var/log/wtmp</filename> 132 file records all logins and logouts. The 133 <filename>/var/log/lastlog</filename> file records when 134 each user last logged in. The <filename>/var/log/btmp</filename> file 135 records the bad login attempts.</para> 136 23 137 </sect1> -
general.ent
r8eef135 rb340d68c 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!ENTITY version "udev_update-2006040 7">3 <!ENTITY releasedate "April 7, 2006">2 <!ENTITY version "udev_update-20060408"> 3 <!ENTITY releasedate "April 8, 2006"> 4 4 <!ENTITY milestone "6.2"> 5 5 <!ENTITY generic-version "udev_update"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
Note:
See TracChangeset
for help on using the changeset viewer.