This answer to another question basically boils down to chrooting 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.confis clear (network/internet access), while I'm not sure about themodules- this actually seemed unnecessary whenchrooting into a stage3 Gentoo system, right? - But why are
proc,sysanddev/ptsremounted instead of using bind-mounted? What is the actual difference in this situation, which is "more correct"? - This HowTo bind-mounts
procanddev, but neitherdev/ptsnorsysare mounted at all. Additionally it copies/etc/{hosts,fstab}over to the new root. Does that make sense? Shouldn't I include/etc/mdadm.confthen as well?