Dec 7, 2011

Repair GRUB without using LiveCD

  1. Search root disk.
    grub> search -f /vmlinuz -s root

  2. Set root disk.
    grub> root ($root)

  3. Use these commands to find out root disk's information.
    grub> ls -l ($root)

  4. Set linux kernel. There are three ways to do it.

    1. Change the red number with your root disk number. If your root disk is (hd0, msdos1), then use /dev/sda1.
      grub> linux /vmlinuz root=/dev/sda1
    2. Change red text with your disk label, which can get by using ls -l ($root).
      grub> linux /vmlinuz root=LABEL=LABEL
    3. Change red text with your disk uuid, which can also get by using ls ($root).
      grub> linux /vmlinuz root=UUID=UUID
  5. Set ramdisk.
    grub> initrd /initrd.img

  6. Now, you can boot your system.
    grub> boot

  7. When you are logged in, type this command from terminal to fix your grub menu.
    $ sudo update-grub

No comments:

Post a Comment