install wiped windows bootloader

I recently switched to OpenSUSE, and I’ll start off by saying so far, it’s been a great experience. I just have one question and am wondering if anyone can shed some light on it for me. During install, I selected to install grub2 to my logical partition where OpenSUSE is installed. Well, it did install grub2 where it was supposed to, but it also wiped out my windows bootloader and replaced it with nothing. The problem is fixed, but I’m just curious as to whether or not anyone might know the reason for this. Thanks.

openSUSE 12.3 installs grub 2
This takes over booting, it doesn’t destroy the windows boot code.

Ok, thanks. Well, maybe it didn’t destroy it, but it made it unusable. I currently use EasyBCD to configure my bootloader, which makes adding/deleting linux partitions relatively easy. So, the installer installed grub2 to the correct partition, and then when I rebooted my machine I was greeted by a black screen (there may have been a blinking cursor but I don’t remember). In any case, I was unable to boot until I used the windows disk to repair the bootloader. So, if it installed grub2 to the logical partition, what happened to the MBR?

A couple of things to consider:

  1. The installer will have shifted the boot flag from your windows boot partition, probably to the extended.
    It may have only required using gparted to toggle it back to resume booting.

  2. However: I think 12.3 also writes to the MBR. At least from what I read in other posts it does. (Thing is, I always let my installs write to the MBR, I didn’t try any other way)
    It’s lucky you had a windows DVD.
    I understand there is a bug report on this and supposedly a fix in place for 13.1

openSUSE bootloader configuration has option to replace MBR with generic code and it is enabled by default. May be that’s what happened.

During installation you can check details of bootloader settings and adjust them. Just click on Bootloader in summary screen.

In my experience, with a Windows/opensuse dual boot system:

opensuse install grub2 on the boot sector of the partition containing “/boot” (usually the root partition) if that is a primary partition. If that is a logical partition, then it installs grub2 in the boot sector of the extended partition.

It then sets that partition (where it installed grub2) as the active partition, so that the next boot will be from opensuse.

On a system where I want to use the Windows boot manager, I change the opensuse boot install during the install setup screens. Specifically:

  • I set it to install grub on “/boot” if that is a separate partition, or on “/” otherwise.
  • I uncheck the box for installing on the extended partition, if that is checked.
  • I unset the box for setting the active partition. Note that this required going into an additional options screen during the boot setup.
  • I unset the box for putting generic code in the boot sector, though in my experience it is usually not set anyway.

After the install is done, I cannot boot opensuse. I still get to Windows. So I have to make changes in Windows to allow the Windows boot manager to start opensuse. Presumably you would use easyBCD for that.

I’m just sharing my practice here. You are in charge of your box, so you will have to make those decisions.

In any case it can all be controlled from the installer if you pay attention to the boot setup before you commit to the partitioning scheme. Defaults have no way to know you want to keep the MBR untouched.

I’ve always changed the installer to install grub2 to the MBR instead of the openSUSE partition (default option)
and left the rest of the bootloader settings untouched.

Never had any issues with booting into openSUSE or Windows 7

Same here

But the issue here was that the OP was using EasyBCD :frowning:

Thanks for the replies. My booting settings on the installation manager were type: Grub2, Location: /dev/sda6, Boot from MBR is disabled, Boot from “/” is enabled. In any case, I was just commenting that it was odd that the installation would alter the MBR when that option was specifically disabled in the installation options (but, thanks anyway to captain(s) obvious).

But, it doesn’t matter, my installation is currently fully functional.

No, it is not odd. BIOS can boot only from MBR; it has no way to boot off partition. So to boot off partition in actually need code in MBR that will attempt to boot off partition. As installer cannot know anything about your system, the safest approach here is to write generic code in MBR that just looks for active partition and attempts to jump to its boot block.

As long as you use standard Windows MBR code you won’t really notice it, as standard Windows MBR code just does exactly the same - look for active partition and jump to it. But of you have non-standard boot code in MBR, you lose it. OTOH if you will not rewrite MBR, you will need to reconfigure your third-party bootloader to boot from Linux partition …

Right, yes I realized after I posted that the boot from MBR option was probably for moving the boot flag, although at the time I interpreted it as do you want to write to the MBR. Well, now I know. Thanks.

On 2013-10-11 12:06, arvidjaar wrote:
>
> openSUSE bootloader configuration has option to replace MBR with generic
> code and it is enabled by default. May be that’s what happened.

It does that, yes.

> During installation you can check details of bootloader settings and
> adjust them. Just click on Bootloader in summary screen.

Yes, I always look very carefully at the settings there during the
install. Very often the choices it does are not appropriate.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2013-10-12 01:16, cra1g321 wrote:
>
> I’ve always changed the installer to install grub2 to the MBR instead of
> the openSUSE partition (default option)
> and left the rest of the bootloader settings untouched.
>
> Never had any issues with booting into openSUSE or Windows 7

You may have problems installing Windows service packs.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2013-10-12 21:56, z2 wrote:
>
> Right, yes I realized after I posted that the boot from MBR option was
> probably for moving the boot flag, although at the time I interpreted it
> as do you want to write to the MBR. Well, now I know. Thanks.

Moving the boot flag is another option: name is “set active flag in
partition table for boot partition”


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))