Chroot
Suppose that a directory /dir contains a system (file hierarchy). To change root to it (without booting and logging):
- Boot from a rescue CD or USB disk, e.g., Slackware Setup disk
# for i in /dev /dev/pts /proc /sys; do mount --bind $i /dir$i; done# chroot /dir
To exit from chroot:
# exit# for i in /sys /proc /dev/pts /dev; do umount /dir$i; done
In /etc/fstab the pseudo filesystems can be mounted as follows:
/dev /dir/dev auto bind 0 0 /dev/pts /dir/dev/pts auto bind 0 0 /sys /dir/sys auto bind 0 0 /proc /dir/proc auto bind 0 0