From cb23c1a6ab0a3c279df1f453ef9585b062963ec4 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Mon, 20 Jan 2014 01:18:30 +0000 Subject: Added a Chapter 5 build of util-linux in preparation for moving the Chapter 6 build to after udev. This satisfies a circular dependency. This is not the complete fix as this build has not yet been incorporated into Chapter 6. Mount /run as a tmpfs for Chapter 6. This allows use by test processes during Chapter 6 without carying the files over to the new system. Other minor cleanups. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10447 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/creatingdirs.xml | 2 +- chapter06/kernfs.xml | 16 ++++++---------- chapter06/revisedchroot.xml | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'chapter06') diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml index aec7d25ec..65553e8d5 100644 --- a/chapter06/creatingdirs.xml +++ b/chapter06/creatingdirs.xml @@ -13,7 +13,7 @@ It is time to create some structure in the LFS file system. Create a standard directory tree by issuing the following commands: -mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt,run} +mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt} mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} install -dv -m 0750 /root install -dv -m 1777 /tmp /var/tmp diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml index bfd583455..860cdfc00 100644 --- a/chapter06/kernfs.xml +++ b/chapter06/kernfs.xml @@ -22,7 +22,7 @@ Begin by creating directories onto which the file systems will be mounted: -mkdir -pv $LFS/{dev,proc,sys} +mkdir -pv $LFS/{dev,proc,sys,run} Creating Initial Device Nodes @@ -70,7 +70,8 @@ mknod -m 666 $LFS/dev/null c 1 3 mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620 mount -vt proc proc $LFS/proc -mount -vt sysfs sysfs $LFS/sys +mount -vt sysfs sysfs $LFS/sys +mount -vt tmpfs tmpfs $LFS/run The meaning of the mount options for devpts: @@ -102,16 +103,11 @@ mount -vt sysfs sysfs $LFS/sys In some host systems, /dev/shm is a symbolic link to /run/shm. - Inside a chroot environment, this temporary file system needs - to be mounted separate from the host file system: + The /run tmpfs was mounted above so in this case only a + directory needs to be created. if [ -h $LFS/dev/shm ]; then - link=$(readlink $LFS/dev/shm) - mkdir -pv $LFS/$link - mount -vt tmpfs shm $LFS/$link - unset link -else - mount -vt tmpfs shm $LFS/dev/shm + mkdir -pv $LFS/$(readlink $LFS/dev/shm) fi diff --git a/chapter06/revisedchroot.xml b/chapter06/revisedchroot.xml index 6c4579a1e..8927a9f29 100644 --- a/chapter06/revisedchroot.xml +++ b/chapter06/revisedchroot.xml @@ -12,7 +12,7 @@ Finally, clean up some extra files left around from running tests: -rm -rf /run/* /tmp/* +rm -rf /tmp/* From now on, when reentering the chroot environment after exiting, use the following modified chroot command: -- cgit v1.2.3-54-g00ecf