1 |
On Friday 01 August 2014 14:12:46 Peter Humphrey wrote: |
2 |
> On Friday 01 August 2014 14:07:08 I wrote: |
3 |
> > I run a couple of chroots on this box to build packages for other boxes on |
4 |
> > the LAN. So far, I haven't worked out what I should populate /etc/mtab |
5 |
> > 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 |
Thanks for your script, Dale, but I already have something like it in |
15 |
/etc/init.d/<chroot>. It's what to put in the chroot's mtab I was asking |
16 |
about. |
17 |
|
18 |
Thanks for your suggestion too, Rich. It gives an even longer list of mounts |
19 |
than the host's mtab. |
20 |
|
21 |
I now realise that I haven't thought this through properly. I want the |
22 |
chroot's mtab to contain references to all the things it can see, and only |
23 |
those, modified if necessary to strip off the path to the chroot itself. |
24 |
Listing all the ext4 file-systems outside the chroot (which it can't see) is |
25 |
stupid. |
26 |
|
27 |
Looks like a manual setup is needed. |
28 |
|
29 |
-- |
30 |
Regards |
31 |
Peter |