Monday, December 26, 2011

GRUB: boot manually when messing up linux partition

I have a multiboot PC (XP+OpenSuSE) and messed up the linux partition by making a bad choice in the windows disk management.
So after restart, there was no grub menu, just a grub prompt...
To be able to boot windows (which is the first partition in my case) I followed these steps

Load another boot loader to boot unsupported operating systems

If you want to boot an unsupported operating system (e.g. Windows 95), chain-load a boot loader for the operating system. Normally, the boot loader is embedded in the boot sector of the partition on which the operating system is installed.
  1. Set GRUB's root device to the partition by the command @command{rootnoverify} (see section rootnoverify):
    grub> rootnoverify (hd0,0)
  2. Set the active flag in the partition by the command @command{makeactive}(5) (see section makeactive):
    grub> makeactive
  3. Load the boot loader by the command @command{chainloader} (see section chainloader):
    grub> chainloader +1
    `+1' indicates that GRUB should read one sector from the start of the partition. The complete description about this syntax can be found in section How to specify block lists.
  4. Run the command @command{boot} (see section boot).
However, DOS and Windows have some deficiencies, so you might have to use more complicated instructions. See section DOS/Windows, for more information.

No comments:

Post a Comment