On Friday 01 August 2014 14:12:46 Peter Humphrey wrote: > On Friday 01 August 2014 14:07:08 I wrote: > > I run a couple of chroots on this box to build packages for other boxes on > > the LAN. So far, I haven't worked out what I should populate /etc/mtab > > with > > in each chroot. Is it enough to "grep ext4 /etc/mtab > > > /mnt/chroot/etc/mtab"? That catches all the physical partitions, but I > > imagine I need to add some /proc, /sys and /dev entries as well, but is > > there a simple formula for doing this? > > I meant to add that one chroot is 32-bit and the other is 64. The host is an > i5 running openrc.
Thanks for your script, Dale, but I already have something like it in /etc/init.d/<chroot>. It's what to put in the chroot's mtab I was asking about. Thanks for your suggestion too, Rich. It gives an even longer list of mounts than the host's mtab. I now realise that I haven't thought this through properly. I want the chroot's mtab to contain references to all the things it can see, and only those, modified if necessary to strip off the path to the chroot itself. Listing all the ext4 file-systems outside the chroot (which it can't see) is stupid. Looks like a manual setup is needed. -- Regards Peter

