2013-07-16

Mount and chroot into a foreign Linux partition

Scenario: I have a Linux root partition that isn't booting properly. I need to chroot into it. How to do that?

Answer:
# mount /dev/[something] /mnt
# cd /mnt
# mount -t proc proc proc/
# mount -t sysfs sys sys/
# mount -o bind /dev dev/

After this, I should be able to chroot in and execute binaries (e.g. Yast), update grub (but watch out for /boot), etc.


No comments:

Post a Comment