Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the default

  1. #1

    Default Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the default

    It is a couple of years ago - pre-UEFI times - when there repeatedly were users on this forum asking for help because their windows updates or service packs wouldn't work after they had created a dual boot of windows and openSUSE on their (legacy) systems.

    The reason was quite simple, though hidden to users with little experience: the default for the bootloader during a fresh installation of openSUSE for a longer time had been to install the bootloader in the MBR, or to "Boot from Master Boot Record". This as well did lead to problems with the co-existence with other linux distributions in a multi boot.

    One among other reminders of those problems is
    https://forums.opensuse.org/showthre...-for-Windows-7
    which for legacy systems using an MBR is still valid.

    Another reminder is
    https://old-en.opensuse.org/Bugs/gru...orking_GRUB.3F
    which was cited just recently
    Quote Originally Posted by mrmazda View Post
    Another option is to not put Grub on the MBR. Grub doesn't need to be on MBR to boot Linux. It can boot from the very same code Windows boots from, based upon which partition contains the boot flag. The flag can be moved among bootable partitions
    I was astonished to remark that this default of "Boot from Master Boot Record", which in the past gave rise to so many problems on legacy multi boot systems, had returned.
    I discovered that when I made a fresh install of Leap 15.0 some time ago.

    Now for fresh installations of Leap 15.1 this default of "Boot from Master Boot Record" still was the same, and I therefore had to change that actively.

    The solution was and is simple: in the checkboxes of YaST > Bootloader > Boot Code Options
    - uncheck "Boot from Master Boot Record"
    - check "Boot from (Root) Partition"
    - check "Set active Flag in Partition Table for Boot Partition"
    - check "Write generic Boot Code to MBR"

    Then fdisk, parted, or other tools like gparted can be used to move the boot flag to the right windows partition to make windows updates work, and moved back again afterwards, without overwriting the MBR using a windows installation CD - which in turn would disable booting openSUSE.

    Why making certain windows updates impossible, and in consequence force a number of less experienced users to destroy their linux bootloader setup, just by making this option of "Boot from Master Boot Record" the default of the openSUSE installer?

  2. #2
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,704

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    Quote Originally Posted by ratzi View Post
    Why making certain windows updates impossible, and in consequence force a number of less experienced users to destroy their linux bootloader setup, just by making this option of "Boot from Master Boot Record" the default of the openSUSE installer?
    My guess is some combination of the following:
    1. Monkey see, monkey do. All distros (that I'm aware of) put bootloader on MBR by default.
    2. It's what Windows does (so the "favor" of usurping boot control in favor of the last installed OS is returned).
    3. MBR Grub installation usually works well enough (until Windows needs unpredictable updates, or reinstallation).
    4. In an ideal world, once Linux is installed, the need for Windows would ultimately be reduced to zero.
    5. It's subjectable to QA.
    6. Once Windows recaptures the boot flag, it's not obvious what de minimus correction is required, or how to go about it.
    7. Grub on partition doesn't always fit the available space.
    8. There is no single right way to configure multiboot.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,644
    Blog Entries
    3

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    I disagree with a lot of this.

    Actually, my experience is that, for a long time, openSUSE would install so as to boot from "/boot" if that separate "/boot" partition existed. Yes, they recently changed the defaults, and I'll comment on that in a followup reply.

    Quote Originally Posted by ratzi View Post
    It is a couple of years ago - pre-UEFI times - when there repeatedly were users on this forum asking for help because their windows updates or service packs wouldn't work after they had created a dual boot of windows and openSUSE on their (legacy) systems.
    I could be mistaken. But it has been my impression that booting from the MBR avoids these problems with windows updates.

    Then fdisk, parted, or other tools like gparted can be used to move the boot flag to the right windows partition to make windows updates work, and moved back again afterwards, without overwriting the MBR using a windows installation CD - which in turn would disable booting openSUSE.
    But this is a problem. If you have to change the boot flag for Windows updates, then change it back afterwards, then you don't have booting working well. As far as I know, booting from the MBR solves this problem. And it solves it, because you can leave windows marked with the boot flag (to keep windows happy), but still get a grub boot menu when you boot.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,644
    Blog Entries
    3

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    A followup, as promised.

    With "btrfs" it is better to not have a separate "/boot". And that is part of why defaults have changed.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,644
    Blog Entries
    3

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    Another followup.

    Here's what I am doing on older (on-UEFI) systems:

    (1) I still use a separate "/boot"
    (2) I install to boot from "/boot" (not from the MBR).
    (3) I create my own generic boot code, based on the syslinux boot code. These days, "syslinux" is normally installed at "/usr/share/syslinux". I use the file "altmbr.bin" for generic boot code. But you have modify that first. Typically, I have "/boot" as "/dev/sda1". So I append one byte containing binary 1 to "altmbr.bin". Then I install that as generic boot code.

    The effect is that this will always boot partition 1, and ignore the boot flag (active partition flag). So I set the boot flag to the windows partition. That way, Windows thinks it is the partition that is booted. But the linux/grub partition is actually booted. And I don't need to keep moving that boot flag. It works quite well.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,644
    Blog Entries
    3

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    And another followup. This one is about UEFI systems.

    My experience with a UEFI system and Windows 8.1, is that some Windows updates still fail.

    My workaround -- before updating, I change the UEFI boot order to make Windows the first in boot order. Then I update. I have not run into problems with this. All updates have worked.

    Afterwards, I change the boot order back so that opensuse-secureboot is first.

    However: I am considering making the change in boot order permanent. That is, alway have Windows first. If I want to boot to openSUSE, then I can hit F12 during boot to select the openSUSE boot.

    After using Windows, I typically do a SHIFT-restart. Then, on the next prompt, I say to boot from a device. This offers the opensuse boot, which I select. This seems to have the nice side effect that windows file systems are cleanly shutdown.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,887
    Blog Entries
    15

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    Quote Originally Posted by nrickert View Post
    A followup, as promised.

    With "btrfs" it is better to not have a separate "/boot". And that is part of why defaults have changed.
    Hi
    Since the Intel M/B I have doesn't support booting from a NVMe device, I had to separate /boot (format to btrfs) out onto the SSD as well as /boot/efi to get things working....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,644
    Blog Entries
    3

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    Quote Originally Posted by malcolmlewis View Post
    Since the Intel M/B I have doesn't support booting from a NVMe device, I had to separate /boot (format to btrfs) out onto the SSD as well as /boot/efi to get things working....
    Yes, one has to adapt to special situations.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  9. #9

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    Quote Originally Posted by mrmazda View Post
    2. It's what Windows does (so the "favor" of usurping boot control in favor of the last installed OS is returned).
    But, why would "Write generic Boot Code to MBR", available as a choice for the openSUSE boot loader, would work then for windows being able to do certain updates / service packs?
    It is the boot flag, and not writing some GRUB code to MBR.

    It was you who advocated this.

  10. #10

    Default Re: Lost knowledge: just do not install GRUB2 into Master Boot Record (MBR), though this is the defa

    Quote Originally Posted by nrickert View Post
    Actually, my experience is that, for a long time, openSUSE would install so as to boot from "/boot" if that separate "/boot" partition existed. Yes, they recently changed the defaults
    I was not talking about a separate /boot partition. I never had that. I just made fresh installs of openSUSE over the years starting from 10.2.

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •