From d32239446ba4bfb4f259cf7cef7626cae2283c34 Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Thu, 13 Nov 2003 22:31:27 +0000 Subject: Moving most of chapter 6 intermezzos into a single file. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3081 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/chroot.xml | 56 ---------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 chapter06/chroot.xml (limited to 'chapter06/chroot.xml') diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml deleted file mode 100644 index f733efda3..000000000 --- a/chapter06/chroot.xml +++ /dev/null @@ -1,56 +0,0 @@ - -Entering the chroot environment - - -It is time to enter the chroot environment in order to begin installing -the packages we need. Before you can chroot, however, you need to become -root, since only root -can execute the chroot command. - -Just like earlier, ensure the LFS environment variable is set up properly -by running echo $LFS and ensuring it shows the path to -your LFS partition's mount point, which is -/mnt/lfs if you followed our -example. - -Become root and run the following command -to enter the chroot environment: - -chroot $LFS /tools/bin/env -i \ -    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \ -    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ -    /tools/bin/bash --login - -The -i option given to the -env command will clear all variables of the chroot -environment. After that, only the HOME, TERM, PS1 and PATH variables are -set again. The TERM=$TERM construct will set the TERM variable inside chroot -to the same value as outside chroot; this variable is needed for programs -like vim and less to operate -properly. If you need other variables present, such as CFLAGS or CXXFLAGS, -this is a good place to set them again. - -From this point on there's no need to use the LFS variable anymore, -because everything you do will be restricted to the LFS file system -- since -what the shell thinks is / is actually -the value of $LFS, which was passed to -the chroot command. - -Notice that /tools/bin comes -last in the PATH. This means that a temporary tool will not be used any more -as soon as its final version is installed. Well, at least when the shell -doesn't remember the locations of executed binaries -- for this reason hashing -is switched off a bit further on. - -You have to make sure all the commands in the rest of this chapter and -in the following chapters are run from within the chroot environment. -If you ever leave this environment for any reason (rebooting for example), -you must remember to again enter chroot and mount the proc and devpts -filesystems (discussed later) before continuing with the installations. - -Note that the bash prompt will say "I have no name!" This is -normal, as the /etc/passwd file has not been -created yet. - - - -- cgit v1.2.3-54-g00ecf