Chroot

To chroot into a target system on /dev/sda1 from within a live system:

su -
TARGET=/mnt/targetsystem
PARTITION=/dev/sda1
mkdir -p $TARGET
mount $PARTITION $TARGET
mount --bind /dev     $TARGET/dev
mount --bind /dev/pts $TARGET/dev/pts
mount --bind /proc    $TARGET/proc
mount --bind /sys     $TARGET/sys
# for efi systems:
mount --bind /sys/firmware/efi/efivars $TARGET/sys/firmware/efi/efivars
cp -L /etc/resolv.conf $TARGET/etc/resolv.conf   # ensures internet access in the target system
chroot $TARGET /bin/bash