Changeset 0976a9a
- Timestamp:
- 04/02/2006 03:09:47 PM (18 years ago)
- Children:
- 26e2ce40
- Parents:
- 0b528e48
- Files:
-
- 1 added
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter01/changelog.xml
r0b528e48 r0976a9a 36 36 </listitem> 37 37 --> 38 39 <listitem> 40 <para>April 2, 2006</para> 41 <itemizedlist> 42 <listitem> 43 <para>[archaic] - Moved the chowning of /tools to the end of chapter 5 44 and rewrote note about backing up or re-using /tools. Moved the 45 mounting of kernel filesystems before pkgmgt page and rewrote the page 46 to mount --bind /dev and mount all other kernel filesystems while 47 outside chroot. Rewrote note about re-entering chroot and remounting 48 kernel filesystems. Removed /dev from the list of dirs created in 49 chroot and added it before chroot.</para> 50 </listitem> 51 </itemizedlist> 52 </listitem> 38 53 39 54 <listitem> -
chapter05/chapter05.xml
r0b528e48 r0976a9a 45 45 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/> 46 46 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/> 47 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/> 47 48 48 49 </chapter> -
chapter06/chapter06.xml
r0b528e48 r0976a9a 13 13 14 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernfs.xml"/> 15 16 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pkgmgt.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernfs.xml"/>17 17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chroot.xml"/> 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/>19 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingdirs.xml"/> 20 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="createfiles.xml"/> 21 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pwdgroup.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="devices.xml"/>23 21 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/> 24 22 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-pages.xml"/> -
chapter06/chroot.xml
r0b528e48 r0976a9a 45 45 to <command>bash</command>.</para> 46 46 47 <para>It is important that all the commands throughout the remainder of this48 chapter and the following chapters are run from within the chroot environment.49 If you leave this environment for any reason (rebooting for example), remember50 to first mount the <systemitem class="filesystem">proc</systemitem> and51 <systemitem class="filesystem">devpts</systemitem> file systems (discussed52 in the previous section) and enter chroot again before continuing with the53 installations.</para>54 55 47 <para>Note that the <command>bash</command> prompt will say 56 48 <computeroutput>I have no name!</computeroutput> This is normal because the 57 49 <filename>/etc/passwd</filename> file has not been created yet.</para> 58 50 51 <note> 52 <para>It is important that all the commands throughout the remainder of this 53 chapter and the following chapters are run from within the chroot 54 environment. If you leave this environment for any reason (rebooting for 55 example), ensure that the virtual kernel filesystems are mounted as 56 explained in <xref linkend="ch-system-bindmount"/> and <xref 57 linkend="ch-system-kernfsmount"/> and enter chroot again before continuing 58 with the installation.</para> 59 </note> 60 59 61 </sect1> -
chapter06/creatingdirs.xml
r0b528e48 r0976a9a 14 14 standard directory tree by issuing the following commands:</para> 15 15 16 <screen><userinput>install -dv /{bin,boot, dev,etc/opt,home,lib,mnt}16 <screen><userinput>install -dv /{bin,boot,etc/opt,home,lib,mnt} 17 17 install -dv /{sbin,srv,usr/local,var,opt} 18 18 install -dv /root -m 0750 -
chapter06/introduction.xml
r0b528e48 r0976a9a 56 56 these) that the package installs.</para> 57 57 58 <note>59 <para>At this point, you may wish to keep your finished temporary60 tools for use in future LFS builds by creating a tarball of the61 <filename class="directory">/tools</filename> directory and62 storing it in a safe location.</para>63 </note>64 65 58 </sect1> -
chapter06/kernfs.xml
r0b528e48 r0976a9a 9 9 <?dbhtml filename="kernfs.html"?> 10 10 11 <title> Mounting Virtual Kernel File Systems</title>11 <title>Preparing Virtual Kernel File Systems</title> 12 12 13 < para>Various file systems exported by the kernel are used to communicate to and14 from the kernel itself. These file systems are virtual in that no disk space is15 used for them. The content of the file systems resides in memory.</para>13 <indexterm zone="ch-system-kernfs"> 14 <primary sortas="e-/dev/">/dev/*</primary> 15 </indexterm> 16 16 17 <para>Begin by creating directories onto which the file systems will be 18 mounted:</para> 17 <para>Various file systems exported by the kernel are used to communicate to 18 and from the kernel itself. These file systems are virtual in that no disk 19 space is used for them. The content of the file systems resides in 20 memory.</para> 19 21 20 <screen><userinput>mkdir -pv $LFS/{proc,sys}</userinput></screen> 22 <para>Begin by creating directories onto which the file systems will be 23 mounted:</para> 21 24 22 <para>Now mount the file systems:</para>25 <screen><userinput>mkdir -pv $LFS/{dev,proc,sys}</userinput></screen> 23 26 24 <screen><userinput>mount -vt proc proc $LFS/proc 27 <sect2> 28 <title>Creating Initial Device Nodes</title> 29 30 <para>When the kernel boots the system, it requires the presence of a few 31 device nodes, in particular the <filename 32 class="devicefile">console</filename> and <filename 33 class="devicefile">null</filename> devices. The device nodes will be created 34 on the hard disk so that they are available before <command>udev</command> 35 has been started, and additionally when Linux is started in single user mode 36 (hence the restrictive permissions on <filename 37 class="devicefile">console</filename>). Create the devices by running the 38 following commands:</para> 39 40 <screen><userinput>mknod -m 600 $LFS/dev/console c 5 1 41 mknod -m 666 $LFS/dev/null c 1 3</userinput></screen> 42 43 </sect2> 44 45 <sect2 id="ch-system-bindmount"> 46 <title>Mounting and Populating /dev</title> 47 48 <para>The recommended method of populating the <filename 49 class="directory">/dev</filename> directory with devices is to mount a 50 virtual filesystem (such as <systemitem 51 class="filesystem">tmpfs</systemitem>) on the <filename 52 class="directory">/dev</filename> directory, and allow the devices to be 53 created dynamically on that virtual filesystem as they are detected or 54 accessed. This is generally done during the boot process by Udev. Since 55 this new system does not yet have Udev and has not yet been booted, it is 56 necessary to mount and populate <filename 57 class="directory">/dev</filename> manually. This is accomplished by bind 58 mounting the host system's <filename class="directory">/dev</filename> 59 directory. A bind mount is a special type of mount that allows you to 60 create a mirror of a directory or mount point to some other location. Use 61 the following command to achieve this:</para> 62 63 <screen><userinput>mount --bind /dev $LFS/dev</userinput></screen> 64 65 </sect2> 66 67 <sect2 id="ch-system-kernfsmount"> 68 <title>Mounting Virtual Kernel File Systems</title> 69 70 <para>Now mount the remaining virtual kernel filesystems:</para> 71 72 <screen><userinput>mount -vt devpts devpts $LFS/dev/pts 73 mount -vt tmpfs shm $LFS/dev/shm 74 mount -vt proc proc $LFS/proc 25 75 mount -vt sysfs sysfs $LFS/sys</userinput></screen> 26 76 27 <para>Remember that if for any reason you stop working on the LFS 28 system and start again later, it is important to check that these file 29 systems are mounted again before entering the chroot 30 environment.</para> 31 32 <para>Additional file systems will soon be mounted from within the 33 chroot environment. To keep the host up to date, perform a <quote>fake 34 mount</quote> for each of these now:</para> 35 36 <screen><userinput>mount -vft tmpfs tmpfs $LFS/dev 37 mount -vft tmpfs tmpfs $LFS/dev/shm 38 mount -vft devpts -o gid=4,mode=620 devpts $LFS/dev/pts</userinput></screen> 77 </sect2> 39 78 40 79 </sect1> -
chapter06/pkgmgt.xml
r0b528e48 r0976a9a 39 39 the <ulink url="&hints-root;">Hints subproject</ulink> and see if one of them 40 40 fits your need.</para> 41 42 <note>43 <para>As no particular package management technique is mentioned in LFS,44 the commands in the remainder of this book must be performed while logged in45 as user <systemitem class="username">root</systemitem> and no longer as user46 <systemitem class="username">lfs</systemitem>. Also, double check that47 <envar>$LFS</envar> is set.</para>48 </note>49 41 50 42 <sect2> -
general.ent
r0b528e48 r0976a9a 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!ENTITY version "udev_update-20060 330">3 <!ENTITY releasedate " March 30, 2006">2 <!ENTITY version "udev_update-20060402"> 3 <!ENTITY releasedate "April 2, 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.