Tuesday, July 9, 2013

Booting in Linux Rescue Mode

1) Boot from DVD or other image file

2) Select rescue mode
linux rescue
linux rescue mpath

3) Once the rescue environment finishes booting, choose a language to use.

4) Select keyboard layout to use.

5) Wait for network interfaces to be located, and activate them, so that requested data can be transferred to another host.

6) The rescue environment will try to find the current Red Hat installation on the system. You will be prompted with the below options:
For this you will want to skip having Rescue Mode search for partitions. Make sure to boot into rescue mode to not automatically detect the partitions. 

7) Use the  fdisk -l command to find boot. This will be marked with an * <-- boot="" c0d0p1="" can="" cciss="" div="" either="" for="" is="" know="" mount.="" or="" sda1="" show="" something="" the="" then="" this="" what="" will="" you="">

8)If LVM is used:
Scan for metadata:
# lvm pvscan 
# lvm vgscan
# lvm lvscan

# lvm lvdisplay to find out what lv is root
# lvm vgchange -ay /dev/volgroup   to activate

May want to run fsck on these filsystems  <---- div="" important="">



Then start creating the chroot environment:
1. #mkdir /mnt/sysimage

** # mount /dev/vg00/logvolroot /mnRescuet/sysimage **

2. #mount /dev/sd1 /mnt/sysimage/  <----root div="">
3. #mount /dev/dcciss/c0d0p1 /mnt/sysimage/boot <---- boot="" div="">
4. #mount /dev/cciss/c0d0p2 /mnt/sysimage/opt <---- div="" opt="">

Then you have to mount proc, sys, and dev regardless:
5. # mount -o bind /proc /mnt/sysimage/proc
6. # mount -o bind /sys /mnt/sysimage/sys
7. # mount -o bind /dev /mnt/sysimage/dev
8. # mount -o bind /usr /mnt/sysimage/usr

Then you should be able to chroot in.
9. # chroot /mnt/sysimage

No comments:

Post a Comment