1 |
On Fri, Aug 1, 2014 at 8:12 AM, Peter Humphrey <peter@××××××××××××.uk> wrote: |
2 |
> On Friday 01 August 2014 14:07:08 I wrote: |
3 |
> |
4 |
>> I run a couple of chroots on this box to build packages for other boxes on |
5 |
>> the LAN. So far, I haven't worked out what I should populate /etc/mtab with |
6 |
>> in each chroot. Is it enough to "grep ext4 /etc/mtab > |
7 |
>> /mnt/chroot/etc/mtab"? That catches all the physical partitions, but I |
8 |
>> imagine I need to add some /proc, /sys and /dev entries as well, but is |
9 |
>> there a simple formula for doing this? |
10 |
> |
11 |
> I meant to add that one chroot is 32-bit and the other is 64. The host is an |
12 |
> i5 running openrc. |
13 |
|
14 |
As Rich already pointed out, just make /etc/mtab a symlink from |
15 |
/proc/self/mounts. If there is more mount points there than the ones |
16 |
you need, grep -v'd them. |
17 |
|
18 |
And just for completeness, systemd actually requires /etc/mtab as a |
19 |
link to /proc/self/mounts, so don't be surprised if software in the |
20 |
future in Linux just assumes that. |
21 |
|
22 |
Saludos. |
23 |
-- |
24 |
Canek Peláez Valdés |
25 |
Profesor de asignatura, Facultad de Ciencias |
26 |
Universidad Nacional Autónoma de México |