Manjaro KDE 21.1.0 EFI problem - cannot enter BIOS pressing F2 nor grub remembers last booted OS (when using BTRFS)

After install Manjaro 21.1.0 KDE Edition on my notebook (dual boot with Windows 10) I cannot enter BIOS setup anymore.

Can boot Manjaro or Windows but not enter BIOS setup pressing F2 after turn on/restart notebook.

After some googling I confirmed my suspicious: grub and/or installation caused the problem. From Windows I manage to reach EFI partition and deleted Manjaro folder. After that, BIOS setup can be acessed again. But now I lost grub.

Booted from Manjaro ISO but doesn’t know how to reinstall correctly grub2.

Can someone please help me with this? :innocent:

[manjaro@manjaro ~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0  70.7M  1 loop /run/miso/sfs/livefs
loop1         7:1    0   579M  1 loop /run/miso/sfs/mhwdfs
loop2         7:2    0   1.5G  1 loop /run/miso/sfs/desktopfs
loop3         7:3    0 731.8M  1 loop /run/miso/sfs/rootfs
sda           8:0    0   1.8T  0 disk 
sdb           8:16   1  57.9G  0 disk 
├─sdb1        8:17   1  57.9G  0 part 
│ └─ventoy  254:0    0     3G  1 dm   /run/miso/bootmnt
└─sdb2        8:18   1    32M  0 part 
nvme0n1     259:0    0 465.8G  0 disk 
nvme1n1     259:1    0 238.5G  0 disk 
├─nvme1n1p1 259:2    0   100M  0 part 
├─nvme1n1p2 259:3    0    16M  0 part 
├─nvme1n1p3 259:4    0   150G  0 part 
├─nvme1n1p4 259:5    0   518M  0 part 
└─nvme1n1p5 259:6    0  87.8G  0 part

P.S.:

  • /dev/nvme1n1p1 is the FAT32 EFI partition and my / is on /dev/nvme1n1p5 using BTRFS
  • already had installed Manjaro on this notebook, same disk layout, with two or more RCs of Manjaro 21.1; something changed in the final ISO that caused the problem
  • on latest RC I noticed that grub wasn’t remembering last option choosed (always got back to Manjaro)

I reinstalled Manjaro KDE 21.1.0 and the problem returned: I cannot access BIOS setup anymore (pressing F2 right after turn on/reboot). If I try, I got only a black screen with cursor top-left. I need to turn off/turn on the notebook.

I also enabled the save default function on /etc/default/grub but besides does not work, another error message appear.

[peracchi@helios ~]$ sudo vi /etc/default/grub
[peracchi@helios ~]$ sudo update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.13-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.13-x86_64.img
Found initrd fallback image: /boot/initramfs-5.13-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Info: Separate boot partition not detected
No snapshots found.
If you think an error has occurred , please file a bug report at " https://github.com/Antynea/grub-btrfs "
Nothing to do. Abort.
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme1n1.
done
[peracchi@helios ~]$ head /etc/default/grub
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT="true"

When choose to boot Windows:

When choose to boot Manjaro:

When try to enter BIOS setup:

[peracchi@helios ~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0   1,8T  0 disk 
nvme1n1     259:0    0 238,5G  0 disk 
├─nvme1n1p1 259:1    0   100M  0 part /boot/efi
├─nvme1n1p2 259:2    0    16M  0 part 
├─nvme1n1p3 259:3    0   150G  0 part 
├─nvme1n1p4 259:4    0   518M  0 part 
└─nvme1n1p5 259:5    0  87,8G  0 part /var/log
                                      /var/cache
                                      /home
                                      /
nvme0n1     259:6    0 465,8G  0 disk 
[peracchi@helios ~]$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=0444-01E1                            /boot/efi      vfat    umask=0077 0 2
UUID=647adcb2-6a67-4969-b7ce-8f4c81c0c706 /              btrfs   subvol=/@,defaults,noatime,space_cache 0 1
UUID=647adcb2-6a67-4969-b7ce-8f4c81c0c706 /home          btrfs   subvol=/@home,defaults,noatime,space_cache 0 2
UUID=647adcb2-6a67-4969-b7ce-8f4c81c0c706 /var/cache     btrfs   subvol=/@cache,defaults,noatime,space_cache 0 2
UUID=647adcb2-6a67-4969-b7ce-8f4c81c0c706 /var/log       btrfs   subvol=/@log,defaults,noatime,space_cache 0 2
[peracchi@helios ~]$ sudo ls -lha /boot/efi/
total 3,0K
drwx------ 4 root root 1,0K dez 31  1969  .
drwxr-xr-x 1 root root  260 ago 17 16:17  ..
drwx------ 5 root root 1,0K ago 17 16:17  EFI
drwx------ 2 root root 1,0K jun  2 08:30 'System Volume Information'
[peracchi@helios ~]$ sudo ls -lha /boot/efi/EFI
total 5,0K
drwx------ 5 root root 1,0K ago 17 16:17 .
drwx------ 4 root root 1,0K dez 31  1969 ..
drwx------ 2 root root 1,0K jun  2 08:28 Boot
drwx------ 2 root root 1,0K ago 17 16:17 Manjaro
drwx------ 4 root root 1,0K jun  2 08:27 Microsoft
[peracchi@helios ~]$ sudo ls -lha /boot/efi/EFI/Boot
total 278K
drwx------ 2 root root 1,0K jun  2 08:28 .
drwx------ 5 root root 1,0K ago 17 16:17 ..
-rwx------ 1 root root 276K ago 17 16:17 bootx64.efi
[peracchi@helios ~]$ sudo ls -lha /boot/efi/EFI/Manjaro
total 278K
drwx------ 2 root root 1,0K ago 17 16:17 .
drwx------ 5 root root 1,0K ago 17 16:17 ..
-rwx------ 1 root root 276K ago 17 16:17 grubx64.efi
[peracchi@helios ~]$ sudo ls -lha /boot/efi/EFI/Microsoft
total 8,0K
drwx------  4 root root 1,0K jun  2 08:27 .
drwx------  5 root root 1,0K ago 17 16:17 ..
drwx------ 40 root root 5,0K jun  2 08:27 Boot
drwx------  2 root root 1,0K jun  2 08:28 Recovery

As I said, these problems come with final Manjaro 21.1. Previous RCs doesn´t cause this.

Any ideas on how to fix?

Change this to

GRUB_TIMEOUT_STYLE=menu

and run

sudo update-grub

Finally, reboot.

To get into your firmware you have to type the correct key (maybe F2) most likely several times after powering on your PC to hit it at the right time before grub takes over. :wink:

2 Likes

Hi Wollie!

I tried your suggestion to fix grub, it does not worked… :neutral_face:

And about the “correct key” I mentioned on second post that I was using F2. The key press is processed but the notebook cannot enter BIOS setup, keeps on black screen with cursor at top left.

Do you saw the photos I attached above? There is error message if I choose Windows (1) on grub menu, if I choose Manajro (2) on grub menu and (3) shows notebook screen after F2 keypress gets processed.

As I mentioned, this began to occur only after I use final Manjaro KDE 21.1 ISO to do a fresh install. I used manjaro-kde-21.1.0-210817-linux513.iso whith sha1 = 4d18f0b445434af814974b4942c80ee8f3266efe.

With previous RCs this thing of not being able to enter BIOS setup and error messages after choose with OS boot do not occured.

There are three problems with manjaro-kde-21.1.0-210817-linux513.iso on this notebook model:

  • cannot enter BIOS setup pressing F2 several times after turn on/before grub takes over
  • grub does not “remember” last OS booted
  • error messages, one when choose Manjaro and other when choose Windows, before OS properly boots

Which other informations can I provide to help to find the root cause/fix the problem?

P.S.:

  • if I remove “Manjaro” folder from /boot/efi (EFI partition) the notebook can enter BIOS setup as usual, pressing F2 and no error messages are showed; for sure it’s a problem related to grub in this final ISO
  • this must be related to “For btrfs installations, the default subvolume layout has been improved for easier rollbacks and less wasted space on snapshots.” (from release annoucement) as I read somewhere that this change was implemented on the final ISO but not in previous RCs

Tried install again, from scratch, using EXT4 for /.

The problem to enter BIOS setup remains (not even try to alter /etc/default/grub to make grub “remember” last booted OS).

After remove Manjaro directory under /boot/efi BIOS setup can be accessed again.

Some info before/after remove folder /boot/efi/Manjaro

[manjaro@manjaro ~]$ sudo efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,0001,2001,2002,2003
Boot0000* USB HDD: SanDisk
Boot0001* Windows Boot Manager
Boot0002* Manjaro
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
[manjaro@manjaro ~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0  70.7M  1 loop /run/miso/sfs/livefs
loop1         7:1    0   579M  1 loop /run/miso/sfs/mhwdfs
loop2         7:2    0   1.5G  1 loop /run/miso/sfs/desktopfs
loop3         7:3    0 731.8M  1 loop /run/miso/sfs/rootfs
sda           8:0    0   1.8T  0 disk
sdb           8:16   1  57.9G  0 disk
├─sdb1        8:17   1  57.9G  0 part
│ └─ventoy  254:0    0     3G  1 dm   /run/miso/bootmnt
└─sdb2        8:18   1    32M  0 part
nvme1n1     259:0    0 238.5G  0 disk
├─nvme1n1p1 259:1    0   100M  0 part
├─nvme1n1p2 259:2    0    16M  0 part
├─nvme1n1p3 259:3    0   150G  0 part
├─nvme1n1p4 259:4    0   518M  0 part
└─nvme1n1p5 259:5    0  87.8G  0 part
nvme0n1     259:6    0 465.8G  0 disk
[manjaro@manjaro ~]$ sudo mkdir /mnt/efi
[manjaro@manjaro ~]$ sudo mount /dev/nvme1n1p1 /mnt/efi
[manjaro@manjaro ~]$ cd /mnt/efi/
[manjaro@manjaro efi]$ ls -lha
total 3.0K
drwxr-xr-x 4 root root 1.0K Dec 31  1969  .
drwxr-xr-x 1 root root   60 Aug 18 13:19  ..
drwxr-xr-x 5 root root 1.0K Aug 17 16:17  EFI
drwxr-xr-x 2 root root 1.0K Jun  2 08:30 'System Volume Information'
[manjaro@manjaro efi]$ cd EFI
[manjaro@manjaro EFI]$ ls -lha
total 5.0K
drwxr-xr-x 5 root root 1.0K Aug 17 16:17 .
drwxr-xr-x 4 root root 1.0K Dec 31  1969 ..
drwxr-xr-x 2 root root 1.0K Jun  2 08:28 Boot
drwxr-xr-x 2 root root 1.0K Aug 17 16:17 Manjaro
drwxr-xr-x 4 root root 1.0K Jun  2 08:27 Microsoft
[manjaro@manjaro EFI]$ ls -lha Manjaro/
total 138K
drwxr-xr-x 2 root root 1.0K Aug 17 16:17 .
drwxr-xr-x 5 root root 1.0K Aug 17 16:17 ..
-rwxr-xr-x 1 root root 136K Aug 18 13:07 grubx64.efi
[manjaro@manjaro EFI]$ sudo rm -rf Manjaro/

--- after reboot

[manjaro@manjaro ~]$ sudo efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0000* USB HDD: SanDisk
Boot0001* Windows Boot Manager
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

mod. edit: removed useless pictures

Does

$ systemctl reboot --firmware-setup

also bring you to a black screen on reboot?

Yes, same result as turn off/turn on/F2. Also try the same approach from Windows 10 takes to black screen… :neutral_face:

I reinstalled Manjaro KDE 21.1.0 again, using BTRFS for /, same results. But I done this again to capture some screenshots to show something strange: even selecting the proper EFI system partition, the installer warns about it.

I have no idea what can be the root cause of the problem.

For sure I know that is “something” inside /boot/efi/Manjaro because if this folder is removed, notebook access to BIOS setup goes back to normal.

:crazy_face:


Moderator edit: removed useless pictures… again.

Hm, interesting case.

it is not the error actually, despite it mentioned as error: it was reported ([Stable Staging Update] 2021-08-16 - Kernels, KDE Software, Nvidia, Firefox, Thunderbird, Mate - #31 by Chrysostomus) and should be fixed in future: just no snapshots found so no new GRUB entries. All update-grub functionality works well, but no snapshot state shows the error instead of informational level msg.


and

Also, please wait for the answer for right pattern to use: [Stable Staging Update] 2021-08-16 - Kernels, KDE Software, Nvidia, Firefox, Thunderbird, Mate - #34 by alven


So, actually the /boot/efi/EFI/Manjaro, not the /boot/efi/Manjaro


Next is just my summarizing of key points and are just thoughts:

That could be a key to find a commit difference in GRUB-related stuff compare to: which one RC? Try to remember, please.
Best if you will remember/find both exact ISO names: old working and current w/ the issue.
May be RC you used before is here: Tags · manjaro/release-review · GitHub

May be you have a pair of keys? F2 and somewhat else like
Esc, F10, F11. F12, Del, etc.
May be possible second key works? Check PC docs.

Since it is an issue of BIOS/UEFI “communication” with the grubx64.efi file
(

as you listed your Manjaro folder and mine also has single file
sudo ls --almost-all -1 /boot/efi/ --group-directories-first --recursive -l -v
/boot/efi/:
total 4
drwx------ 4 root root 4096 Aug 17 14:26 EFI

/boot/efi/EFI:
total 8
drwx------ 2 root root 4096 Aug 17 14:26 Manjaro
drwx------ 2 root root 4096 Aug 17 14:26 boot

/boot/efi/EFI/Manjaro:
total 348
-rwx------ 1 root root 356352 Aug 17 14:26 grubx64.efi

/boot/efi/EFI/boot:
total 348
-rwx------ 1 root root 356352 Aug 17 14:26 bootx64.efi

) it is a bug of:

  1. the source file (grubx64.efi)
    or
  2. the reader and interpreter/executor (BIOS/UEFI).

For (1): please try point to exact ISO images your used in both cases.
For (2): do you have the latest available BIOS/UEFI version installed on that your device?

After (1) may be we can compare files itself or commits which changes them?
But probably it is not human-readable files, but object-code or machine-code file

Hm, the file header is like Windows DLL and executable file (my copy)


with plain text from time to time:

@Chrysostomus, could you, please, try to advice somewhat to test in try to illuminate / to point a source of the problem closer?

May be I suggested something pointless or wrong or I see it too close and not able to see other ways/problem sources.

The problem of grub does not remember last booted OS is already known. I found some threads that explain that the problem is grub cannot save data on BTRFS (or subvolumes). But is something between grub and BTRFS. Using EXT4 grub can save his data and remember last booted OS.

I have an external USB keyboard and using F2 on it, on notebook keyboard (with or without external keyboard) gives the same result. On the other hand, F12 (for select boot device) works normally, both on notebook keyboard and on external keyboard.

The problem may be related to “For btrfs installations, the default subvolume layout has been improved for easier rollbacks and less wasted space on snapshots.” (from release annoucement) as I read somewhere that this change was implemented on the final ISO but not in previous RCs. But the problem occurs even if I use EXT4 for /.

To people reading this thread: I tried with some other distros and until now the results are:

  • Garuda KDE Dr460nized = same problem
  • Debian 11 “bullseye” = same problem
  • Ubuntu 21.04 = no problem

So it’s not something strict related to Manjaro.

It’s some interaction between BIOS UEFI code and the contents of /boot/efi/EFI/ subfolders (created by each distribution).

Until now the “fix” it’s always the same: delete the distro created folder under /boot/efi/EFI/ (or simple drive_letter:\EFI on Windows).

:crazy_face:

2 Likes

So many resource-consuming tries. Not an average user will do that.

1 Like

For me this is notebook’s problem. Even if grub puts something wrong in the EFI partition, the UEFI/BIOS should always be able to boot. In my opinion you have to report this to the notebook’s manufacturer.

1 Like

FWIW – Not only I have not been able to boot any USB stick containing current and previous Manjaro releases on my HP dv6-7210us laptop, but any attempt of booting such USB would prevent normal BIOS access (using ESC key), as well as would somewhat mess up the immediately following boot of the hard-disk’s resident OS (e.g., Mint or Kubuntu): it would cause the resident OS’s Grub menu to pop up instead of just booting straight into the OS.

I also noticed that I had the same issue exact with ArcoLinux but with none of the other Ubuntu distros (Mint, AntiX/MXLinux, Kubuntu) – so it seems that the root cause is baked into the common core ArchLinux of ArcoLinux and Manjaro.

I just posted here: [BIOS bug] Predator PH315-52 with BIOS v1.12 does not enter setup (pressing F2) after install Linux — Acer Community

I also will try to find an “official channel” with Acer to try to solve this problem.

But why Ubuntu 21.04 works fine and other distros (including new Manjaro) do not? :thinking:

I had the same issue on EndeavourOS/Arch.

Nope, because I got the same problem installing Debian 11 “bullseye”. It’s something more broader.

The mystery (for now) is why Ubuntu 21.04 (relatively new) works fine and Debian 11 not.

Are you comparing so old (Apr 2021) distro with nowasays Manjaro (17-Aug-2021)? Probably they use different grub versions of that file, which you delete insode Manjaro folder and everything works fine.
Remember that you report that RC works well: probably that stuff was changed to more up-to-date and may be having that issue.

Let’s make a fog weaker: what grub and that file version does the Debian 11 has?
When it was updated last time? A date near Manjaro released 21.1? (17-Aug-2021)

To which exact package name that grubx64.efi file belongs to?

If you are using UEFI, try to change grub to systemd-boot or refind :wink:

If you want to use systemd-boot, you have to create new partition /boot or /efi with FAT32 and ESP, not /boot/efi.

I think refind is good for you.

Thanks, I am reading about it now.

Will it work with only the FAT32 partition for /boot/efi and only one BTRFS for / ?

FWIW – on my HP dv6-7210us I had no problem booting USB with Debian 11 “bullseye” (except that the desktop display resolution of the USB Live instant is terrible purportedly because of lack of appropriate graphic display “firmware”).