Mounting virtual kernel file systems
Various file systems exported by the kernel don't exist at all on your
hard drive, but are used to communicate things to and from the kernel itself.
Begin by creating directories onto which the file systems will be mounted:
mkdir -p $LFS/{proc,sys}
Now mount the file systems:
mount -t proc proc $LFS/proc
mount -t sysfs sysfs $LFS/sys
Remember that if for any reason you stop working on your LFS, and start
again later, it's important to check that these file systems are mounted again
before entering the chroot environment, otherwise problems could occur.
Shortly, we'll be mounting a few more file systems from within the chroot
environment. To keep the host up-to-date, we'll do a fake mount
for each of these now:
mount -f -t ramfs ramfs $LFS/dev
mount -f -t tmpfs tmpfs $LFS/dev/shm
mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts