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

Thread: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

  1. #1

    Default How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Dual-booting OpenSuse Tumbleweed on a gpt nmve-drive with Ubuntu 16.04. Unfortunately, when I installed Tumbleweed alongside the already existing UEFI-booting Ubuntu-system, I didn't select the UEFI boot-option for the installation OpenSuse DVD. Thus, I seem to have wound-up with an install suitable for an MBR-drive. This is not what I want

    Here's the current set-up:

    Code:
    azed@azed-H270N:~$ sudo fdisk -l
    Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: CFB16A8E-384A-4AD4-B14B-62F840FB7E73
    
    Device             Start       End   Sectors  Size Type
    /dev/nvme0n1p1      2048   1026047   1024000  500M EFI System
    /dev/nvme0n1p2   1026048 158722047 157696000 75.2G Microsoft basic data
    /dev/nvme0n1p3 158722048 183298047  24576000 11.7G Linux swap
    /dev/nvme0n1p4 183298048 235724799  52426752   25G Linux filesystem
    /dev/nvme0n1p5 235724800 342421503 106696704 50.9G Linux filesystem
    /dev/nvme0n1p6 342421504 342441983     20480   10M BIOS boot
    /dev/nvme0n1p7 342441984 405512191  63070208 30.1G Linux filesystem
    /dev/nvme0n1p8 405512192 500117503  94605312 45.1G Linux filesystem
    azed@azed-H270N:~$
    p1 is the pre-existing EFI-partition I created when installing Ubuntu. p2 is an ntfs-partition (no Windows). The Ubuntu system is on p4-5. The OpenSuse sys is on p7-8

    The system boots OK: I can get into both Xenial and Tumbleweed (albeit with "nomodeset" as a BIOS-option, in the case of the latter), but I don't like this "hybrid-boot" dog's breakfast

    Question: How do I re-install the OpenSuse system as an EFI-booting system appropriate for my GPT drive?

    First thoughts:

    I have no option in my computer's BIOS settings for switching between MBR- and EFI-boots. Thus I am going to have to alter the software on my system. I don't want to do anything that is not revertible, perhaps via a chroot

    My current understanding of the boot-process is this. When Grub2 was installed on my system a small piece of code - call it "grub 1.0" - was inserted amongst the first 446 bytes of the MBR at the head of my drive. A "flag", indicating the "active" partition, may also have been planted in the partition table stored in the next 64 bytes of the MBR. At boot, "grub 1.0 is "read" by my computer, as its first move. The function of this code, its only function, is to point the computer to the active partition - in my case p6 (?) - where the main part of grub - call it grub 2.0 - is located. This grub 2.0 then loads into the computer's memory and takes over the rest of the boot. The point is that this set-up effectively bypasses the EFI-system set-up on my computer.

    Is this basically correct?

    If it is, will it be sufficient for me to uninstall grub in OpenSuse, say with:

    Code:
    sudo zypper -remove grub* (whatever)
    Will this remove the grub 1.0 boot-loader from the MBR / remove the "flag" in the MBR partition-table, and allow the EFI-system to take back control of the boot?

    Or will I have to overwrite the bootloader in the (backed-up) MBR with zeros, say with:

    Code:
    dd if=/dev/zero of=/dev/sda bs=446 count=1
    Once the EFI-system is back in control of the boot (so I can get into Ubuntu), I can blank the OpenSuse partitions and re-install as UEFI. I don't want to be "locked out" of my Ubuntu system

    That's my current thinking anyway. Comments / suggestions welcome

    I can't be the only person who has messed-up his Tumbleweed install in this way. All help gratefully received

  2. #2
    Join Date
    Sep 2014
    Location
    Germany
    Posts
    213

    Default AW: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Quote Originally Posted by PorkPieHat View Post
    Dual-booting OpenSuse Tumbleweed on a gpt nmve-drive with Ubuntu 16.04. Unfortunately, when I installed Tumbleweed alongside the already existing UEFI-booting Ubuntu-system, ...
    Do i understand that correctly: Your Ubuntu boots in UEFI-mode?

    Quote Originally Posted by PorkPieHat View Post
    ... I didn't select the UEFI boot-option for the installation OpenSuse DVD.
    As far as i know it depends on the setup of the UEFI whether a system boots in UEFI-mode or CSM-mode (=Legacy mode; how a BIOS would boot).

    So depending on the UEFI-setup the openSUSE install media boots either in UEFI-mode (without a menu at the bottom of the first screen) or in CSM-mode (with F1 F2 ... menu at the bottom of the first screen).

    Quote Originally Posted by PorkPieHat View Post
    ... The system boots OK: I can get into both Xenial and Tumbleweed (albeit with "nomodeset" as a BIOS-option, in the case of the latter), but I don't like this "hybrid-boot" dog's breakfast
    I do not quite understand how you decide which system gets booted. "nomodeset" is a kernel option and has nothing to do with UEFI/CSM-boot-mode.

    Quote Originally Posted by PorkPieHat View Post
    ... I have no option in my computer's BIOS settings for switching between MBR- and EFI-boots.
    All the UEFIs i have seen so far do have such an option. Could you please post more details on your hardware (brand, UEFI/BIOS-vendor, ...).

    Regards

    susejunky

  3. #3
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,167

    Default Re: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Quote Originally Posted by PorkPieHat View Post
    Question: How do I re-install the OpenSuse system as an EFI-booting system appropriate for my GPT drive?
    Re-installing the whole system is not needed, although it should fix things if you prefer that route. Just the bootloader part needs to be reinstalled.
    When you are logged in TW, start "Bootloader" (or "YaST", then "Bootloader" option).
    In the "Boot code options" tab be sure to select "GRUB2 for EFI" (NOT simply "GRUB2").
    Leave the other option at their default values, unless you have valid reasons for not doing so.
    Press OK. The next reboot should be in EFI mode (unless something else went wrong).

    I have no option in my computer's BIOS settings for switching between MBR- and EFI-boots. Thus I am going to have to alter the software on my system. I don't want to do anything that is not revertible, perhaps via a chroot
    That looks odd, IF you were actually able to install TW in "legacy" mode, there should be an option in your BIOS to enable a "CMS" or "Compatibility" mode (or "Legacy" or "MBR" or whatever it might be called depending on your BIOS provider). Disable it and you should be left with EFI booting.
    To check that, boot the TW installer, if you see a line of F1-F8 "buttons" at the bottom of the screen, that's the installer in "MBR" mode. If you don't see them, that's the installer in "EFI" mode.

    My current understanding of the boot-process is this. When Grub2 was installed on my system a small piece of code - call it "grub 1.0" - was inserted amongst the first 446 bytes of the MBR at the head of my drive. A "flag", indicating the "active" partition, may also have been planted in the partition table stored in the next 64 bytes of the MBR. At boot, "grub 1.0 is "read" by my computer, as its first move. The function of this code, its only function, is to point the computer to the active partition - in my case p6 (?) - where the main part of grub - call it grub 2.0 - is located. This grub 2.0 then loads into the computer's memory and takes over the rest of the boot. The point is that this set-up effectively bypasses the EFI-system set-up on my computer.

    Is this basically correct?
    IF you actually installed in "MBR" mode, that's basically correct, but p6 is not what openSUSE would normally use.

    If it is, will it be sufficient for me to uninstall grub in OpenSuse, say with:

    Code:
    sudo zypper -remove grub* (whatever)
    DO NOT simply uninstall GRUB, you would end up with an unbootable system.
    Main: Leap 42.2 Gnome on i7 4720HQ + Geforce GTX960M
    Test: Leap 42.3 (& others) on Core2Duo + GM965

  4. #4
    Join Date
    Sep 2014
    Location
    Germany
    Posts
    213

    Default AW: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    To get more information on your computers UEFI/BIOS you can issue as "root" in a console
    Code:
    # dmidecode -t 0
    and post the result.

    To test whether your system booted in UEFI or CSM mode you can issue as user in a console
    Code:
    # [ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
    Regards

    susejunky

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    9,171
    Blog Entries
    3

    Default Re: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Quote Originally Posted by PorkPieHat View Post
    Dual-booting OpenSuse Tumbleweed on a gpt nmve-drive with Ubuntu 16.04. Unfortunately, when I installed Tumbleweed alongside the already existing UEFI-booting Ubuntu-system, I didn't select the UEFI boot-option for the installation OpenSuse DVD. Thus, I seem to have wound-up with an install suitable for an MBR-drive. This is not what I want
    This should be easy to fix, because Ubuntu is "UEFI-booting".

    Boot Ubuntu the UEFI way. And make sure that its grub config is up to date.

    Code:
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    When you next try to boot Ubuntu the UEFI way, there should be a boot menu entry for opensuse Tumbleweed. Use that entry.

    You should now be running Tumbleweed as booted UEFI.

    You now need to do three things:

    (1) mount your EFI partition as "/boot/efi";
    (2) modify "/etc/fstab" so that this mount is automatic in future boots.
    I think you can use Yast partitioner to do the above two steps.
    (3) Use Yast bootloader, and switch from "grub2" to "grub2-efi".

    That's it.
    opensuse Leap 42.3; KDE Plasma 5;
    opensuse tumbleweed; KDE Plasma 5 (test system);

  6. #6

    Default Re: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Thanks for the very prompt responses, guys

    Some clarifications:

    #2 susejunky (also #5 nrickert)

    Your Ubuntu boots in UEFI-mode?
    It was booting in UEFI-mode before I installed OpenSuse, but now Tumbleweed, which thinks it's on an MBR-drive, is doing the booting, and it is booting the Ubuntu system as MBR. Thus, when (in Ubuntu) I now do:

    Code:
    efibootmgr
    I get:

    Code:
    efibootmgr: EFI variables are not supported on this system.
    So depending on the UEFI-setup the openSUSE install media boots either in UEFI-mode (without a menu at the bottom of the first screen) or in CSM-mode (with F1 F2 ... menu at the bottom of the first screen).
    I definitely am now booting both Ubuntu and OpenSuse as MBR. When I installed OpenSuse, the DVD-drive in my BIOS boot-order was listed twice, once with a UEFI-tag, and once without. I opted for the non-UEFI option, with the consequences described. REALLY, REALLY DUMB.

    Code:
    I do not quite understand how you decide which system gets booted. "nomodeset" is a kernel option and has nothing to do with  UEFI/CSM-boot-mode.
    I choose the system to boot via the OpenSuse boot menu, which lists both Ubuntu 16.04 and OpenSuse - both systems, though, now boot as MBR. Ignore the "nomodeset" comment - irrelevant to the current prob: I simply found that I had to add that to the OpenSuse boot-command to get Tumbleweed to boot properly

    All the UEFIs i have seen so far do have such an option [to switch between MBR and EFI boot-modes]. Could you please post more details on your hardware (brand, UEFI/BIOS-vendor, ...).
    The motherboard of my computer is a GA-Z270N-WIFI. The manual is in front of me. There is a "CSM Support"-option (I have also fiddled around with this in the BIOS). By default, the CSM-system is enabled. It can be disabled, but - here's the catch - to disable it, I have to switch another option: "Windows 8/10" features from "other OS" (the default) to one of "Windows 8/10" or "Windows 8/10 WHQL". If I select one of these two options (I have actually only tried the first), and go on to disable CSM, my computer seems to think that it should have a Windows system installed. It doesn't find such a system. Thus, with these settings, I get no "bootable-media" at all listed in the BIOS boot-priority list. Grrr, frustrating, or what!

    #3 OrsoBruno

    Re-installing the whole system is not needed, although it should fix things if you prefer that route. Just the bootloader part needs to be reinstalled.
    When you are logged in TW, start "Bootloader" (or "YaST", then "Bootloader" option).
    In the "Boot code options" tab be sure to select "GRUB2 for EFI" (NOT simply "GRUB2").
    Leave the other option at their default values, unless you have valid reasons for not doing so.
    Press OK. The next reboot should be in EFI mode (unless something else went wrong).
    How do I revert this (say from a DVD rescue-sys chroot) if it doesn't work? I would like to avoid GUIs, and work with purely terminal commands, which can be inverted. I don't want to "brick" my system.

    That looks odd, IF you were actually able to install TW in "legacy" mode, there should be an option in your BIOS to enable a "CMS" or "Compatibility" mode (or "Legacy" or "MBR" or whatever it might be called depending on your BIOS provider). Disable it and you should be left with EFI booting.
    See my first clarification above

    #4 susejunky

    Here's the additional info you asked for:

    Code:
    azed@azed-H270N:~$ sudo dmidecode -t 0
    [sudo] password for azed: 
    # dmidecode 3.0
    Getting SMBIOS data from sysfs.
    SMBIOS 3.0 present.
    
    Handle 0x0000, DMI type 0, 24 bytes
    BIOS Information
        Vendor: American Megatrends Inc.
        Version: F3
        Release Date: 02/21/2017
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16384 kB
        Characteristics:
            PCI is supported
            BIOS is upgradeable
            BIOS shadowing is allowed
            Boot from CD is supported
            Selectable boot is supported
            BIOS ROM is socketed
            EDD is supported
            5.25"/1.2 MB floppy services are supported (int 13h)
            3.5"/720 kB floppy services are supported (int 13h)
            3.5"/2.88 MB floppy services are supported (int 13h)
            Print screen service is supported (int 5h)
            Serial services are supported (int 14h)
            Printer services are supported (int 17h)
            ACPI is supported
            USB legacy is supported
            BIOS boot specification is supported
            Targeted content distribution is supported
            UEFI is supported
        BIOS Revision: 5.12
    
    azed@azed-H270N:~$ # [ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
    "Legacy boot on HDD"
    azed@azed-H270N:~$
    #5 nrickert

    When I do (in the Ubuntu system):

    sudo update-grub
    [A more user-friendly version of "sudo grub-mkconfig -o /boot/grub/grub.cfg" - or so I'm told]

    I get:

    Code:
    Generating grub configuration file ...
    Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
    Found linux image: /boot/vmlinuz-4.10.0-38-generic
    Found initrd image: /boot/initrd.img-4.10.0-38-generic
    Found linux image: /boot/vmlinuz-4.10.0-37-generic
    Found initrd image: /boot/initrd.img-4.10.0-37-generic
    Found linux image: /boot/vmlinuz-4.10.0-35-generic
    Found initrd image: /boot/initrd.img-4.10.0-35-generic
    Found memtest86+ image: /boot/memtest86+.elf
    Found memtest86+ image: /boot/memtest86+.bin
    done
    azed@azed-H270N:~$
    I.e., the Ubuntu-sys doesn't "see" the OpenSuse-system (because the Ubuntu version of grub still thinks it's on a GPT-drive, and just consults what's listed in the EFI-partition?)

    ________________________________________________________________________________________________

    I hope things are clearer now

    My theory is that I have to stop the BIOS from "seeing" my drive as an MBR set-up. The EFI-system should then take over. No-one liked my idea of uninstalling Grub and wiping the bootloader from the (backed-up) MBR.

    Any other ideas?

  7. #7
    Join Date
    Sep 2014
    Location
    Germany
    Posts
    213

    Default AW: Re: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Quote Originally Posted by nrickert View Post
    This should be easy to fix, because Ubuntu is "UEFI-booting".

    Boot Ubuntu the UEFI way. And make sure that its grub config is up to date.

    Code:
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    When you next try to boot Ubuntu the UEFI way, there should be a boot menu entry for opensuse Tumbleweed. Use that entry.

    You should now be running Tumbleweed as booted UEFI.
    After you implmented this proposed change you have to keep in mind that you are starting Tumbleweed by using the grub.cfg from your Ubuntu install. So if you update your Tumbleweed and receive a new kernel version you need to rebuild Ubuntus grub.cfg or it will not start Tumbleweeds new kernel.

    Regards

    susejunky

  8. #8
    Join Date
    Sep 2014
    Location
    Germany
    Posts
    213

    Default AW: Re: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Quote Originally Posted by PorkPieHat View Post
    ... It was booting in UEFI-mode before I installed OpenSuse,
    Code:
    efibootmgr: EFI variables are not supported on this system.
    ...I choose the system to boot via the OpenSuse boot menu, which lists both Ubuntu 16.04 and OpenSuse - both systems,
    Thank you for providing more information.

    As confirmed by the output of dmidecode which you provided you have an UEFI that did boot in UEFI mode and is now booting in CSM-mode.

    Quote Originally Posted by PorkPieHat View Post
    ... The motherboard of my computer is a GA-Z270N-WIFI. The manual is in front of me. There is a "CSM Support"-option (I have also fiddled around with this in the BIOS). By default, the CSM-system is enabled. It can be disabled, but - here's the catch - to disable it, I have to switch another option: "Windows 8/10" features from "other OS" (the default) to one of "Windows 8/10" or "Windows 8/10 WHQL". If I select one of these two options (I have actually only tried the first), and go on to disable CSM, my computer seems to think that it should have a Windows system installed. It doesn't find such a system. Thus, with these settings, I get no "bootable-media" at all listed in the BIOS boot-priority list. Grrr, frustrating, or what!
    I heard that some bad-behaving UEFIs look only in "/EFI/BOOT" (of the EFI-partition) for bootloaders.

    For further advice it would help if you could show the content of your EFI-partition. If your Ubuntu is still setup as before it should have this partition mounted. In Tumbleweed you may have to mount it first.

    And you could have a look in the internet if there is an update for your UEFI.

    Regards

    susejunky

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    9,171
    Blog Entries
    3

    Default Re: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Quote Originally Posted by PorkPieHat View Post
    Thanks for the very prompt responses, guys
    I.e., the Ubuntu-sys doesn't "see" the OpenSuse-system (because the Ubuntu version of grub still thinks it's on a GPT-drive, and just consults what's listed in the EFI-partition?)
    [/QUOTE]

    Okay.

    I can assure you that it doesn't work the way that you just described.

    You probably installed openSUSE with the "btrfs" file system. And the grub update doesn't see it because it doesn't fully grok "btrfs".

    With some computers, you can hit F12 while booting (while the vendor screen is showing), and that gives a boot menu. See if you can boot to ubuntu in EFI mode that way. If you can, it will make things easier.
    opensuse Leap 42.3; KDE Plasma 5;
    opensuse tumbleweed; KDE Plasma 5 (test system);

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    9,171
    Blog Entries
    3

    Default Re: How to re-install Tumbleweed as UEFI in place of MBR (get rid of hybrid-boot)

    Let me add some clarification here.

    Your main problem is with your BIOS settings.

    If we could magically convert your openSUSE to EFI booting, then the result would be that you could not boot it at all. Because, at present, you seem unable to do UEFI booting. So you need to work out how to change the BIOS settings (or, more correctly, firmware settings) so that you can boot UEFI. Once you do that, there's a good chance that "ubuntu" will again be UEFI bootable.

    In order to make the changes you want, you will need to boot something in UEFI mode. You can either boot ubuntu in UEFI mode, or you can boot the Tumbleweed install DVD in UEFI mode, or the Tumbleweed live rescue CD (or USB) in UEFI mode. Booting something in UEFI mode is the first step toward making the changes you want to make.
    opensuse Leap 42.3; KDE Plasma 5;
    opensuse tumbleweed; KDE Plasma 5 (test system);

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
  •