Changeset f1fd69a for boot/common
- Timestamp:
- Jul 1, 2006, 11:52:01 PM (18 years ago)
- Children:
- 6ea30c8
- Parents:
- b18d234
- Location:
- boot/common
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/common/bootscripts.xml
rb18d234 rf1fd69a 25 25 <para>Install the package:</para> 26 26 27 <screen><userinput>make ETCDIR=${ LFS}/etc minimal</userinput></screen>27 <screen><userinput>make ETCDIR=${CLFS}/etc minimal</userinput></screen> 28 28 29 29 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" … … 42 42 xpointer="xpointer(//*[@os='c'])"/> 43 43 44 <screen><userinput>cat > ${ LFS}/etc/sysconfig/clock << "EOF"44 <screen><userinput>cat > ${CLFS}/etc/sysconfig/clock << "EOF" 45 45 <literal># Begin /etc/sysconfig/clock 46 46 -
boot/common/changingowner.xml
rb18d234 rf1fd69a 13 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 <systemitem class="username"> lfs</systemitem>, a user that exists only15 <systemitem class="username">clfs</systemitem>, a user that exists only 16 16 on the host system. For security reasons, the $CLFS root directory and 17 17 all of it subdirectories should be owned by … … 19 19 for $CLFS and its subdirectories by running this command:</para> 20 20 21 <screen os="b"><userinput>chown -Rv root:root ${ LFS}</userinput></screen>21 <screen os="b"><userinput>chown -Rv root:root ${CLFS}</userinput></screen> 22 22 23 23 </sect1> -
boot/common/createfiles.xml
rb18d234 rf1fd69a 16 16 the next chapter after the software has been installed.</para> 17 17 18 <screen><userinput>ln -sv /tools/bin/{bash,cat,grep,pwd,stty} ${ LFS}/bin19 ln -sv /tools/lib/libgcc_s.so{,.1} ${ LFS}/usr/lib20 ln -sv /tools/lib/libstd* ${ LFS}/usr/lib21 ln -sv bash ${ LFS}/bin/sh</userinput></screen>18 <screen><userinput>ln -sv /tools/bin/{bash,cat,grep,pwd,stty} ${CLFS}/bin 19 ln -sv /tools/lib/libgcc_s.so{,.1} ${CLFS}/usr/lib 20 ln -sv /tools/lib/libstd* ${CLFS}/usr/lib 21 ln -sv bash ${CLFS}/bin/sh</userinput></screen> 22 22 23 23 </sect1> -
boot/common/creatingdirs.xml
rb18d234 rf1fd69a 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 os="b">Directories are, by default, created with permission mode 755, … … 35 35 36 36 <para os="c">The first mode change ensures that not just anybody can enter 37 the <filename class="directory">${ LFS}/root</filename> directory—the37 the <filename class="directory">${CLFS}/root</filename> directory—the 38 38 same as a normal user would do with his or her home directory. The 39 39 second mode change makes sure that any user can write to the 40 <filename class="directory">${ LFS}/tmp</filename> and41 <filename class="directory">${ LFS}/var/tmp</filename> directories, but40 <filename class="directory">${CLFS}/tmp</filename> and 41 <filename class="directory">${CLFS}/var/tmp</filename> directories, but 42 42 cannot remove another user's files from them. The latter is prohibited 43 43 by the so-called <quote>sticky bit,</quote> the highest bit (1) in the -
boot/common/devices.xml
rb18d234 rf1fd69a 9 9 <?dbhtml filename="devices.html"?> 10 10 11 <title>Populating ${ LFS}/dev</title>11 <title>Populating ${CLFS}/dev</title> 12 12 13 13 <indexterm zone="ch-boot-devices"> 14 <primary sortas="e-${ LFS}/dev/*">${LFS}/dev/*</primary>14 <primary sortas="e-${CLFS}/dev/*">${CLFS}/dev/*</primary> 15 15 </indexterm> 16 16 … … 35 35 the following commands:</para> 36 36 37 <screen><userinput>mknod -m 600 ${ LFS}/dev/console c 5 138 mknod -m 666 ${ LFS}/dev/null c 1 3</userinput></screen>37 <screen><userinput>mknod -m 600 ${CLFS}/dev/console c 5 1 38 mknod -m 666 ${CLFS}/dev/null c 1 3</userinput></screen> 39 39 40 40 </sect2> -
boot/common/e2fsprogs.xml
rb18d234 rf1fd69a 62 62 <para os="h">Install the binaries and documentation:</para> 63 63 64 <screen os="i"><userinput>make DESTDIR=${ LFS} install</userinput></screen>64 <screen os="i"><userinput>make DESTDIR=${CLFS} install</userinput></screen> 65 65 66 66 <variablelist os="j"> … … 68 68 69 69 <varlistentry> 70 <term><parameter>DESTDIR=${ LFS}</parameter></term>70 <term><parameter>DESTDIR=${CLFS}</parameter></term> 71 71 <listitem> 72 72 <para>The Makefile for e2fsprogs hard-codes a path to the … … 87 87 <para os="ad">Create needed symlinks for a bootable system:</para> 88 88 89 <screen os="ae"><userinput>ln -sv /tools/sbin/{fsck.ext2,fsck.ext3,e2fsck} ${ LFS}/sbin</userinput></screen>89 <screen os="ae"><userinput>ln -sv /tools/sbin/{fsck.ext2,fsck.ext3,e2fsck} ${CLFS}/sbin</userinput></screen> 90 90 91 91 </sect2> -
boot/common/fstab.xml
rb18d234 rf1fd69a 9 9 <?dbhtml filename="fstab.html"?> 10 10 11 <title>Creating the ${ LFS}/etc/fstab File</title>11 <title>Creating the ${CLFS}/etc/fstab File</title> 12 12 13 13 <indexterm zone="ch-boot-fstab"> 14 <primary sortas="e-${ LFS}/etc/fstab">${LFS}/etc/fstab</primary>14 <primary sortas="e-${CLFS}/etc/fstab">${CLFS}/etc/fstab</primary> 15 15 </indexterm> 16 16 17 <para os="a">The <filename>${ LFS}/etc/fstab</filename> file is used by some17 <para os="a">The <filename>${CLFS}/etc/fstab</filename> file is used by some 18 18 programs to determine where file systems are to be mounted by default, 19 19 which must be checked, and in which order. Create a new file systems 20 20 table like this:</para> 21 21 22 <screen><userinput>cat > ${ LFS}/etc/fstab << "EOF"22 <screen><userinput>cat > ${CLFS}/etc/fstab << "EOF" 23 23 <literal># Begin /etc/fstab 24 24 -
boot/common/introduction.xml
rb18d234 rf1fd69a 20 20 partition ($CLFS/bin, $CLFS/usr/lib, etc...), rather than /tools, using the 21 21 "DESTDIR" option with make. This will require the 22 <systemitem class="username"> lfs</systemitem> user to have write access to22 <systemitem class="username">clfs</systemitem> user to have write access to 23 23 the rest of the $CLFS partition, so you will need to temporarily change the 24 ownership of $CLFS to the <systemitem class="username"> lfs</systemitem> user.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 lfs $CLFS</userinput></screen>28 <screen><userinput>chown -v clfs $CLFS</userinput></screen> 29 29 30 30 </sect1> -
boot/common/module-init-tools.xml
rb18d234 rf1fd69a 42 42 xpointer="xpointer(//*[@os='j'])"/> 43 43 44 <screen os="k"><userinput>make DESTDIR="${ LFS}" install</userinput></screen>44 <screen os="k"><userinput>make DESTDIR="${CLFS}" install</userinput></screen> 45 45 46 46 </sect2> -
boot/common/pwdgroup.xml
rb18d234 rf1fd69a 12 12 13 13 <indexterm zone="ch-boot-pwdgroup"> 14 <primary sortas="e-${ LFS}/etc/passwd">${LFS}/etc/passwd</primary>14 <primary sortas="e-${CLFS}/etc/passwd">${CLFS}/etc/passwd</primary> 15 15 </indexterm> 16 16 17 17 <indexterm zone="ch-boot-pwdgroup"> 18 <primary sortas="e-${ LFS}/etc/group">${LFS}/etc/group</primary>18 <primary sortas="e-${CLFS}/etc/group">${CLFS}/etc/group</primary> 19 19 </indexterm> 20 20 21 21 <indexterm zone="ch-boot-pwdgroup"> 22 <primary sortas="e-${ LFS}/var/run/utmp">${LFS}/var/run/utmp</primary>22 <primary sortas="e-${CLFS}/var/run/utmp">${CLFS}/var/run/utmp</primary> 23 23 </indexterm> 24 24 25 25 <indexterm zone="ch-boot-pwdgroup"> 26 <primary sortas="e-${ LFS}/var/log/btmp">${LFS}/var/log/btmp</primary>26 <primary sortas="e-${CLFS}/var/log/btmp">${CLFS}/var/log/btmp</primary> 27 27 </indexterm> 28 28 29 29 <indexterm zone="ch-boot-pwdgroup"> 30 <primary sortas="e-${ LFS}/var/log/lastlog">${LFS}/var/log/lastlog</primary>30 <primary sortas="e-${CLFS}/var/log/lastlog">${CLFS}/var/log/lastlog</primary> 31 31 </indexterm> 32 32 33 33 <indexterm zone="ch-boot-pwdgroup"> 34 <primary sortas="e-${ LFS}/var/log/wtmp">${LFS}/var/log/wtmp</primary>34 <primary sortas="e-${CLFS}/var/log/wtmp">${CLFS}/var/log/wtmp</primary> 35 35 </indexterm> 36 36 37 37 <para>In order for user <systemitem class="username">root</systemitem> to 38 38 be able to login and for the name <quote>root</quote> to be recognized, 39 there must be relevant entries in the <filename>${ LFS}/etc/passwd</filename>40 and <filename>${ LFS}/etc/group</filename> files.</para>39 there must be relevant entries in the <filename>${CLFS}/etc/passwd</filename> 40 and <filename>${CLFS}/etc/group</filename> files.</para> 41 41 42 <para>Create the <filename>${ LFS}/etc/passwd</filename> file by running42 <para>Create the <filename>${CLFS}/etc/passwd</filename> file by running 43 43 the following command:</para> 44 44 45 <screen><userinput>cat > ${ LFS}/etc/passwd << "EOF"45 <screen><userinput>cat > ${CLFS}/etc/passwd << "EOF" 46 46 <literal>root:x:0:0:root:/root:/bin/bash</literal> 47 47 EOF</userinput></screen> … … 51 51 later.</para> 52 52 53 <variablelist os="b"> 54 55 <title>Additional users you may want to add:</title> 56 57 <varlistentry> 58 <term><literal>bin:x:1:1:bin:/bin:/bin/false</literal></term> 59 <listitem> 60 <para>To be written</para> 61 </listitem> 62 </varlistentry> 63 <varlistentry> 64 <term><literal>daemon:x:2:6:daemon:/sbin:/bin/false</literal></term> 65 <listitem> 66 <para>To be written</para> 67 </listitem> 68 </varlistentry> 69 <varlistentry> 70 <term><literal>adm:x:3:16:adm:/var/adm:/bin/false</literal></term> 71 <listitem> 72 <para>To be written</para> 73 </listitem> 74 </varlistentry> 75 <varlistentry> 76 <term><literal>lp:x:10:9:lp:/var/spool/lp:/bin/false</literal></term> 77 <listitem> 78 <para>To be written</para> 79 </listitem> 80 </varlistentry> 81 <varlistentry> 82 <term><literal>mail:x:30:30:mail:/var/mail:/bin/false</literal></term> 83 <listitem> 84 <para>To be written</para> 85 </listitem> 86 </varlistentry> 87 <varlistentry> 88 <term><literal>news:x:31:31:news:/var/spool/news:/bin/false</literal></term> 89 <listitem> 90 <para>To be written</para> 91 </listitem> 92 </varlistentry> 93 <varlistentry> 94 <term><literal>uucp:x:32:32:uucp:/var/spool/uucp:/bin/false</literal></term> 95 <listitem> 96 <para>To be written</para> 97 </listitem> 98 </varlistentry> 99 <varlistentry> 100 <term><literal>operator:x:50:0:operator:/root:/bin/bash</literal></term> 101 <listitem> 102 <para>To be written</para> 103 </listitem> 104 </varlistentry> 105 <varlistentry> 106 <term><literal>postmaster:x:51:30:postmaster:/var/spool/mail:/bin/false</literal></term> 107 <listitem> 108 <para>To be written</para> 109 </listitem> 110 </varlistentry> 111 <varlistentry> 112 <term><literal>nobody:x:65534:65534:nobody:/:/bin/false</literal></term> 113 <listitem> 114 <para>To be written</para> 115 </listitem> 116 </varlistentry> 117 </variablelist> 118 119 <para>Create the <filename>${LFS}/etc/group</filename> file by running 53 <para>Create the <filename>${CLFS}/etc/group</filename> file by running 120 54 the following command:</para> 121 55 122 <screen><userinput>cat > ${ LFS}/etc/group << "EOF"56 <screen><userinput>cat > ${CLFS}/etc/group << "EOF" 123 57 <literal>root:x:0: 124 58 bin:x:1: … … 217 151 proper permissions:</para> 218 152 219 <screen><userinput>touch ${ LFS}/var/run/utmp ${LFS}/var/log/{btmp,lastlog,wtmp}220 chmod -v 664 ${ LFS}/var/run/utmp ${LFS}/var/log/lastlog221 chmod -v 600 ${ LFS}/var/log/btmp</userinput></screen>153 <screen><userinput>touch ${CLFS}/var/run/utmp ${CLFS}/var/log/{btmp,lastlog,wtmp} 154 chmod -v 664 ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog 155 chmod -v 600 ${CLFS}/var/log/btmp</userinput></screen> 222 156 223 <para>The <filename>${ LFS}/var/run/utmp</filename> file records the users224 that are currently logged in. The <filename>${ LFS}/var/log/wtmp</filename>157 <para>The <filename>${CLFS}/var/run/utmp</filename> file records the users 158 that are currently logged in. The <filename>${CLFS}/var/log/wtmp</filename> 225 159 file records all logins and logouts. The 226 <filename>${ LFS}/var/log/lastlog</filename> file records when227 each user last logged in. The <filename>${ LFS}/var/log/btmp</filename> file160 <filename>${CLFS}/var/log/lastlog</filename> file records when 161 each user last logged in. The <filename>${CLFS}/var/log/btmp</filename> file 228 162 records the bad login attempts.</para> 229 163 -
boot/common/settingenviron.xml
rb18d234 rf1fd69a 15 15 <filename>.bash_profile</filename> file now:</para> 16 16 17 <screen><userinput>cat > ${ LFS}/root/.bash_profile << "EOF"17 <screen><userinput>cat > ${CLFS}/root/.bash_profile << "EOF" 18 18 <literal>set +h 19 19 PS1='\u:\w\$ ' -
boot/common/sysvinit.xml
rb18d234 rf1fd69a 28 28 <screen os="ab"><userinput>cp -v src/Makefile src/Makefile.orig 29 29 sed -e 's@root@0@g' \ 30 -e "s@/dev/initctl@${ LFS}&@g" \30 -e "s@/dev/initctl@${CLFS}&@g" \ 31 31 -e 's@\(mknod \)-m \([0-9]* \)\(.* \)p@\1\3p; chmod \2\3@g' \ 32 32 -e "s@/usr/lib@/tools/lib@" \ … … 44 44 xpointer="xpointer(//*[@os='e'])"/> 45 45 46 <screen os="ad"><userinput>make -C src install INSTALL="install" ROOT="${ LFS}"</userinput></screen>46 <screen os="ad"><userinput>make -C src install INSTALL="install" ROOT="${CLFS}"</userinput></screen> 47 47 48 48 </sect2> … … 57 57 58 58 <indexterm zone="conf-tools-sysvinit"> 59 <primary sortas="e-${ LFS}/etc/inittab">${LFS}/etc/inittab</primary>59 <primary sortas="e-${CLFS}/etc/inittab">${CLFS}/etc/inittab</primary> 60 60 </indexterm> 61 61 62 <para os="ae">Create a new file <filename>${ LFS}/etc/inittab</filename> by62 <para os="ae">Create a new file <filename>${CLFS}/etc/inittab</filename> by 63 63 running the following:</para> 64 64 65 <screen os="af"><userinput>cat > ${ LFS}/etc/inittab << "EOF"65 <screen os="af"><userinput>cat > ${CLFS}/etc/inittab << "EOF" 66 66 <literal># Begin /etc/inittab 67 67 -
boot/common/udev-rules.xml
rb18d234 rf1fd69a 9 9 <?dbhtml filename="udev-rules.html"?> 10 10 11 <title>Udev Rules-&udev-cross- lfs-version;</title>11 <title>Udev Rules-&udev-cross-CLFS-version;</title> 12 12 13 13 <indexterm zone="ch-boot-udev-rules"> … … 26 26 xpointer="xpointer(//*[@os='a'])"/> 27 27 28 <screen><userinput>rm -vf ${ LFS}/etc/udev/rules.d/*</userinput></screen>28 <screen><userinput>rm -vf ${CLFS}/etc/udev/rules.d/*</userinput></screen> 29 29 30 30 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" … … 32 32 xpointer="xpointer(//*[@os='c'])"/> 33 33 34 <screen><userinput>make DESTDIR=${ LFS} install-minimal</userinput></screen>34 <screen><userinput>make DESTDIR=${CLFS} install-minimal</userinput></screen> 35 35 36 36 </sect2> -
boot/common/udev.xml
rb18d234 rf1fd69a 33 33 xpointer="xpointer(//*[@os='g'])"/> 34 34 35 <screen os="h"><userinput>make DESTDIR=${ LFS} udevdir=/dev install</userinput></screen>35 <screen os="h"><userinput>make DESTDIR=${CLFS} udevdir=/dev install</userinput></screen> 36 36 37 37 </sect2> -
boot/common/util-linux.xml
rb18d234 rf1fd69a 125 125 <screen os="bi"><userinput>make HAVE_KILL=yes HAVE_SLN=yes HAVE_SHADOW=no \ 126 126 USE_TTY_GROUP=no CPUOPT="" ARCH="" \ 127 CPU="" DESTDIR=${ LFS} install</userinput></screen>127 CPU="" DESTDIR=${CLFS} install</userinput></screen> 128 128 129 129 </sect2> -
boot/common/whatnext.xml
rb18d234 rf1fd69a 12 12 13 13 <para>Now you're at the point to get your <filename 14 class="directory">${ LFS}</filename> directory copied over to your target14 class="directory">${CLFS}</filename> directory copied over to your target 15 15 machine. The easiest method would be to tar it up and copy the file.</para> 16 16 17 <screen><userinput>tar -jcvf ${ LFS}.tar.bz2 ${LFS}</userinput></screen>17 <screen><userinput>tar -jcvf ${CLFS}.tar.bz2 ${CLFS}</userinput></screen> 18 18 19 19 <para>Some others have came up with other ideas on how to do this.
Note:
See TracChangeset
for help on using the changeset viewer.