Re: bind mount in 32bit chroot
Hi Tong,
Tong wrote:
Hi,
The "bind mount" section in the faq is not clear. I still have things that
I don't understand.
I understand in the chroot environment, at least the following has to be
bind mounted:
/home
/tmp
proc
The faq then goes on:
,-----
| Then mount them:
|
| mount /var/chroot/sid-ia32/home
| mount /var/chroot/sid-ia32/tmp
| mount /var/chroot/sid-ia32/proc
`-----
This is not clear. Should I do it in the chroot environment, or out side
it? If I should do it in the chroot environment, isn't that
"mount /home", etc, much clearer?
You have to do it outside because from inside the chroot you cannot see
--the external-- /home. Therefore while outside the chroot you bind
/home to /var/chroot/sid-ia32/home, as from outside you can see both
mount points.
Q2, how about devices, Shouldn't /dev be bind mounted?
Apparently not, your chroot should have the devices created. I don't
know what the reason is though, so if somebody can enlighten us here we
would both learn something new :)
Q3, to use my devices, e.g., /media/cdrom0, should I use it from
$CHROOT/media/cdrom0 or from chrooted/dev?
/media/cdrom0 $CHROOT/media/cdrom0 none bind 0 0
/media/cdrom1 $CHROOT/media/cdrom1 none bind 0 0
You should always refer to them as /media/cdromX, so you don't have to
switch back and forth between different names depending on where you are.
Q4: I have various volumes mounted below /lfs:
/dev/sda13 on /lfs/cache11 type reiserfs (rw)
/dev/sda14 on /lfs/cache12 type reiserfs (rw)
/dev/sda15 on /lfs/cache13 type reiserfs (rw)
To access them in 32bit chroot, should I bind-mount only one /lfs, or each
volume individually?
You need to user "rbind" mounts if you wish to only mount /lfs and get
all the submounts as well.
Both "bind mount" and "chroot" are new to me. Please help.
So are to me. Fortunately they have really fine manpages/documentation.
Disclaimer: I haven't tested the rbind scenario, I'm just reading that
part from the mount(8) manpage as I write.
Greetings,
--
Javier Kohen <jkohen@users.sourceforge.net>
ICQ: blashyrkh #2361802
Jabber: jkohen@jabber.org
Reply to: