openSUSE Grub taking over the MBR

11.2 doesn’t install Grub in the MBR by default, more precisely it doesn’t highlight that choice during setup. But in fact it does occasionally (?) install Grub in the MBR, even when explicitely instructed not to do so. I’m starting to better understand people wondering why their Ubuntu vanished from bootmenu and swearing they did not install Grub in MBR. I’m quite sure I already experienced this issue with 11.1 as well as while installing my first 11.2. Now I decided to install 11.2 on another machine and pay double attention. I normally DON’T install openSUSE Grub in MBR. Somebody has to go in there and at the moment, I prefer to have Ubuntu’s Grub2. I ran the installation twice. The first time, I added the root partition to the default location, which was in this case the extended partition’s bootsector (sda4). The second time, I simply didn’t touch anything. According to setup, the bootloder was supposed to get in the extended partition. Since I knew you guys wouldn’t believe me, I carefully copied down what the setup screen said. Here’s :


  • Boot Loader Type: GRUB
  • Status Location: /dev/sda4 (extended)
  • Change Location:
  • Boot from MBR is disabled (enable)
  • Boot from “/” partition is disabled (enable)

[/LIST] I installed, rebooted and ended up with openSUSE Grub in MBR.
Well, my partition tables are not the most usual ones. The first primary is always a 252MB FAT16. Second and third primaries are Unix. The extended partition is full of logical ones used for different Linux distros. At the end on the logical partitions, the Linux kernel adds up devices for the Unix slices found in the the other primaries after it read the FreeBSD disklabels (but not during setup).
Maybe this is just my unconventional partitioning that openSUSE setup doesnt’ like. However is that a reason for taking over my MBR ? Since I suspect I might not be the only one experiencing this problem (according to some threads), I thought I would report this behaviour.

BTW I just installed a Fedora 12 on the same kind of machine. It would have written its bootloader into MBR (by default) but respected my choice as I selected the root partition instead. I’m going to install openSUSE on that machine as well, deselect the extended partition and choose only the root partition as destination for Grub.

I’ll have a look at this in my test environment, but I have not experienced this at all. SUSE always - so far has done as instructed.

I’m not saying I don’t believe you. Stand by, I’ll get back within 24;)

What do you make of this:](

‘boot from “/”’ was indeed predisabled by setup. It would have been sda11 in my case. Too far away in the extended partition ? Also notice that I have no linux primary partition at all. Normally I would enable boot from “/”. Actually, that’s not the way I proceed. I would have explicitely set up the location myself by clicking on “Booting” and then on details … or whatever it is called, but you know what I mean.

On the machine I’m using right now, the root partion is sdb6. I choose to install Grub in there (I cannot remember if it was enabled or disabled during setup). Anyway I ended up with Grub in MBR too. I don’t even know if the bootloader was also installed in the root partition. Well … I could have a look at the bootsector or just add an entry to chainload this Grub from Grub2, which I’ll have to do anyway .

I just started to install on a third machine. ‘Unfortunately’ all my machines have similar partition tables (it’s already complicated enough). They have 2 or 3 SATA disks, one mainboard in AHCI mode, the other BIOS don’t support it.

On that install I will :

  • notice what possible locations are enabled by default
  • only enable the root partition
  • see what happens …

If you want to reproduce my conditions in your test, maybe you could try with 3 non linux primary partitions and a couple linux logical in the extended one. It would be enough to change the partition ID of two primaries to A5 (FreeBSD). Setup would ignore such partitions and not read the disklabel at this point. I don’t think you can fake a DOS partition though… but you might already have one.

Also I always do a new installation and always disable automatic configuration.

Just running Setup …
Done with partitioning and I haven’t touched anything under Booting yet.
I should say that I always mount by UUID (Setup default is by Device ID) … if you wonder what else I do differently.

Same situation as before.

[li]Format partition /dev/sda11 (4.13 GB) for / with ext3
[/li][li]Format partition /dev/sda12 (19.57 GB) for /usr with ext4
[/li][li]Format partition /dev/sda13 (8.07 GB) for /local with ext4
[/li][li]Format partition /dev/sda14 (6.00 GB) for /var with ext4
[/li][li]Use /dev/sda5 as swap
[/li][li]Use /dev/sdb5 as swap
[/li][li]Set mount point of /dev/sda10 to /home
[/li][li]Set mount point of /dev/sdb10 to /srv
[/li][li]Set mount point of /dev/sdb11 to /tmp
[/li][li]Set mount point of /dev/sda19 to /vm
[li]Boot Loader Type: GRUB
[/li][li]Status Location: /dev/sda4 (extended)
[/li][li]Change Location:
[li]Boot from MBR is disabled (enable)
[/li][li]Boot from “/” partition is disabled (enable)
[/li]+ openSUSE (default)

  • Fedora (
  • Fedora (
  • Windows 1
  • Windows 2
  • Floppy
  • Failsafe – openSUSE
    [li]Order of Hard Disks: /dev/sda, /dev/sdb
  • Notice that Ubuntu Karmic (which has Grub2 in MBR) is not detected.

Enabling Boot from “/” partition gives the following:

[li]Boot Loader Type: GRUB
[/li][li]Status Location: /dev/sda4 (extended), /dev/sda11 ("/")
[/li][li]Change Location:
[li]Boot from MBR is disabled (enable)
[/li][li]Boot from “/” partition is enabled (disable)

I had that already and it installed in the MBR. I also had the extended partition as only destination, and it went to the MBR. I’m going to disable /dev/sda4. I have to look in the advanced settings for that …

So I click on Booting -> Boot Loader Installation.

“Boot from Master Boot Record” is unckecked. It has always been. Ad if it where selected, I assure you I would unselect it. :wink: Now I will uncheck “Boot from Extended Partition” …

What’s in Boot Loader installation Details?
Disk order. It’s OK.

What’s in the Boot Loader Options?
[x] Set active Flag in Partition Table for Boot Partition
[x] Write generic Boot Code to MBR.

Errr … That’s it! I don’t understand why it would activate a logical partition but I can figure out the consequence of writing a generic Boot Code in the MBR. This option should not be enabled by default. I’ll disable both…

I’m quite sure that was the problem…

Yep! That’s it.

Now I understand why the setup proposed to install Grub in the extended partition. The extended partition can be set active like any primary and the generic boot code (written in the MBR) will jump to it and execute the code it finds there, i.e the Grub bootloader. It’s wrong to pretend that openSUSE’s “Grub” takes over the MBR but it’s wrong to think that it won’t touch the MBR. By writing a generic boot code there, it will destroy any previously installed bootloader. You tell me if I’m wrong … but I guess I’ve observed a similar behaviour in another operating system widely used on earth in the past … I don’t remember its name but I’ve seen dogs pissing on it. :wink:

This option should not be hidden 3 cliks away from the screen where you choose the bootloader location. It’s not enough to tell multibooters under circumstances not to install Grub in MBR. We should also tell them to prevent the setup from writing a generic bootcode there.

The extended partition can be set active like any primary
Correct. That’s when the / partition lies within that extended.

Thing is the MBR, at least as far windows is concerned, seems to remain un-damaged.
For example: I can have an ntfs primary with say win7 followed by linux partitions which includes an extended with / in it. Booting does by default, set grub to the extended, it will switch the boot flag there (see the examples in thos All About Grub - openSUSE)
If when Linux has installed, I then use a utility disk and move the boot flag off the extended and back to the ntfs primary - Windows boots no problem.

But try changing back the flag and grub is broken and needs re-installing.:\

I don’t see why if you do nothing else but changing the boot flag, provided you have only one partition active at a time (?).

I understand why the setup writes a generic boot code into the MBR. It also makes sense to enable this option by default. Under normal circumstances (not necessarely a mutibooting environment) after installing an OS, you’re expecting to boot into it. What do you think would happen if you:

  • don’t install Grub in the MBR
  • don’t install GRUB in any primary partition (included the extended one)
  • only install GRUB into a logical partition
  • don’t change the active flag
  • don’t write a generic boot code in MBR

Nothing bad, but openSUSE would simply not boot … unless you already have a bootmanager which would let you pick the logical partition in which you installed Grub.

So writing a generic boot code in MBR is not a bad thing in most cases. IMHO this option should not be hidden three clicks away.
Karmic’s users should also be warned about that: Grub2 bootloader will be overwritten and no Ubuntu boot entry will be added to the new Grub menu … until openSUSE setups parses other /boot/grub/grub.cfg, which I guess should happen pretty soon.