Teminal issues in -dev

Dan Nicholson dbn.lists at gmail.com
Thu Oct 16 10:22:17 PDT 2008

On Thu, Oct 16, 2008 at 8:16 AM, Jeremy Huntwork
<jhuntwork at linuxfromscratch.org> wrote:
> The real issue is that the --bind mount of /dev is unmounted as are
> /proc and /sys. (BTW, this issue would also affect any attempt to use
> the grub installed in chroot, since that needs the devices corresponding
> to your HDs available.) So maybe the better option is to allow a user to
> specify if they don't want those filesystem's unmounted. Of course you'd
> have to include proper warnings at the end of the build or such...

What I was thinking is just to add a couple make targets for this case:

    mount -v --bind /dev $(LFS)/dev
    mount -vt devpts devpts $(LFS)/dev/pts
    mount -vt tmpfs shm $(LFS)/dev/shm
    mount -vt proc proc $(LFS)/proc
    mount -vt sysfs sysfs $(LFS)/sys

    umount -v $(LFS)/dev/pts
    umount -v $(LFS)/dev/shm
    umount -v $(LFS)/proc
    umount -v $(LFS)/sys

chroot: devices
    chroot $(LFS) /tools/bin/env -i \
      HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
      PATH=/bin:/usr/bin:/sbin:/usr/sbin \
      /tools/bin/bash --login
    $(MAKE) teardown

At the end of the build, a message could be output:

"Done building packages. To continue preparing the system as
described in Chapter 7, run:
    make chroot"

Or whatever (I suck at UI). Those targets would probably need to be
made more robust (and handle gaining root privilege), but  you get the


More information about the lfs-dev mailing list