Home » Tutorials » Mounting system in recovery mode

Mounting system in recovery mode

Needed to mount a system in a recovery mode to be able to chroot into it and run updates to attempt to fix it.
Steps required were:

$ mkdir /oldsystem
$ mount /dev/sdb1 /oldsystem
$ mount --bind /dev /oldsystem/dev
$ mount -t proc none /oldsystem/proc
$ mount -t sysfs none /oldsystem/sys
$ chroot /oldsystem

You can replace ‘/oldsystem’ with the path of your liking really.

Have fun fixing stuff 😀

EDIT: Now it ended being a i686 kernel, my recovery was a 64bit therefore yum update was out of question. Way around it was changing the $basearch in the yum.repos.d files. Quick sed command below will do exactly that:

$ sed -i 's|$basearch|i386|g' /etc/yum.repos.d/CentOS-*
Posted in Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.