No network in chroot environment
Volker Wysk
post at volker-wysk.de
Sat Jan 25 17:58:06 UTC 2020
Am Samstag, den 25.01.2020, 13:17 +0100 schrieb Volker Wysk:
> !?!ยง% I've lost the mail which I habe been writing. Stupid Evolution.
>
> Am Freitag, den 24.01.2020, 23:57 +0100 schrieb Tom H:
> > If you bind-mount "/a" onto "/b".
> >
> > If "/b" is marked as shared, changes under "/a" propagete to "/b"
> > and
> > changes under "/b" propagate to "/a".
> >
> > If "/b" is marked as a slave, changes under "/a" propagete to "/b"
> > and
> > changes under "/b" don't propagate to "/a".
> >
> > There's also "private" and "unbindable".
>
> Great! That's exactly what is needed. I'll do:
>
> mount --rbind /run $mountpoint/run
> mound --rslave $mountpoint/run
^^^^^^^^ typo. Should be "--make-rslave"
> (...)
> chroot $mountpoint
This doesn't work.
Without doing "mount --make-rslave ...", changes to /mnt/rootneu/run
are propagated to /run, as expected. (The new root file system is
mounted at /mnt/rootneu):
# mount --rbind /run /mnt/rootneu/run
# touch /mnt/rootneu/run/xyz
# ls /run/xyz /mnt/rootneu/run/xyz
/mnt/rootneu/run/xyz /run/xyz
# rm /run/xyz
But after doing "mount --make-rslave ...", changes in /mnt/rootneu/run
STILL are propagated to /run:
# mount --make-rslave /mnt/rootneu/run
# touch /mnt/rootneu/run/xyz
# ls /run/xyz /mnt/rootneu/run/xyz
/mnt/rootneu/run/xyz /run/xyz
Have I done something wrong, in the above example?
Goodbye,
Volker
More information about the ubuntu-users
mailing list