chroot into a different partition

Fast chroot into a different partition - Useful when one needs to fix the filesystem, grub etc in a dual boot scenario.

Host OS - archlinux
Destination - opensuse on /dev/sda2

I always mount /proc and /sys with these options and so far it worked perfectly.

[root@archlinux ovi]# mount /dev/sda2 /media/suse/
[root@archlinux ovi]# mount -o bind /dev /media/suse/dev/
[root@archlinux ovi]# mount -o bind /dev/pts /media/suse/dev/pts
[root@archlinux ovi]# mount -o bind /proc /media/suse/proc/
[root@archlinux ovi]# mount -o bind /sys /media/suse/sys/  
[root@archlinux ovi]# cp /etc/resolv.conf /media/suse/etc/resolv.conf 
[root@archlinux ovi]# chroot /media/suse 
archlinux:/ # cat /etc/os-release 
NAME=openSUSE
VERSION="20140918 (Harlequin)"
VERSION_ID="20140918"
PRETTY_NAME="openSUSE 20140918 (Harlequin) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:20140918"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"
archlinux:/ #