Changeset 586feb7 in clfs-sysroot for BOOK/final-preps
- Timestamp:
- Jul 2, 2006, 12:45:15 PM (18 years ago)
- Branches:
- master
- Children:
- 940e6b3
- Parents:
- 89c10a9
- Location:
- BOOK/final-preps
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
BOOK/final-preps/aboutclfs.xml
r89c10a9 r586feb7 9 9 <?dbhtml filename="aboutlfs.html"?> 10 10 11 <title>About $ LFS</title>11 <title>About $CLFS</title> 12 12 13 13 <para>Throughout this book, the environment variable <envar>LFS</envar> will … … 16 16 Check that the <envar>LFS</envar> variable is set up properly with:</para> 17 17 18 <screen><userinput>echo $ LFS</userinput></screen>18 <screen><userinput>echo $CLFS</userinput></screen> 19 19 20 20 <para>Make sure the output shows the path to the CLFS partition's mount … … 23 23 variable can be set with:</para> 24 24 25 <screen><userinput>export LFS=/mnt/lfs</userinput></screen>25 <screen><userinput>export CLFS=/mnt/lfs</userinput></screen> 26 26 27 27 <para>Having this variable set is beneficial in that commands such as 28 <command>install -d $ LFS/tools</command> can be typed literally. The shell29 will automatically replace <quote>$ LFS</quote> with28 <command>install -d $CLFS/tools</command> can be typed literally. The shell 29 will automatically replace <quote>$CLFS</quote> with 30 30 <quote>/mnt/lfs</quote> (or whatever the variable was set to) when it 31 31 processes the command line.</para> 32 32 33 <para>If you haven't created the <filename class="directory">$ LFS</filename>33 <para>If you haven't created the <filename class="directory">$CLFS</filename> 34 34 directory, do so at this time by issuing the following commands:</para> 35 35 36 <screen><userinput>install -dv $ LFS</userinput></screen>36 <screen><userinput>install -dv $CLFS</userinput></screen> 37 37 38 <para>Do not forget to check that <envar>$ LFS</envar> is set whenever38 <para>Do not forget to check that <envar>$CLFS</envar> is set whenever 39 39 you leave and reenter the current working environment (as when doing a 40 40 <quote>su</quote> to <systemitem class="username">root</systemitem> or -
BOOK/final-preps/addinguser.xml
r89c10a9 r586feb7 9 9 <?dbhtml filename="addinguser.html"?> 10 10 11 <title>Adding the LFS User</title>11 <title>Adding the CLFS User</title> 12 12 13 13 <para>When logged in as user <systemitem class="username">root</systemitem>, … … 16 16 You could use your own user name, but to make it easier to set up a clean 17 17 work environment, create a new user called <systemitem 18 class="username"> lfs</systemitem> as a member of a new group (also named19 <systemitem class="groupname"> lfs</systemitem>) and use this user during18 class="username">clfs</systemitem> as a member of a new group (also named 19 <systemitem class="groupname">clfs</systemitem>) and use this user during 20 20 the installation process. As <systemitem class="username">root</systemitem>, 21 21 issue the following commands to add the new user:</para> 22 22 23 <screen><userinput>groupadd lfs24 useradd -s /bin/bash -g lfs -m -k /dev/nulllfs</userinput></screen>23 <screen><userinput>groupadd clfs 24 useradd -s /bin/bash -g clfs -m -k /dev/null clfs</userinput></screen> 25 25 26 26 <variablelist> … … 31 31 <listitem> 32 32 <para>This makes <command>bash</command> the default shell for 33 user <systemitem class="username"> lfs</systemitem>.</para>33 user <systemitem class="username">clfs</systemitem>.</para> 34 34 </listitem> 35 35 </varlistentry> 36 36 37 37 <varlistentry> 38 <term><parameter>-g lfs</parameter></term>38 <term><parameter>-g clfs</parameter></term> 39 39 <listitem> 40 <para>This option adds user <systemitem class="username"> lfs</systemitem>41 to group <systemitem class="groupname"> lfs</systemitem>.</para>40 <para>This option adds user <systemitem class="username">clfs</systemitem> 41 to group <systemitem class="groupname">clfs</systemitem>.</para> 42 42 </listitem> 43 43 </varlistentry> … … 47 47 <listitem> 48 48 <para>This creates a home directory for <systemitem 49 class="username"> lfs</systemitem>.</para>49 class="username">clfs</systemitem>.</para> 50 50 </listitem> 51 51 </varlistentry> … … 69 69 </variablelist> 70 70 71 <para>To log in as <systemitem class="username"> lfs</systemitem> (as72 opposed to switching to user <systemitem class="username"> lfs</systemitem>71 <para>To log in as <systemitem class="username">clfs</systemitem> (as 72 opposed to switching to user <systemitem class="username">clfs</systemitem> 73 73 when logged in as <systemitem class="username">root</systemitem>, which 74 does not require the <systemitem class="username"> lfs</systemitem> user75 to have a password), give <systemitem class="username"> lfs</systemitem>74 does not require the <systemitem class="username">clfs</systemitem> user 75 to have a password), give <systemitem class="username">clfs</systemitem> 76 76 a password:</para> 77 77 78 <screen><userinput>passwd lfs</userinput></screen>78 <screen><userinput>passwd clfs</userinput></screen> 79 79 80 <para>Grant <systemitem class="username"> lfs</systemitem> full access to81 <filename class="directory">$ LFS</filename> by making <systemitem80 <para>Grant <systemitem class="username">clfs</systemitem> full access to 81 <filename class="directory">$CLFS</filename> by making <systemitem 82 82 class="username">lfs</systemitem> the directory's owner:</para> 83 83 84 <screen><userinput>chown -Rv lfs $LFS</userinput></screen>84 <screen><userinput>chown -Rv clfs $CLFS</userinput></screen> 85 85 86 <para>Next, login as user <systemitem class="username"> lfs</systemitem>.86 <para>Next, login as user <systemitem class="username">clfs</systemitem>. 87 87 This can be done via a virtual console, through a display manager, or 88 88 with the following substitute user command:</para> 89 89 90 <screen><userinput>su - lfs</userinput></screen>90 <screen><userinput>su - clfs</userinput></screen> 91 91 92 92 <para>The <quote><parameter>-</parameter></quote> instructs -
BOOK/final-preps/chapter.xml
r89c10a9 r586feb7 12 12 <title>Final Preparations</title> 13 13 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="about lfs.xml"/>14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutclfs.xml"/> 15 15 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="addinguser.xml"/> 16 16 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="settingenviron.xml"/> -
BOOK/final-preps/creatingdirs.xml
r89c10a9 r586feb7 14 14 standard directory tree by issuing the following commands:</para> 15 15 16 <screen><userinput>mkdir -pv ${ LFS}/{bin,boot,dev,etc/opt,home,lib,mnt,opt}17 mkdir -pv ${ LFS}/{proc,media/{floppy,cdrom},sbin,srv,sys,var}18 install -dv -m 0750 ${ LFS}/root19 install -dv -m 1777 ${ LFS}{/var,}/tmp20 mkdir -pv ${ LFS}/usr/{,local/}{bin,include,lib,sbin,src}21 mkdir -pv ${ LFS}/usr/{,local/}share/{doc,info,locale,man}22 mkdir -v ${ LFS}/usr/{,local/}share/{misc,terminfo,zoneinfo}23 mkdir -pv ${ LFS}/usr/{,local/}share/man/man{1..8}24 for dir in ${ LFS}/usr{,/local}; do16 <screen><userinput>mkdir -pv ${CLFS}/{bin,boot,dev,etc/opt,home,lib,mnt,opt} 17 mkdir -pv ${CLFS}/{proc,media/{floppy,cdrom},sbin,srv,sys,var} 18 install -dv -m 0750 ${CLFS}/root 19 install -dv -m 1777 ${CLFS}{/var,}/tmp 20 mkdir -pv ${CLFS}/usr/{,local/}{bin,include,lib,sbin,src} 21 mkdir -pv ${CLFS}/usr/{,local/}share/{doc,info,locale,man} 22 mkdir -v ${CLFS}/usr/{,local/}share/{misc,terminfo,zoneinfo} 23 mkdir -pv ${CLFS}/usr/{,local/}share/man/man{1..8} 24 for dir in ${CLFS}/usr{,/local}; do 25 25 ln -sv share/{man,doc,info} $dir 26 26 done 27 mkdir -v ${ LFS}/var/{lock,log,mail,run,spool}28 mkdir -pv ${ LFS}/var/{opt,cache,lib/{misc,locate},local}</userinput></screen>27 mkdir -v ${CLFS}/var/{lock,log,mail,run,spool} 28 mkdir -pv ${CLFS}/var/{opt,cache,lib/{misc,locate},local}</userinput></screen> 29 29 30 30 <para>Directories are, by default, created with permission mode 755, but -
BOOK/final-preps/creatingfiles.xml
r89c10a9 r586feb7 24 24 25 25 <indexterm zone="ch-final-preps-creatingfiles"> 26 <primary sortas="e-${ LFS}/var/log/btmp">/var/log/btmp</primary>26 <primary sortas="e-${CLFS}/var/log/btmp">/var/log/btmp</primary> 27 27 </indexterm> 28 28 … … 41 41 utilities that expect the presence of <filename>/etc/mtab</filename>:</para> 42 42 43 <screen><userinput>touch ${ LFS}/etc/mtab</userinput></screen>43 <screen><userinput>touch ${CLFS}/etc/mtab</userinput></screen> 44 44 45 45 <para>In order for user <systemitem class="username">root</systemitem> to be … … 51 51 command:</para> 52 52 53 <screen><userinput>cat > ${ LFS}/etc/passwd << "EOF"53 <screen><userinput>cat > ${CLFS}/etc/passwd << "EOF" 54 54 <literal>root:x:0:0:root:/root:/bin/bash</literal> 55 55 EOF</userinput></screen> … … 58 58 (the <quote>x</quote> used here is just a placeholder) will be set later.</para> 59 59 60 <variablelist os="b">TO BE WRITTEN: more text describing additional users 61 62 <title>Additional users you may want to add:</title> 63 64 <varlistentry> 65 <term><literal>bin:x:1:1:bin:/bin:/bin/false</literal></term> 66 <listitem> 67 <para>To be written</para> 68 </listitem> 69 </varlistentry> 70 <varlistentry> 71 <term><literal>daemon:x:2:6:daemon:/sbin:/bin/false</literal></term> 72 <listitem> 73 <para>To be written</para> 74 </listitem> 75 </varlistentry> 76 <varlistentry> 77 <term><literal>adm:x:3:16:adm:/var/adm:/bin/false</literal></term> 78 <listitem> 79 <para>To be written</para> 80 </listitem> 81 </varlistentry> 82 <varlistentry> 83 <term><literal>lp:x:10:9:lp:/var/spool/lp:/bin/false</literal></term> 84 <listitem> 85 <para>To be written</para> 86 </listitem> 87 </varlistentry> 88 <varlistentry> 89 <term><literal>mail:x:30:30:mail:/var/mail:/bin/false</literal></term> 90 <listitem> 91 <para>To be written</para> 92 </listitem> 93 </varlistentry> 94 <varlistentry> 95 <term><literal>news:x:31:31:news:/var/spool/news:/bin/false</literal></term> 96 <listitem> 97 <para>To be written</para> 98 </listitem> 99 </varlistentry> 100 <varlistentry> 101 <term><literal>uucp:x:32:32:uucp:/var/spool/uucp:/bin/false</literal></term> 102 <listitem> 103 <para>To be written</para> 104 </listitem> 105 </varlistentry> 106 <varlistentry> 107 <term><literal>operator:x:50:0:operator:/root:/bin/bash</literal></term> 108 <listitem> 109 <para>To be written</para> 110 </listitem> 111 </varlistentry> 112 <varlistentry> 113 <term><literal>postmaster:x:51:30:postmaster:/var/spool/mail:/bin/false</literal></term> 114 <listitem> 115 <para>To be written</para> 116 </listitem> 117 </varlistentry> 118 <varlistentry> 119 <term><literal>nobody:x:65534:65534:nobody:/:/bin/false</literal></term> 120 <listitem> 121 <para>To be written</para> 122 </listitem> 123 </varlistentry> 124 </variablelist> 125 60 126 <para>Create the <filename>/etc/group</filename> file by running the following 61 127 command:</para> 62 128 63 <screen><userinput>cat > ${ LFS}/etc/group << "EOF"129 <screen><userinput>cat > ${CLFS}/etc/group << "EOF" 64 130 <literal>root:x:0: 65 131 bin:x:1: … … 80 146 EOF</userinput></screen> 81 147 148 <variablelist os="c"> 149 150 <title>Additional groups you may want to add</title> 151 152 <varlistentry> 153 <term><literal>adm:x:16:root,adm,daemon</literal></term> 154 <listitem> 155 <para>To be written</para> 156 </listitem> 157 </varlistentry> 158 <varlistentry> 159 <term><literal>console:x:17:</literal></term> 160 <listitem> 161 <para>To be written</para> 162 </listitem> 163 </varlistentry> 164 <varlistentry> 165 <term><literal>cdrw:x:18:</literal></term> 166 <listitem> 167 <para>To be written</para> 168 </listitem> 169 </varlistentry> 170 <varlistentry> 171 <term><literal>mail:x:30:mail</literal></term> 172 <listitem> 173 <para>Used by MTAs (Mail Transport Agents)</para> 174 </listitem> 175 </varlistentry> 176 <varlistentry> 177 <term><literal>news:x:31:news</literal></term> 178 <listitem> 179 <para>To be written</para> 180 </listitem> 181 </varlistentry> 182 <varlistentry> 183 <term><literal>uucp:x:32:uucp</literal></term> 184 <listitem> 185 <para>To be written</para> 186 </listitem> 187 </varlistentry> 188 <varlistentry> 189 <term><literal>users:x:100:</literal></term> 190 <listitem> 191 <para>To be written</para> 192 </listitem> 193 </varlistentry> 194 <varlistentry> 195 <term><literal>nogroup:x:65533:</literal></term> 196 <listitem> 197 <para>To be written</para> 198 </listitem> 199 </varlistentry> 200 <varlistentry> 201 <term><literal>nobody:x:65534:</literal></term> 202 <listitem> 203 <para>To be written</para> 204 </listitem> 205 </varlistentry> 206 </variablelist> 207 82 208 <para>The created groups are not part of any standard—they are groups 83 209 decided on in part by the requirements of the Udev configuration in this … … 98 224 proper permissions:</para> 99 225 100 <screen><userinput>touch ${ LFS}/var/run/utmp ${LFS}/var/log/{btmp,lastlog,wtmp}101 chmod -v 664 ${ LFS}/var/run/utmp ${LFS}/var/log/lastlog</userinput></screen>226 <screen><userinput>touch ${CLFS}/var/run/utmp ${CLFS}/var/log/{btmp,lastlog,wtmp} 227 chmod -v 664 ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog</userinput></screen> 102 228 103 229 <para>The <filename>/var/run/utmp</filename> file records the users -
BOOK/final-preps/settingenviron.xml
r89c10a9 r586feb7 13 13 <para os="a">Set up a good working environment by creating two new startup 14 14 files for the <command>bash</command> shell. While logged in as user 15 <systemitem class="username"> lfs</systemitem>, issue the following15 <systemitem class="username">clfs</systemitem>, issue the following 16 16 command to create a new <filename>.bash_profile</filename>:</para> 17 17 … … 20 20 EOF</userinput></screen> 21 21 22 <para os="c">When logged on as user <systemitem class="username"> lfs</systemitem>,22 <para os="c">When logged on as user <systemitem class="username">clfs</systemitem>, 23 23 the initial shell is usually a <emphasis>login</emphasis> shell which 24 24 reads the <filename>/etc/profile</filename> of the host (probably … … 42 42 <literal>set +h 43 43 umask 022 44 LFS=/mnt/lfs44 CLFS=/mnt/clfs 45 45 LC_ALL=POSIX 46 PATH=${ LFS}/cross-tools/bin:/bin:/usr/bin46 PATH=${CLFS}/cross-tools/bin:/bin:/usr/bin 47 47 export LFS LC_ALL PATH</literal> 48 48 EOF</userinput></screen> … … 56 56 the shell will always search the <envar>PATH</envar> when a program is to 57 57 be run. As such, the shell will find the newly compiled tools in 58 <filename class="directory">$ LFS${LFS}/cross-tools</filename> as soon as they are58 <filename class="directory">$CLFS${CLFS}/cross-tools</filename> as soon as they are 59 59 available without remembering a previous version of the same program in a 60 60 different location.</para> … … 66 66 mode 644 and directories with mode 755).</para> 67 67 68 <para os="h">The <envar> LFS</envar> variable should be set to the68 <para os="h">The <envar>CLFS</envar> variable should be set to the 69 69 chosen mount point.</para> 70 70 … … 80 80 the chroot environment.</para> 81 81 82 <para os="j">By putting <filename class="directory">${ LFS}/cross-tools/bin</filename>82 <para os="j">By putting <filename class="directory">${CLFS}/cross-tools/bin</filename> 83 83 at the beginning of the <envar>PATH</envar>, the cross-compiler 84 84 built in <xref linkend="chapter-cross-tools"/> will be picked up by
Note:
See TracChangeset
for help on using the changeset viewer.