System Rescue

SLES Rescue
Boot the server with installation DVD and choose the item: Rescue System

Load the desired keyboard layout: Rescue:~ # loadkeys sg-latin1

Mount the various filesystems: Rescue:~ # mount /dev/system/root_lv /mnt Rescue:~ # mount /dev/system/var_lv /mnt/var Rescue:~ # mount /dev/sda1 /mnt/boot Rescue:~ # mount -t proc none /mnt/proc Rescue:~ # mount -o bind /dev /mnt/dev Rescue:~ # mount -t sysfs none /mnt/sys

Enter the chroot: Rescue:~ # chroot /mnt

Execute the appropriate commands: [Rescue:root](/) /etc/init.d/network restart [Rescue:root](/) /etc/init.d/sshd restart

[Rescue:root](/) [...]

[Rescue:root](/) exit

Dismount previously mounted filesystems: Rescue:~ # umount /mnt/sys Rescue:~ # umount /mnt/dev Rescue:~ # umount /mnt/proc Rescue:~ # umount /mnt/boot Rescue:~ # umount /mnt/var Rescue:~ # umount /mnt

Reboot the server: Rescue:~ # shutdown -r now

RHEL Rescue
Boot the server with installation DVD and choose the item: Troubleshooting > Rescue a Red Hat Enterprise Linux system

Attempt to mount all filesystems choosing the item: 1) Continue

Load the desired keyboard layout: loadkeys sg-latin1

Enter the chroot: chroot /mnt/sysimage

Execute the appropriate commands:
 * 1) setenforce 0
 * 1) cat /etc/sysconfig/network-scripts/ifcfg-
 * 2) ip link set dev up
 * 3) ip addr add / dev
 * 4) ip route add default via
 * 1) /usr/sbin/sshd -D &


 * 1) yum-complete-transaction
 * 2) yum-complete-transaction --cleanup-only
 * 3) yum history redo last
 * 4) package-cleanup --cleandupes
 * 5) yum update


 * 1) exit

Reboot the server: shutdown -r now