Basically you need to mount a few things like MaGaroo mentioned but be sure to use the right permissions.
This list came from arch-chroot
in arch install scripts but is generally applicable to most Linux distributions.
sudo mount -t proc -o nosuid,noexec,nodev /proc /mnt/chroot/proc
sudo mount -t sysfs -o nosuid,noexec,nodev,ro /sys /mnt/chroot/sys
sudo mount -t efivarfs -o nosuid,noexec,nodev /sys/firmware/efi/efivars /mnt/chroot/sys/firmware/efi/efivars
sudo mount -t devtmpfs -o mode=0755,nosuid /dev /mnt/chroot/dev
sudo mount -t devpts -o mode=0620,gid=5,nosuid,noexec /dev/pts /mnt/chroot/dev/pts
sudo mount -t tmpfs -o mode=1777,nosuid,nodev /dev/shm /mnt/chroot/dev/shm
sudo mount --bind /run /mnt/chroot/run
sudo mount -t tmpfs -o mode=1777,strictatime,nodev,nosuid /tmp /mnt/chroot/tmp
or use an /etc/fstab
file. Please note that with the noauto
option, they won't get mounted automatically, since mounting some of these early on in the booting process might cause problems.
/proc /mnt/chroot/proc proc noauto,nosuid,noexec,nodev 0 0
/sys /mnt/chroot/sys sysfs noauto,nosuid,noexec,nodev,ro 0 0
/sys/fimware/efi/efivarfs /mnt/chroot/sys/firmware/efi/efivars efivarfs noauto,nosuid,noexec,nodev 0 0
/dev /mnt/chroot/dev devtmpfs noauto,mode=0755,nosuid 0 0
/dev/pts /mnt/chroot/dev/pts devpts noauto,mode=0620,gid=5,nosuid,noexec 0 0
/dev/shm /mnt/chroot/dev/shm tmpfs noauto,mode=1777,nosuid,nodev 0 0
/run /mnt/chroot/run none noauto,bind 0 0
/tmp /mnt/chroot/tmp tmpfs noauto,mode=1777,strictatime,nodev,nosuid 0 0
After adding this fstab, you can just mount them with
sudo mount /mnt/chroot/proc
sudo mount /mnt/chroot/sys
sudo mount /mnt/chroot/sys/firmware/efi/efivars
sudo mount /mnt/chroot/dev
sudo mount /mnt/chroot/dev/pts
sudo mount /mnt/chroot/dev/shm
sudo mount /mnt/chroot/run
sudo mount /mnt/chroot/tmp
Note that efivars
might not be there on some older computers so you can remove that if it's not there.
You might also want to mount /etc/resolv.conf
for some networking stuff.