Bug 20277 - Install insists on putting bootloader on ESP and doesn't write a usable MBR
Summary: Install insists on putting bootloader on ESP and doesn't write a usable MBR
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2017-02-13 21:36 CET by Frank Griffin
Modified: 2017-02-14 17:32 CET (History)
5 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Frank Griffin 2017-02-13 21:36:02 CET
A fresh install on an MSDOS partition table 1TB disk (/dev/sda) into /dev/sda1.

An attempt to boot the new system fails.  The BIOS expects a valid MBR, but the MBR on /dev/sda is mostly zeros.  It does, however, end with 0x55, although the preceding byte is not 0xAA as expected.

I was pretty sure that the Summary Bootloader option said "grub2 on /dev/sda", but I figured I'd make sure, so I reran the install as an update, and when I got to the Summary, sure enough it said "grub2 on /dev/sda".  But when I selected the Bootloader tab, the next panel magically showed grub2 on EFI.  Both selections were in dropdown boxes which only had those values as choices.  There was no way to get back to "grub2 on /dev/sda".

So I assume that grub2 got installed on the ESP (/dev/sda9), but there's no MBR to get you there.

This is probably somehow related to a separate bug which forces you to define an ESP even though one is not needed

Or is this just my ignorance of EFI ?
Comment 1 Marja Van Waes 2017-02-14 01:11:58 CET
(In reply to Frank Griffin from comment #0)

Hi Frank :-)

For installer bugs, please do always attach /root/drakx/report.bug.xz 
https://wiki.mageia.org/en/Triage_guide#Installer-related_bugs 

> 
> I was pretty sure that the Summary Bootloader option said "grub2 on
> /dev/sda", but I figured I'd make sure, so I reran the install as an update,
> and when I got to the Summary, sure enough it said "grub2 on /dev/sda". 

I'm not sure the summary screen shows grub2-efi instead of grub2 as bootloader, when it's an EFI install.

@ docteam

Does anyone have a recent "EFI"-screenshot of that part of the summary screen?
http://docteam.mageia.nl/en/installer/content/images/dx2-summaryTop.png

> But
> when I selected the Bootloader tab, the next panel magically showed grub2 on
> EFI.  Both selections were in dropdown boxes which only had those values as
> choices.  There was no way to get back to "grub2 on /dev/sda".

So for EFI, it no longer looks like this
http://docteam.mageia.nl/en/installer/content/images/dx2-setupBootloader2.png
> 
> So I assume that grub2 got installed on the ESP (/dev/sda9), but there's no
> MBR to get you there.
> 
> This is probably somehow related to a separate bug which forces you to
> define an ESP even though one is not needed
> 
I think I found where you wrote about that bug
https://bugs.mageia.org/show_bug.cgi?id=20161#c26 and #c28 and #c30

(In reply to Frank Griffin from https://bugs.mageia.org/show_bug.cgi?id=20161#c30 )
> I didn't try to edit the boot parameters at all.  I got the usual MGA6 boot
> menu with "Install" and "Rescue".

You don't mention the F1-F6 options, memory test, HDT....

That sounds like such a boot menu
http://doc.mageia.org/installer/5/en/content/images/dx-welcome2.png
which is the EFI one.

The one you see when booting in legacy/CSM mode, still looks similar to this one:
http://doc.mageia.org/installer/5/en/content/images/dx-welcome.png

Which boot menu did you see in that install, and which one did you see for the install and "upgrade" now?

Please don't close this bug as invalid if you booted the iso in EFI mode, I can think of some enhancement requests for when someone boots in a different mode than desired ;-)

Keywords: (none) => NEEDINFO
CC: (none) => doc-bugs, mageiatools, marja11

Comment 2 Frank Griffin 2017-02-14 02:26:32 CET
(In reply to Marja van Waes from comment #1)
> (In reply to Frank Griffin from comment #0)
> 
> Hi Frank :-)
> 
> For installer bugs, please do always attach /root/drakx/report.bug.xz 
> https://wiki.mageia.org/en/Triage_guide#Installer-related_bugs 

I'll see if it's still around.

> That sounds like such a boot menu
> http://doc.mageia.org/installer/5/en/content/images/dx-welcome2.png
> which is the EFI one.
> 
> The one you see when booting in legacy/CSM mode, still looks similar to this
> one:
> http://doc.mageia.org/installer/5/en/content/images/dx-welcome.png
> 
> Which boot menu did you see in that install, and which one did you see for
> the install and "upgrade" now?

I saw the EFI one.  So I'll redo the install making sure that EFI is not involved, and check again.  However, I really don't like it if an EFI install can't be overridden by a non-EFI update install.  Apparently, the grub2 install puts stuff in /usr/lib which is specific to what it thinks it needs (x86_64-**), but writes a /boot/grub2/install.sh which simply invokes grub2-install with no parameters or switches.  This can't possibly work because the default for grub2-install is i386-pc which can't be found.  The error can be seen by trying "Redo boot install" from the rescue ISO.

> 
> Please don't close this bug as invalid if you booted the iso in EFI mode, I
> can think of some enhancement requests for when someone boots in a different
> mode than desired ;-)

I'm not sure what happened here.  It's a new PC that came with Win10 and EFI enabled.  I tried to disable everything related to EFI that I could, but obviously I didn't do it well enough.  Or maybe not.  We'll see on the retest.  I thought perhaps that the bug requiring an ESP partition might be driving the rest of this.
Comment 3 Frank Griffin 2017-02-14 02:59:29 CET
> Which boot menu did you see in that install, and which one did you see for
> the install and "upgrade" now?

As I said, I saw the EFI one for the install, but I saw the usual character-based isolinux prompt for the update install.

I just started the reinstall from the nonfree netinstall ISO and that gave me the non-EFI menu as well.
Comment 4 Charles Edwards 2017-02-14 03:48:00 CET
(In reply to Frank Griffin from comment #2)

> So I'll redo the install making sure that EFI is not
> involved, and check again.  However, I really don't like it if an EFI
> install can't be overridden by a non-EFI update install.   

I don't encourage it but if you set-it-up before hand you can switch a UFEI
to a CMS|MBR by doing an 'upgrade'

While booted in the old MGA6 use diskdrake to unmout the /boot/EFI partition
and remove the mount point.
Save the changes to fstab and the verify that there in no entry|mount point listed for /boot/EFI in fstab

Reboot and run the Mga6 upgrade.
At the configuration stage selet bootloader and you will be able to select
grub2 on /dev/sdx 

If / is btrfs or xfs there are additionl partitioning sets which need to be taken.

I have never tried the above, but I have done the opposite, upgraded a CSM|MBR
install on a dos /dev/sdc to a UEFI install on the dos /dev/sdc

CC: (none) => cae

Comment 5 André DESMOTTES 2017-02-14 17:19:30 CET
(In reply to Marja van Waes from comment #1)

> @ docteam
> 
> Does anyone have a recent "EFI"-screenshot of that part of the summary
> screen?
> http://docteam.mageia.nl/en/installer/content/images/dx2-summaryTop.png

What do you mean ? This screenshot is very recent, it is from the last version of Thu Jan 19 18:05:31


> 
> So for EFI, it no longer looks like this
> http://docteam.mageia.nl/en/installer/content/images/dx2-setupBootloader2.png
> > 

Yes, it is still this one with Grub2-efi.

CC: (none) => lebarhon

Comment 6 Frank Griffin 2017-02-14 17:32:50 CET
The reinstall completed and the Summary showed "grub2 - /dev/sda".  Selecting the bootloader tab still showed /dev/sda, and that's where a valid MBR was written.

I can't imagine any scenario where the HDD wouldn't get an MBR, but I'm chalking this one up to PEBKAC.

Status: NEW => RESOLVED
Resolution: (none) => INVALID


Note You need to log in before you can comment on or make changes to this bug.