Changeset 2484938
- Timestamp:
- Sep 15, 2006, 7:06:38 AM (18 years ago)
- Children:
- 6ec9929
- Parents:
- 142e52c5
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/common/changingowner.xml
r142e52c5 r2484938 11 11 <title>Changing Ownership</title> 12 12 13 <para os="a">Currently, the <filename class="directory">$ CLFS</filename>13 <para os="a">Currently, the <filename class="directory">${CLFS}</filename> 14 14 directory and all of its subdirectories are owned by the user 15 15 <systemitem class="username">clfs</systemitem>, a user that exists only 16 on the host system. For security reasons, the $ CLFSroot directory and16 on the host system. For security reasons, the ${CLFS} root directory and 17 17 all of it subdirectories should be owned by 18 18 <systemitem class="username">root</systemitem>. Change the ownership 19 for $ CLFSand its subdirectories by running this command:</para>19 for ${CLFS} and its subdirectories by running this command:</para> 20 20 21 21 <screen os="b"><userinput>chown -Rv root:root ${CLFS}</userinput></screen> -
boot/common/devices.xml
r142e52c5 r2484938 21 21 <para>The commands in the remainder of the book should be run as 22 22 the <systemitem class="username">root</systemitem> user. Also, 23 double-check that $ CLFSis set as23 double-check that ${CLFS} is set as 24 24 <systemitem class="username">root</systemitem>.</para> 25 25 </note> -
boot/common/introduction.xml
r142e52c5 r2484938 17 17 <para>There are a few additional packages that will need to be 18 18 installed to allow you to boot the minimal system. Some of these 19 packages will be installed onto theroot or in /usr on the CLFS20 partition ($ CLFS/bin, $CLFS/usr/lib, etc...), rather than /tools, using the19 packages will be installed onto root or in /usr on the CLFS 20 partition (${CLFS}/bin, ${CLFS}/usr/bin, etc...), rather than /tools, using the 21 21 "DESTDIR" option with make. This will require the 22 22 <systemitem class="username">clfs</systemitem> user to have write access to 23 the rest of the $CLFS partition, so you will need to temporarily change the24 ownership of $ CLFSto the <systemitem class="username">clfs</systemitem> user.23 the rest of the CLFS partition, so you will need to temporarily change the 24 ownership of ${CLFS} to the <systemitem class="username">clfs</systemitem> user. 25 25 Run the following command as <systemitem 26 26 class="username">root</systemitem>:</para> 27 27 28 <screen><userinput>chown -v clfs $ CLFS</userinput></screen>28 <screen><userinput>chown -v clfs ${CLFS}</userinput></screen> 29 29 30 30 </sect1> -
chroot/common/chroot.xml
r142e52c5 r2484938 17 17 temporary tools:</para> 18 18 19 <screen><userinput>chroot "$ CLFS" /tools/bin/env -i \20 HOME=/root TERM="$ TERM" PS1='\u:\w\$ ' \19 <screen><userinput>chroot "${CLFS}" /tools/bin/env -i \ 20 HOME=/root TERM="${TERM}" PS1='\u:\w\$ ' \ 21 21 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ 22 22 /tools/bin/bash --login +h</userinput></screen> … … 27 27 <envar>TERM</envar>, <envar>PS1</envar>, and 28 28 <envar>PATH</envar> variables are set again. The 29 <parameter>TERM=$ TERM</parameter> construct will set the29 <parameter>TERM=${TERM}</parameter> construct will set the 30 30 <envar>TERM</envar> variable inside chroot to the same value as 31 31 outside chroot. This variable is needed for programs like … … 38 38 <envar>CLFS</envar> variable anymore, because all work will be 39 39 restricted to the CLFS file system. This is because the Bash shell is 40 told that <filename class="directory">$ CLFS</filename> is now the root40 told that <filename class="directory">${CLFS}</filename> is now the root 41 41 (<filename class="directory">/</filename>) directory.</para> 42 42 -
chroot/common/kernfs.xml
r142e52c5 r2484938 23 23 be mounted:</para> 24 24 25 <screen><userinput>mkdir -pv $ CLFS/{dev,proc,sys}</userinput></screen>25 <screen><userinput>mkdir -pv ${CLFS}/{dev,proc,sys}</userinput></screen> 26 26 27 27 <para>Now mount the file systems:</para> 28 28 29 <screen><userinput>mount -vt proc proc $ CLFS/proc30 mount -vt sysfs sysfs $ CLFS/sys</userinput></screen>29 <screen><userinput>mount -vt proc proc ${CLFS}/proc 30 mount -vt sysfs sysfs ${CLFS}/sys</userinput></screen> 31 31 32 32 <para>Remember that if for any reason you stop working on the CLFS system … … 38 38 starting Udev early in the boot process, so we create them here:</para> 39 39 40 <screen><userinput>mknod -m 600 $ CLFS/dev/console c 5 141 mknod -m 666 $ CLFS/dev/null c 1 3</userinput></screen>40 <screen><userinput>mknod -m 600 ${CLFS}/dev/console c 5 1 41 mknod -m 666 ${CLFS}/dev/null c 1 3</userinput></screen> 42 42 43 43 <para>Once the system is complete and booting, the rest of our device … … 48 48 appear in the new CLFS filesystem:</para> 49 49 50 <screen><userinput>mount -v -o bind /dev $ CLFS/dev</userinput></screen>50 <screen><userinput>mount -v -o bind /dev ${CLFS}/dev</userinput></screen> 51 51 52 52 <para>Additional file systems will soon be mounted from within the chroot … … 54 54 for each of these now:</para> 55 55 56 <screen><userinput>mount -f -vt tmpfs tmpfs $ CLFS/dev/shm57 mount -f -vt devpts -o gid=4,mode=620 devpts $ CLFS/dev/pts</userinput></screen>56 <screen><userinput>mount -f -vt tmpfs tmpfs ${CLFS}/dev/shm 57 mount -f -vt devpts -o gid=4,mode=620 devpts ${CLFS}/dev/pts</userinput></screen> 58 58 59 59 </sect1> -
final-preps/aboutclfs.xml
r142e52c5 r2484938 9 9 <?dbhtml filename="aboutclfs.html"?> 10 10 11 <title>About $ CLFS</title>11 <title>About ${CLFS}</title> 12 12 13 13 <para>Throughout this book, the environment variable <envar>CLFS</envar> will … … 16 16 Check that the <envar>CLFS</envar> variable is set up properly with:</para> 17 17 18 <screen><userinput>echo $ CLFS</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 … … 26 26 27 27 <para>Having this variable set is beneficial in that commands such as 28 <command>install -dv $ CLFS/tools</command> can be typed literally. The shell29 will automatically replace <quote>$ CLFS</quote> with28 <command>install -dv ${CLFS}/tools</command> can be typed literally. The shell 29 will automatically replace <quote>${CLFS}</quote> with 30 30 <quote>/mnt/clfs</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">$ CLFS</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 $ CLFS</userinput></screen>36 <screen><userinput>install -dv ${CLFS}</userinput></screen> 37 37 38 <para>Do not forget to check that <envar>$ CLFS</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 -
final-preps/addinguser.xml
r142e52c5 r2484938 79 79 80 80 <para>Grant <systemitem class="username">clfs</systemitem> full access to 81 <filename class="directory">$ CLFS/cross-tools</filename> and82 <filename class="directory">$ CLFS/tools</filename> by making <systemitem81 <filename class="directory">${CLFS}/cross-tools</filename> and 82 <filename class="directory">${CLFS}/tools</filename> by making <systemitem 83 83 class="username">clfs</systemitem> the directorys' owner:</para> 84 84 85 <screen><userinput>chown -v clfs $ CLFS/tools86 chown -v clfs $ CLFS/cross-tools</userinput></screen>85 <screen><userinput>chown -v clfs ${CLFS}/tools 86 chown -v clfs ${CLFS}/cross-tools</userinput></screen> 87 87 88 88 <para>If a separate working directory was created as suggested, 89 89 give user <systemitem class="username">clfs</systemitem> ownership of this directory:</para> 90 90 91 <screen><userinput>chown -v clfs $ CLFS/sources</userinput></screen>91 <screen><userinput>chown -v clfs ${CLFS}/sources</userinput></screen> 92 92 93 93 <para>Next, login as user <systemitem class="username">clfs</systemitem>. -
final-preps/creatingcrossdir.xml
r142e52c5 r2484938 9 9 <?dbhtml filename="creatingcrossdir.html"?> 10 10 11 <title>Creating the $ CLFS/cross-tools Directory</title>11 <title>Creating the ${CLFS}/cross-tools Directory</title> 12 12 13 13 <para>The cross-binutils and cross-compiler built in 14 14 <xref linkend="chapter-cross-tools"/> will be installed under 15 <filename class="directory">$ CLFS/cross-tools</filename> to keep them15 <filename class="directory">${CLFS}/cross-tools</filename> to keep them 16 16 separate from the host programs. The programs compiled here are 17 17 cross-tools and will not be a part of the final CLFS system or the … … 22 22 <systemitem class="username">root</systemitem>:</para> 23 23 24 <screen><userinput>install -dv $ CLFS/cross-tools</userinput></screen>24 <screen><userinput>install -dv ${CLFS}/cross-tools</userinput></screen> 25 25 26 26 <para>The next step is to create a <filename … … 29 29 Run this command as <systemitem class="username">root</systemitem> as well:</para> 30 30 31 <screen><userinput>ln -sv $ CLFS/cross-tools /</userinput></screen>31 <screen><userinput>ln -sv ${CLFS}/cross-tools /</userinput></screen> 32 32 33 33 <para>The symlink isn't technically necessary (though the book's 34 34 instructions do assume its existence), but is there mainly for 35 consistency (because /tools is also symlinked to $ CLFS/tools) and to35 consistency (because /tools is also symlinked to ${CLFS}/tools) and to 36 36 simplify the installation of the cross-compile tools.</para> 37 37 -
final-preps/creatingtoolsdir.xml
r142e52c5 r2484938 9 9 <?dbhtml filename="creatingtoolsdir.html"?> 10 10 11 <title>Creating the $ CLFS/tools Directory</title>11 <title>Creating the ${CLFS}/tools Directory</title> 12 12 13 13 <para>All programs compiled in <xref linkend="chapter-temp-system"/> 14 will be installed under <filename class="directory">$ CLFS/tools</filename>14 will be installed under <filename class="directory">${CLFS}/tools</filename> 15 15 to keep them separate from the programs compiled in <xref 16 16 linkend="chapter-building-system"/>. The programs compiled here are … … 24 24 <systemitem class="username">root</systemitem>:</para> 25 25 26 <screen><userinput>install -dv $ CLFS/tools</userinput></screen>26 <screen><userinput>install -dv ${CLFS}/tools</userinput></screen> 27 27 28 28 <para>The next step is to create a <filename class="symlink">/tools</filename> … … 31 31 class="username">root</systemitem> as well:</para> 32 32 33 <screen><userinput>ln -sv $ CLFS/tools /</userinput></screen>33 <screen><userinput>ln -sv ${CLFS}/tools /</userinput></screen> 34 34 35 35 <note> -
final-preps/settingenviron.xml
r142e52c5 r2484938 17 17 18 18 <screen os="b"><userinput>cat > ~/.bash_profile << "EOF" 19 <literal>exec env -i HOME=$ HOME TERM=$TERMPS1='\u:\w\$ ' /bin/bash</literal>19 <literal>exec env -i HOME=${HOME} TERM=${TERM} PS1='\u:\w\$ ' /bin/bash</literal> 20 20 EOF</userinput></screen> 21 21 … … 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"> $CLFS/cross-tools</filename> as soon as they are58 <filename class="directory">/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> -
final-system/common/stripping.xml
r142e52c5 r2484938 33 33 <para os="e">Then reenter it with:</para> 34 34 35 <screen os="f" role="nodump"><userinput>chroot $ CLFS/tools/bin/env -i \36 HOME=/root TERM=$ TERMPS1='\u:\w\$ ' \35 <screen os="f" role="nodump"><userinput>chroot ${CLFS} /tools/bin/env -i \ 36 HOME=/root TERM=${TERM} PS1='\u:\w\$ ' \ 37 37 PATH=/bin:/usr/bin:/sbin:/usr/sbin \ 38 38 /tools/bin/bash --login</userinput></screen> -
introduction/common/askforhelp.xml
r142e52c5 r2484938 47 47 </listitem> 48 48 <listitem> 49 <para>The value of the $ CLFS_HOST, $CLFS_TARGET, $BUILD32, and $BUILD6450 environment variables.</para>49 <para>The value of the ${CLFS_HOST}, ${CLFS_TARGET}, ${BUILD32}, and 50 ${BUILD64} environment variables.</para> 51 51 </listitem> 52 52 <listitem> -
materials/common/introduction.xml
r142e52c5 r2484938 30 30 that is conveniently available throughout the entire build. A working 31 31 directory is also required to unpack the sources and build them. 32 <filename class="directory">$ CLFS/sources</filename> can be used both32 <filename class="directory">${CLFS}/sources</filename> can be used both 33 33 as the place to store the tarballs and patches and as a working 34 34 directory. By using this directory, the required elements will be … … 40 40 starting the download session:</para> 41 41 42 <screen><userinput>mkdir -v $ CLFS/sources</userinput></screen>42 <screen><userinput>mkdir -v ${CLFS}/sources</userinput></screen> 43 43 44 44 <para>Make this directory writable and sticky. When a directory is … … 48 48 write and sticky modes:</para> 49 49 50 <screen><userinput>chmod -v a+wt $ CLFS/sources</userinput></screen>50 <screen><userinput>chmod -v a+wt ${CLFS}/sources</userinput></screen> 51 51 52 52 </sect1> -
materials/common/patches.xml
r142e52c5 r2484938 155 155 156 156 <varlistentry> 157 <term>Inetutils FixesPatch - <token>&inetutils-inet_addr_fix-patch-size;</token>:</term>157 <term>Inetutils inet_addr Patch - <token>&inetutils-inet_addr_fix-patch-size;</token>:</term> 158 158 <listitem> 159 159 <para>Download: <ulink -
partitioning/common/mounting.xml
r142e52c5 r2484938 26 26 running:</para> 27 27 28 <screen><userinput>mkdir -pv $ CLFS29 mount -v /dev/<replaceable>[xxx]</replaceable> $ CLFS</userinput></screen>28 <screen><userinput>mkdir -pv ${CLFS} 29 mount -v /dev/<replaceable>[xxx]</replaceable> ${CLFS}</userinput></screen> 30 30 31 31 <para>Replace <replaceable>[xxx]</replaceable> with the designation of … … 36 36 class="directory">/usr</filename>), mount them using:</para> 37 37 38 <screen><userinput>mkdir -pv $ CLFS39 mount -v /dev/<replaceable>[xxx]</replaceable> $ CLFS40 mkdir -v $ CLFS/usr41 mount -v /dev/<replaceable>[yyy]</replaceable> $ CLFS/usr</userinput></screen>38 <screen><userinput>mkdir -pv ${CLFS} 39 mount -v /dev/<replaceable>[xxx]</replaceable> ${CLFS} 40 mkdir -v ${CLFS}/usr 41 mount -v /dev/<replaceable>[yyy]</replaceable> ${CLFS}/usr</userinput></screen> 42 42 43 43 <para>Replace <replaceable>[xxx]</replaceable> and -
prologue/common/typography.xml
r142e52c5 r2484938 40 40 and websites.</para> 41 41 42 <screen role="nodump"><userinput>cat > $ CLFS/etc/group << "EOF"42 <screen role="nodump"><userinput>cat > ${CLFS}/etc/group << "EOF" 43 43 <literal>root:x:0: 44 44 bin:x:1: … … 48 48 <para>This format is used when creating configuration files. The first 49 49 command tells the system to create the file 50 <filename>$ CLFS/etc/group</filename> from whatever is typed on the50 <filename>${CLFS}/etc/group</filename> from whatever is typed on the 51 51 following lines until the sequence end of file (EOF) is encountered. 52 52 Therefore, this entire section is generally typed as seen.</para> -
temp-system/common/introduction.xml
r142e52c5 r2484938 19 19 <para>The tools in this chapter are cross-compiled using the toolchain in 20 20 /cross-tools and will be installed under the 21 <filename class="directory">$ CLFS/tools</filename> directory to keep21 <filename class="directory">${CLFS}/tools</filename> directory to keep 22 22 them separate from the files installed in <xref 23 23 linkend="chapter-building-system"/> and the host production directories. … … 28 28 variable is set up properly:</para> 29 29 30 <screen><userinput>echo $ CLFS</userinput></screen>30 <screen><userinput>echo ${CLFS}</userinput></screen> 31 31 32 32 <para>Make sure the output shows the path to the CLFS partition's mount -
the-end/reboot.xml
r142e52c5 r2484938 37 37 <para>Then unmount the virtual file systems:</para> 38 38 39 <screen><userinput>umount $ CLFS/dev/pts40 umount $ CLFS/dev/shm41 umount $ CLFS/dev42 umount $ CLFS/proc43 umount $ CLFS/sys</userinput></screen>39 <screen><userinput>umount ${CLFS}/dev/pts 40 umount ${CLFS}/dev/shm 41 umount ${CLFS}/dev 42 umount ${CLFS}/proc 43 umount ${CLFS}/sys</userinput></screen> 44 44 45 45 <para>Unmount the CLFS file system itself:</para> 46 46 47 <screen><userinput>umount $ CLFS</userinput></screen>47 <screen><userinput>umount ${CLFS}</userinput></screen> 48 48 49 49 <para>If multiple partitions were created, unmount the other 50 50 partitions before unmounting the main one, like this:</para> 51 51 52 <screen><userinput>umount $ CLFS/usr53 umount $ CLFS/home54 umount $ CLFS</userinput></screen>52 <screen><userinput>umount ${CLFS}/usr 53 umount ${CLFS}/home 54 umount ${CLFS}</userinput></screen> 55 55 56 56 <para>Now, reboot the system with:</para>
Note:
See TracChangeset
for help on using the changeset viewer.