This answer to another question basically boils down to chroot
ing into another Linux distribution in order to mainly use that as a replacement to its too restricted (but irreplaceable) parent. The suggested actions before running chroot
, which I would like to understand better, are:
cp /etc/resolv.conf etc/resolv.conf
cp -a /lib/modules/$(uname -r) lib/modules
mount -t proc archproc proc
mount -t sysfs archsys sys
mount -o bind /dev dev
mount -t devpts archdevpts dev/pts
- Copying
resolv.conf
is clear (network/internet access), while I'm not sure about themodules
- this actually seemed unnecessary whenchroot
ing into a stage3 Gentoo system, right? - But why are
proc
,sys
anddev/pts
remounted instead of using bind-mounted? What is the actual difference in this situation, which is "more correct"? - This HowTo bind-mounts
proc
anddev
, but neitherdev/pts
norsys
are mounted at all. Additionally it copies/etc/{hosts,fstab}
over to the new root. Does that make sense? Shouldn't I include/etc/mdadm.conf
then as well?