Bug 32172 - installer installs in EFI, despite BIOS boot mode "Legacy" (probably really is CSM?) - Enh: add option to force legacy
Summary: installer installs in EFI, despite BIOS boot mode "Legacy" (probably really i...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-13 09:30 CEST by Ben McMonagle
Modified: 2023-08-22 23:16 CEST (History)
3 users (show)

See Also:
Source RPM:
CVE:
Status comment: Comment 14: add option to force legacy


Attachments
install report.bug.xz (184.81 KB, application/x-xz)
2023-08-13 09:31 CEST, Ben McMonagle
Details

Description Ben McMonagle 2023-08-13 09:30:13 CEST
Description of problem:
Hardware:
 Type: Laptop System: Acer product: TravelMate B113 v: V2.17

  Mobo: Acer model: BA10_HX v: Type2 - Board Version
    serial: <superuser required> UEFI: Acer v: 2.17 date: 12/09/2013

BIOS set to Legacy BIOS boot.

Booting to Mageia-9-x86_64 USB (Sat Aug 12 10:54:25 AM CEST 2023) does not present expected grub install menu, just a black screen with a cursor bar flashing top left of screen.

about a minute passes, and then the stage1 screen starts.
Install proceeds as normal.
at partitioning, Chose Custom Disk partitioning
set / and /homemount points.
was unable to proceed as installer complained about missing /boot/EFI mount-point.
set the required /boot/EFI mount point and set partition type to EFI system.
installer now allow install to proceed and complete.

at reboot, boot up  fails with:
GRUB loading Welcome to GRUB!

error: ../,../grub-core/fs/fshelp.c:257:file `/boot/brub2/i386-pc/normal.mos' not found
entering rescue mode...
grub rescue>.

changing BIOS boot mode from Legacy to UEFI also does not allow bootup.
 

Version-Release number of selected component (if applicable):


How reproducible: on this hardware, always


Steps to Reproduce:
1.Set BIOS to Legacy BIOS
2.boot installer USB: Mageia-9-x86_64 (Sat Aug 12 10:54:25 AM CEST 2023)
3.
Comment 1 Ben McMonagle 2023-08-13 09:31:09 CEST
Created attachment 13940 [details]
install report.bug.xz
Ben McMonagle 2023-08-13 09:36:42 CEST

Summary: installer installs in EFI, BIOS is set to legacy boot => installer installs in EFI, BIOS is set to BOOT MODE [Legacy BIOS]

Comment 2 Martin Whitaker 2023-08-13 10:36:32 CEST
The installer log shows the installer was booted in EFI mode.

CC: (none) => mageia

Comment 3 Dave Hodgins 2023-08-13 19:44:20 CEST
I successfully installed in bios mode. Resulting fstab ...
# cat /x9c/etc/fstab
# Entry for /dev/sdc2 :
UUID=0fb49673-d59f-4bbb-b642-7c70ca2c54d2 / ext4 relatime,acl 1 1
# Entry for /dev/sdc1 :
UUID=038636dd-cd75-4507-b110-ed8680ac00af /boot ext4 relatime,acl 1 2
none /proc proc defaults 0 0
# Entry for /dev/sdc5 :
UUID=465cee19-5696-4266-98a3-9cbe8cc7a506 swap swap defaults 0 0
# Entry for /dev/sde2 :
UUID=61cdfec7-2542-4c14-b710-7d32a3c4f1f7 swap swap defaults 0 0

On my system lshw shows ...
     *-firmware
          description: BIOS
          vendor: American Megatrends Inc.
          physical id: 0
          version: 1604
          date: 10/16/2012

This system is capable of booting in uefi mode, but will boot in bios mode
without keyboard interaction during boot, so I only used it for uefi testing
until I obtained another system that only works in uefi mode.

When presing f8 during booting, the boot device selection screen that is
used to select the boot from the usb stick allows selecting the usb stick
in bios mode, with a second nearly identical menu entry for booting in
uefi firmware mode.

I suspect your hardware is similar and that uefi mode was selected for booting
the usb stick.

I did a clean plasma x86-64 install without online media. Install completed
with zero errors.

CC: (none) => davidwhodgins

Comment 4 Ben McMonagle 2023-08-13 21:06:14 CEST
Bios has boot options for :
[Legacy BIOS]

or 

[UEFI].

there is no keyboard option for selecting installer mode.

System bios is set to legacy yet boots into UEFI mode.

If I unplug the x86_64 USB, fit the i586 USB and reboot, the installer boot screen is brought up immediately.

the x86_64 USB does not present the installer boot screen.
Comment 5 Martin Whitaker 2023-08-13 21:11:13 CEST
(In reply to Ben McMonagle from comment #4)
> the x86_64 USB does not present the installer boot screen.

If it worked with the rc1 ISO, this is either a kernel or grub2 regression (both have been updated). But do first check for bad USB stick / bad copy / bad USB socket.
Comment 6 Lewis Smith 2023-08-13 21:16:41 CEST
Leaving with Bugsquad for the moment; but not forever!

CC: (none) => lewyssmith
Component: RPM Packages => Installer

Comment 7 Dave Hodgins 2023-08-13 21:38:53 CEST
The very first screen shown during boot has menu entries ...
 Install Mageia
 Rescue System
 Memory Test

The title of that screen in the upper middle has "Mageia 9 (64-bit)" when
the usb stick has been booted in bios firmware mode.

When booted in uefi firmware mode the title is "Mageia 9 (64-bit EFI)".

If you're seeing EFI on that first screen, then it's either a bug in the
firmware, or it's the wrong menu entry being selected when selecting the
device to boot the system from.

Assigning to qa instead of bug squad until this can be resolved.

Assignee: bugsquad => qa-bugs

Comment 8 Martin Whitaker 2023-08-13 22:04:59 CEST
@Dave, see Ben's first comment. The GRUB menu is not being displayed, so he can't see the title.

I've tested on three different machines here without seeing that, so it's not a generic problem with the ISO.
Comment 9 Ben McMonagle 2023-08-13 22:52:56 CEST
Im thinking that this might be tied up with Fred James Acer issue.

I am away from that machine for the day (work stuff) so will look further tonight.
Comment 10 Ben McMonagle 2023-08-14 07:56:16 CEST
(In reply to Martin Whitaker from comment #5)
> (In reply to Ben McMonagle from comment #4)
> > the x86_64 USB does not present the installer boot screen.
> 
> If it worked with the rc1 ISO, this is either a kernel or grub2 regression
> (both have been updated). But do first check for bad USB stick / bad copy /
> bad USB socket.

USB  legacy boots Toshiba R930 ok.
Acer has 3 USB sockets, all behave the same.

will check RC1
Comment 11 Martin Whitaker 2023-08-14 09:59:16 CEST
The Acer is the machine where the BIOS chip failed, yes? Does it have the latest BIOS version?
Comment 12 Ben McMonagle 2023-08-14 11:37:32 CEST
(In reply to Martin Whitaker from comment #11)
> The Acer is the machine where the BIOS chip failed, yes? Does it have the
> latest BIOS version?

yes, it is that machine.

BIOS version 2.22 is the latest available - Windows only install.
catch-22.

guess I will have to install Windows to update.


anyway, I am away for a week.
dont let this hold up release if there is nothing else.
Comment 13 Ben McMonagle 2023-08-15 00:25:24 CEST
I have managed to restore boot functioning.

Plugged in a i586 installer USB.
at the installer boot screen pressed "c"
brings up the "grub" prompt.
"ls" to list the partitions.
> ls (hd1,gpt2)/ to confirm / partition.
> ls (hd1,gpt2)/boot/ to check for vmlinuz and initrd.

run the following:
> set root=(hd1,gpt2)
> linux /boot/vmlinuz root=/dev/sda2
> initrd /boot/initrd.img
> boot.

logged in to DE.
# urpmi grub2
# dracut -f
# update-grub2
# grub2-install /dev/sda

installing for i386.....
# reboot 

expected grub boot menu.
normal boot up to desktop.

note:
When the bios is set to [UEFI], the normal UEFI x86_64 CI installer grub boot menu is displayed from the original installer USB.

Still not sure about flashing the bios chip.
Lewis Smith 2023-08-15 20:18:53 CEST

CC: lewyssmith => (none)

Comment 14 Thomas Backlund 2023-08-17 21:02:27 CEST
(In reply to Ben McMonagle from comment #4)
> Bios has boot options for :
> [Legacy BIOS]
> 
> or 
> 
> [UEFI].
> 
> there is no keyboard option for selecting installer mode.
> 
> System bios is set to legacy yet boots into UEFI mode.


which probably means it's one of those systems where "Legacy BIOS" is actually CSM mode, which means it advertises both legacy and uefi, -> our iso boots in efi mode.

I have from time to time thought about adding a "noefi" boot parameter to make the installer ignore uefi and setup the system in "lagacy mode" but have never gotten around to do it...
Comment 15 Morgan Leijström 2023-08-18 14:40:09 CEST
Sounds like a good idea

CC: (none) => fri
Assignee: qa-bugs => mageiatools
Summary: installer installs in EFI, BIOS is set to BOOT MODE [Legacy BIOS] => installer installs in EFI, despite BIOS boot mode "Legacy" (probably really is CSM?) - Enh: add option to force legacy
Status comment: (none) => Comment 14: add option to force legacy
Severity: normal => enhancement

Comment 16 Morgan Leijström 2023-08-18 14:40:51 CEST
I guess also Live installer need to handle this somehow.
Comment 17 Ben McMonagle 2023-08-22 07:07:47 CEST
(In reply to Dave Hodgins from comment #3)

curiously:

Mageia-9-Live-Xfce-x86_64 displays the "UEFI" menu.

Mageia-9-x86_64.iso does not.

from power on key, a blank screen until (and it takes a while) there is displayed the "stage-1" "please wait, detecting USB devices".
Comment 18 Ben McMonagle 2023-08-22 07:13:43 CEST
(In reply to Thomas Backlund from comment #14)
> (In reply to Ben McMonagle from comment #4)
> > Bios has boot options for :
> > [Legacy BIOS]
> > 
> > or 
> > 
> > [UEFI].
> > 
> > there is no keyboard option for selecting installer mode.
> > 
> > System bios is set to legacy yet boots into UEFI mode.
> 
> 
> which probably means it's one of those systems where "Legacy BIOS" is
> actually CSM mode, which means it advertises both legacy and uefi, -> our
> iso boots in efi mode.
> 

seems to be likely.

boot mode options are:[Legacy BIOS] or [UEFI].

in the "item specific help" window, the text:

Select boot type to Dual type, Legacy type or UEFI type.

seems that [Legacy BIOS] is actually Dual type.

If I choose to boot the i586 isos, they correctly boot into legacy BIOS mode.
Comment 19 Ben McMonagle 2023-08-22 07:19:04 CEST
seems like there are 2 bugs here.

1/ the BIOS issue.

2/ grub boot loader not displayed for x86_64 CI with this hardware.
should I create a separate B/R for this issue?
Comment 20 Morgan Leijström 2023-08-22 09:32:59 CEST
(In reply to Ben McMonagle from comment #19)

> 2/ grub boot loader not displayed for x86_64 CI with this hardware.
> should I create a separate B/R for this issue?

I think so.
Comment 21 Martin Whitaker 2023-08-22 10:30:17 CEST
(In reply to Ben McMonagle from comment #17)
> curiously:
> 
> Mageia-9-Live-Xfce-x86_64 displays the "UEFI" menu.
> 
> Mageia-9-x86_64.iso does not.
>
The boot structure on both CI and Live ISOs is automatically generated by the same code, so is basically identical. The only difference I can see, apart from the GRUB menu text, is the physical location of the various files. It may or may not be relevant that the byte offset of the FAT ESP on the CI ISO is slightly too large to fit in 32 bits.

Note that there are actually two ESPs on the ISOs, one in the ISO filesystem in the first partition, used for CD/DVD boot, the other in the second partition, used for USB boot. One of my machines here detects both and lets me boot from either. Does your BIOS boot menu indicate whether it is treating the ISO as a CD or as a USB stick?

> from power on key, a blank screen until (and it takes a while) there is
> displayed the "stage-1" "please wait, detecting USB devices".

That says to me that GRUB is being successfully loaded and run, and you are just waiting for the 10 second timeout before the default menu entry is chosen.

If you still have rc1 and/or beta2 ISOs, it would be good to know if this is new behaviour, or whether it appeared after you replaced your BIOS chip.
Comment 22 Ben McMonagle 2023-08-22 23:08:37 CEST
(In reply to Martin Whitaker from comment #21)
> (In reply to Ben McMonagle from comment #17)
> > curiously:
> > 
> > Mageia-9-Live-Xfce-x86_64 displays the "UEFI" menu.
> > 
> > Mageia-9-x86_64.iso does not.
> >

> If you still have rc1 and/or beta2 ISOs, it would be good to know if this is
> new behaviour, or whether it appeared after you replaced your BIOS chip.

Tried both RC1 and Mga8 CI.
both exhibit the issue.

I cannot say if the issue was apparent before the chip  replacement.
Comment 23 Ben McMonagle 2023-08-22 23:16:19 CEST
(In reply to Martin Whitaker from comment #21)

> 
> Note that there are actually two ESPs on the ISOs, one in the ISO filesystem
> in the first partition, used for CD/DVD boot, the other in the second
> partition, used for USB boot. One of my machines here detects both and lets
> me boot from either. Does your BIOS boot menu indicate whether it is
> treating the ISO as a CD or as a USB stick?

boot priority order is:
1. USB HDD : USB  Flash Memory
2. HDDO : ST320LT020-9YG142
3. ATAPI CDROM :
4. USB FDD :
5. Network Boot : BRCM MBA Slot 0400 v15.0.11
6. USB CDROM

looks like it is treating it as a USB stick

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