Linux Emergency

Linux grub restore

… after having played with partitions.

Let's say that your (new) root is /dev/sda6 - (hd0,5) , in GRUB lingo.

  • Boot with a Knoppix Live CD
  • Mount the real partition, rebind /usr and /proc and chroot to it:
mount /dev/sda6 /mnt
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
chroot /mnt
  • Edit /boot/grub/menu.list if needed
  • Launch grub and issue:
root (hd0,5)
setup (hd0)
quit
  • exit, reboot.

Emergency reboot with SysReq

When all else fails, before hitting the BRS, try:

  • Press and keep pressed both the Alt and SysReq keys
    • If you are using a notebook you could need to keep pressed also the Fn/2nd key
    • It's better to use the AltGr key, if you have it
  • Keeping the two (three) keys pressed, press in sequence: R E I S U B

It'll made you wish you have three hands, but it'll basically kill all the processes and sync the disks before rebooting. Hard, but way better than switching it off and on again.

unix/linux_restore.txt · Last modified: 2009/02/28 20:54 by ap
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki