Wiki‎ > ‎

SUSE Rescue mode and chroot

posted May 23, 2016, 6:43 PM by Dong Xu   [ updated May 23, 2016, 6:51 PM ]

1. Start the system with the rescue CD
2. Login with root (no password needed)
3. Mount the / partition.

mount /dev/sdc3 /mnt

mount /dev/sdc1 /mnt/boot

4. Give the command: mount -o bind /dev /mnt/dev

5. Give the command: mount -o bind /proc /mnt/proc

6. Give the command: mount -o bind /sys /mnt/sys

7. Give the command: chroot /mnt --> you could get some errors (e.g. regarding yast). Ignore these errors.

8. Give the command: mount -av

9. The LVM partitions should be available


mount /dev/disk/by-id/md-lg1-lv1  /garlic

mount /dev/disk/by-id/md-lg1-lv0  /backup

You have now completely reconstructed your SUSE environment. So, if you use a command such as PASSWD, the new password is written to the right /etc/shadow file ( the file on your server's hard drive and not the one on your rescue system). All other commands you may wish to use for maintenance will work as well at this point because they'll be able to work on all the original files on your server's hard drive. Once finished, just reboot to start your server as you usually do.