8

I've got a couple of distributions installed, Gentoo with GRUB2, and openSUSE with some other version of GRUB.

OpenSUSE manages it's kernel entries, and I don't want to have to update my main Gentoo GRUB2 config to copy changes after updating. Currently I hit F8 in the BIOS to select a different disk, but it'd be nice to just go from my main GRUB to openSUSE managed GRUB via a menu entry.

  1. How do I get GRUB2 to load GRUB from another disks MBR?

  2. How do I get GBUB2 to load GRUB from another bootable partition?

  3. How do I get GRUB2 to load GRUB2 from another disks MBR?

  4. How do I get GRUB2 to load GRUB2 from another bootable partition?

Assume I'm on hd0 MBR, and booting to GRUB in hd1 MBR, or (hd1,2) (Second partition).

8

Since I figured this out yesterday I may as well point the answer.

To go from GRUB2 to another MBR you need to do the following

menuentry "Other Disk" {
    insmod part_msdos
    set root='(hd1)'
    drivemap -s hd0 hd1
    chainloader (hd1)+1
}

That is booting my GRUB2 into GRUB managed by OpenSUSE. hd1 could be swapped for any other drive or partition. The drivemap is needed so the other GRUB will find the partitions on hd1 it needs, since the other GRUB (1) will treat the other disk as hd0. To boot off a partition you would change (hd1) to (hd1,2) or whatever partition you want, note the drivemap would omit the partition.

GRUB2 -> GRUB2 should be the same way, though I don't have an install to test this. The config file might work for GRUB2->GRUB2, but I didn't test that either since I'm going form GRUB2 -> GRUB

  • Your answer is not clear enough for a wiki-style forum. What file(s) should be edited? What commands should be issued (update-grub... etc)? – Sopalajo de Arrierez Jan 2 '16 at 23:43
0

May be you want just to load menu? There is configfile command that reads config file you specified and displays menu.

You can also try to load grub2 like kernel image or grub1 with chainloader command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.