- Timestamp:
- 10/22/2003 10:26:46 PM (21 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- e91936a
- Parents:
- 1612f40
- Location:
- chapter06
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/adjustingtoolchain.xml
r1612f40 r360e2c4 45 45 <screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs && 46 46 sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \ 47 $SPECFILE >newspecfile &&47 $SPECFILE > newspecfile && 48 48 mv -f newspecfile $SPECFILE && 49 49 unset SPECFILE</userinput></screen> … … 66 66 as expected. For this we are going to perform a simple sanity check:</para> 67 67 68 <screen><userinput>echo 'main(){}' >dummy.c68 <screen><userinput>echo 'main(){}' > dummy.c 69 69 gcc dummy.c 70 70 readelf -l a.out | grep ': /lib'</userinput></screen> -
chapter06/changingowner.xml
r1612f40 r360e2c4 25 25 <screen><userinput>chown -R 0:0 /tools</userinput></screen> 26 26 27 <para>The command uses "0:0" instead of "root:root", because chown is unable 28 to resolve the name "root" until the password file has been created.</para> 27 <para>The command uses "0:0" instead of "root:root", because 28 <userinput>chown</userinput> is unable to resolve the name "root" until the 29 password file has been created.</para> 29 30 30 31 </sect1> -
chapter06/chroot.xml
r1612f40 r360e2c4 22 22 /tools/bin/bash --login</userinput></screen> 23 23 24 <screen><userinput>set +h</userinput></screen>25 26 24 <para>The <userinput>-i</userinput> option given to the 27 25 <userinput>env</userinput> command will clear all variables of the chroot … … 29 27 set again. The TERM=$TERM construct will set the TERM variable inside chroot 30 28 to the same value as outside chroot; this variable is needed for programs 31 like vim and less to operate properly. If you need other variables present, 32 such as CFLAGS or CXXFLAGS, this is a good place to set them again.</para> 33 34 <para>Also note the use of the set +h directive. This tells bash to not use 35 its internal path hashing. Without this directive, bash will remember paths 36 to binaries. Since as we go thru chapter 6, we want to use our newly compiled 37 binaries as soon as they are installed, we turn off this function.</para> 29 like <userinput>vim</userinput> and <userinput>less</userinput> to operate 30 properly. If you need other variables present, such as CFLAGS or CXXFLAGS, 31 this is a good place to set them again.</para> 38 32 39 33 <para>From this point on there's no need to use the LFS variable anymore, -
chapter06/config-shadowpwd.xml
r1612f40 r360e2c4 1 1 <sect2><title> </title><para> </para></sect2> 2 2 3 <sect2><title>Configuring Shadow Password Suite</title>3 <sect2><title>Configuring Shadow</title> 4 4 5 5 <para>This package contains utilities to modify users' passwords, add 6 6 or delete users and groups, and the like. We're not going to explain what 7 'password shadowing' means. A full explanation can be found in the doc/HOWTO 8 file within the unpacked shadow password suite's source tree. There's one 9 thing to keep in mind if you decide to use shadow support: programs that 7 'password shadowing' means. A full explanation can be found in the 8 <filename>doc/HOWTO</filename> 9 file within the unpacked Shadow source tree. There's one 10 thing to keep in mind if you decide to use Shadow support: programs that 10 11 need to verify passwords (for example xdm, ftp daemons, pop3 daemons) need 11 12 to be 'shadow-compliant', that is they need to be able to work with -
chapter06/createfiles.xml
r1612f40 r360e2c4 8 8 we're installing all the software.</para> 9 9 10 <screen><userinput>ln -s /tools/bin/{bash, pwd,cat,stty} /bin10 <screen><userinput>ln -s /tools/bin/{bash,cat,pwd,stty} /bin 11 11 ln -s /tools/bin/perl /usr/bin 12 12 ln -s /tools/lib/libgcc_s.so.1 /usr/lib -
chapter06/creatingdirs.xml
r1612f40 r360e2c4 24 24 <para>Directories are, by default, created with permission mode 755, but this 25 25 isn't desirable for all directories. We will make two changes: one to the home 26 directory of root, and another to the directories for temporary files.</para> 26 directory of <emphasis>root</emphasis>, and another to the directories for 27 temporary files.</para> 27 28 28 29 <screen><userinput>chmod 0750 /root -
chapter06/gcc-2953-inst.xml
r1612f40 r360e2c4 31 31 patch -Np1 -i ../&gcc-2953-no-fixinc-patch; 32 32 patch -Np1 -i ../&gcc-2953-returntype-fix-patch; 33 echo timestamp >gcc/cstamp-h.in</userinput></screen>33 echo timestamp > gcc/cstamp-h.in</userinput></screen> 34 34 35 35 <para>The GCC documentation recommends building GCC outside of the source -
chapter06/makedev-inst.xml
r1612f40 r360e2c4 4 4 <title>Creating devices</title> 5 5 6 <para> Please note that unpacking the MAKEDEV-&makedev-version;.bz2 file7 doesn't create a directory for you to <userinput>cd</userinput> into, as8 the file only contains a singleshell script.</para>6 <para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename> 7 file doesn't create a directory for you to <userinput>cd</userinput> into, as 8 the file contains only a shell script.</para> 9 9 10 <para>Install the MAKEDEVscript:</para>10 <para>Install the <userinput>MAKEDEV</userinput> script:</para> 11 11 12 12 <screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV … … 18 18 ./MAKEDEV -v generic-nopty</userinput></screen> 19 19 20 <para>The meaning of the option:</para>20 <para>The meaning of the arguments:</para> 21 21 22 22 <itemizedlist> 23 <listitem><para><userinput>-v generic-nopty</userinput>: The 24 <userinput>-v</userinput> parameter tells the MAKEDEV script to run in verbose 25 mode. The <userinput>generic-nopty</userinput> parameter instructs MAKEDEV to 26 create a generic selection of commonly used device special files, except for the 27 ptyXX and ttyXX range of files. We don't need those files because we are going 28 to use Unix98 PTYs via the <emphasis>devpts</emphasis> file 29 system.</para></listitem> 23 <listitem><para><userinput>-v</userinput>: This tells the script to run in 24 verbose mode.</para></listitem> 25 26 <listitem><para><userinput>generic-nopty</userinput>: This instructs 27 <userinput>MAKEDEV</userinput> to create a generic selection of commonly used 28 device special files, except for the ptyXX and ttyXX range of files. We don't 29 need those files because we are going to use Unix98 PTYs via the 30 <emphasis>devpts</emphasis> file system.</para></listitem> 30 31 </itemizedlist> 31 32 32 <para>If a device you need is missing, try running33 <userinput>./MAKEDEV -v <device></userinput>. Alternatively, you may 34 create devices via the <emphasis>mknod</emphasis> program. Please refer to 35 the man and info pages of <emphasis>mknod</emphasis>if you need more33 <para>If it turns out that some special device <filename>zzz</filename> that 34 you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>. 35 Alternatively, you may create devices via the <userinput>mknod</userinput> 36 program. Please refer to its man and info pages if you need more 36 37 information.</para> 37 38 -
chapter06/mountproc.xml
r1612f40 r360e2c4 6 6 <emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be 7 7 available within the chroot environment. A file system can be mounted as many 8 times and in as many places as you like, thus it's not a problem that the these8 times and in as many places as you like, thus it's not a problem that these 9 9 file systems are already mounted on your host system -- especially so because 10 10 they are virtual file systems.</para> … … 45 45 without support for the devpts file system. You can check which file systems 46 46 your kernel supports by peeking into its internals with a command such as 47 <userinput>cat /proc/filesystems</userinput>. If for some reason ,devpts is47 <userinput>cat /proc/filesystems</userinput>. If for some reason devpts is 48 48 listed there but the mount still doesn't work, check instead for a different 49 49 file system variety called <emphasis>devfs</emphasis>. If devfs is listed then -
chapter06/perl-inst.xml
r1612f40 r360e2c4 23 23 couple of tests to resolve the name <emphasis>localhost</emphasis>:</para> 24 24 25 <screen><userinput>echo "127.0.0.1 localhost $(hostname)" >/etc/hosts</userinput></screen>25 <screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> 26 26 27 27 <para>Now run the tests, if you wish:</para> -
chapter06/pwdgroup.xml
r1612f40 r360e2c4 50 50 <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen> 51 51 52 <para>Note the use of the <userinput>+h</userinput> directive. This tells 53 <userinput>bash</userinput> not to use its internal path hashing. Without this 54 directive, <userinput>bash</userinput> would remember the paths to binaries it 55 has executed. Since as we go through this chapter, we want to use our newly 56 compiled binaries as soon as they are installed, we turn off this function.</para> 52 57 53 58 </sect1> -
chapter06/shadowpwd-inst.xml
r1612f40 r360e2c4 2 2 3 3 <sect2> 4 <title>Installation of Shadow Password Suite</title>4 <title>Installation of Shadow</title> 5 5 6 6 <para>The <userinput>login</userinput>, <userinput>getty</userinput> and … … 9 9 programs, however, don't create these logfiles when they don't exist, so if 10 10 you want this logging to occur you will have to create the files yourself. 11 To let the Shadow package (that is installed next) detect these files in their 12 proper place, create them now, with their proper permissions:</para> 13 14 <para>Create these files with their proper permissions by running the 15 following commands:</para> 11 The Shadow package needs to detect these files in their proper place, so we 12 create them now, with their proper permissions:</para> 16 13 17 14 <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} … … 36 33 <screen><userinput>touch /usr/bin/passwd</userinput></screen> 37 34 38 <para>The current shadow suite has a problem in the newgrp command which causes39 it to fail. The following patch (also appearing in Shadow's CVS code) fixes 40 this problem.</para>35 <para>The current Shadow suite has a problem that causes in the 36 <userinput>newgrp</userinput> command to fail. The following patch (also 37 appearing in Shadow's CVS code) fixes this problem:</para> 41 38 42 39 <screen><userinput>patch -Np1 -i ../&shadow-patch;</userinput></screen>
Note:
See TracChangeset
for help on using the changeset viewer.