On Fri, Aug 1, 2014 at 8:12 AM, Peter Humphrey <pe...@prh.myzen.co.uk> 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.
As Rich already pointed out, just make /etc/mtab a symlink from /proc/self/mounts. If there is more mount points there than the ones you need, grep -v'd them. And just for completeness, systemd actually requires /etc/mtab as a link to /proc/self/mounts, so don't be surprised if software in the future in Linux just assumes that. Saludos. -- Canek Peláez Valdés Profesor de asignatura, Facultad de Ciencias Universidad Nacional Autónoma de México