Strange uefi behavior

My UEFI behaves strange. For example:

I was in my PCs UEFI menu to show some settings to @fabby , but after this there are 2 new entries showing in efibootmgr. But i did not save anything in UEFI. I did try to boot some of the entries, went into the EFI-shell and then just exited it and booted Manjaro again with grub.

before:

efibootmgr                                                                                       [127]
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,001A,0004,0020,001B,0021,0022,0003
Boot0000* manjaro
Boot0003* UEFI: Built-in EFI Shell
Boot0004* UEFI OS
Boot001A* UEFI OS
Boot001B* Hard Drive
Boot0020* UEFI OS
Boot0021* USB
Boot0022* UEFI:  USB DISK 2.0 PMAP, Partition 1

I went into UEFI, and am back:

efibootmgr                                                     
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,001A,0004,0020,0023,001B,0024,0021,0022,0003
Boot0000* manjaro
Boot0003* UEFI: Built-in EFI Shell
Boot0004* UEFI OS
Boot001A* UEFI OS
Boot001B* Hard Drive
Boot0020* UEFI OS
Boot0021* USB
Boot0022* UEFI:  USB DISK 2.0 PMAP, Partition 1
Boot0023* UEFI OS
Boot0024* CD/DVD Drive

Do you notice ? now there are 2 lines added which where not there last time :scream:

I give in, i do have a complicated setup on my machine. This is because i don’t often buy new hardware, but i do gradually upgrade part by part. Since some time i am afraid to change anything in the UEFI or boot-order because my UEFI does (for me) strange things. I do use Linux since more then 20 years, my actual Manjaro install is from 2017. Once i used lilo then grub, I had rEFInd, (but lost it) today I am with grub 2.06.

(Sorry for the spelling errors: not a native :uk: )

Ah, and yes

inxi -Fazy                                                                                                                                                                     
System:
  Kernel: 5.13.11-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.13-x86_64 
  root=UUID=3487ba3d-1cba-4cdc-a043-c420ebca2aca rw rootflags=subvol=@ 
  bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash 
  modprobe.blacklist=ccp udev.log_priority=3 audit=0 sysrq_always_enabled=1 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm 4.16.1 
  dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Desktop Mobo: ASRock model: B450 Pro4 serial: <filter> 
  UEFI: American Megatrends v: P1.10 date: 06/19/2018 
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard K270 
  serial: <filter> charge: 100% (should be ignored) rechargeable: yes 
  status: Discharging 
CPU:
  Info: 8-Core model: AMD Ryzen 7 2700 bits: 64 type: MT MCP arch: Zen+ 
  family: 17 (23) model-id: 8 stepping: 2 microcode: 800820D cache: L2: 4 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 102255 
  Speed: 1547 MHz min/max: 1550/3200 MHz boost: enabled Core speeds (MHz): 
  1: 1547 2: 1546 3: 1542 4: 1547 5: 1547 6: 1546 7: 1378 8: 1377 9: 1515 
  10: 1383 11: 1512 12: 1460 13: 1390 14: 1444 15: 1376 16: 1377 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: 
  disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA GK107 [GeForce GT 740] vendor: eVga.com. driver: nouveau 
  v: kernel bus-ID: 01:00.0 chip-ID: 10de:0fc8 class-ID: 0300 
  Device-2: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: Gigabyte 
  driver: nouveau v: kernel bus-ID: 27:00.0 chip-ID: 10de:1c82 class-ID: 0300 
  Device-3: Logitech C922 Pro Stream Webcam type: USB 
  driver: snd-usb-audio,uvcvideo bus-ID: 1-6.1:5 chip-ID: 046d:085c 
  class-ID: 0102 serial: <filter> 
  Display: x11 server: X.org 1.20.13 compositor: xfwm4 v: 4.16.1 driver: 
  loaded: nouveau unloaded: modesetting alternate: fbdev,nv,vesa 
  resolution: <missing: xdpyinfo> 
  OpenGL: renderer: NV137 v: 4.3 Mesa 21.1.6 direct render: Yes 
Audio:
  Device-1: NVIDIA GK107 HDMI Audio vendor: eVga.com. driver: snd_hda_intel 
  v: kernel bus-ID: 01:00.1 chip-ID: 10de:0e1b class-ID: 0403 
  Device-2: NVIDIA GP107GL High Definition Audio vendor: Gigabyte 
  driver: snd_hda_intel v: kernel bus-ID: 27:00.1 chip-ID: 10de:0fb9 
  class-ID: 0403 
  Device-3: AMD Family 17h HD Audio vendor: ASRock driver: snd_hda_intel 
  v: kernel bus-ID: 29:00.3 chip-ID: 1022:1457 class-ID: 0403 
  Device-4: Logitech C922 Pro Stream Webcam type: USB 
  driver: snd-usb-audio,uvcvideo bus-ID: 1-6.1:5 chip-ID: 046d:085c 
  class-ID: 0102 serial: <filter> 
  Sound Server-1: ALSA v: k5.13.11-1-MANJARO running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 15.0 running: no 
  Sound Server-4: PipeWire v: 0.3.33 running: yes 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASRock driver: r8169 v: kernel port: c000 bus-ID: 25:00.0 
  chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp37s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB 
  driver: btusb v: 0.8 bus-ID: 1-6.2:6 chip-ID: 0a12:0001 class-ID: e001 
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter> 
Drives:
  Local Storage: total: 3.41 TiB used: 459.37 GiB (13.1%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: A-Data model: SX8200PNP 
  size: 1.86 TiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 type: SSD serial: <filter> rev: 42AZS6AC temp: 39.9 C scheme: GPT 
  ID-2: /dev/sda maj-min: 8:0 vendor: SanDisk model: SDSSDH31000G 
  size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  type: SSD serial: <filter> rev: 10RL scheme: GPT 
  ID-3: /dev/sdb maj-min: 8:16 vendor: A-Data model: SP610 size: 476.94 GiB 
  block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD 
  serial: <filter> rev: 2C scheme: GPT 
  ID-4: /dev/sdc maj-min: 8:32 vendor: A-Data model: SX900 size: 119.24 GiB 
  block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD 
  serial: <filter> rev: 7a scheme: GPT 
  ID-5: /dev/sdd maj-min: 8:48 type: USB model: USB DISK 2.0 size: 59.53 GiB 
  block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> 
  rev: PMAP scheme: GPT 
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Partition:
  ID-1: / raw-size: 900 GiB size: 900 GiB (100.00%) used: 459.37 GiB (51.0%) 
  fs: btrfs dev: /dev/sda2 maj-min: 8:2 
  ID-2: /boot/efi raw-size: 953 MiB size: 951.1 MiB (99.80%) 
  used: 564 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 
  ID-3: /home raw-size: 900 GiB size: 900 GiB (100.00%) 
  used: 459.37 GiB (51.0%) fs: btrfs dev: /dev/sda2 maj-min: 8:2 
Swap:
  Alert: No swap data was found. 
Sensors:
  System Temperatures: cpu: 37.8 C mobo: N/A 
  Fan Speeds (RPM): N/A 
  GPU: device: nouveau temp: 40.0 C mV: 975.00 device: nouveau temp: 61.0 C 
  fan: 0 
Info:
  Processes: 445 Uptime: 19m wakeups: 2 Memory: 46.99 GiB 
  used: 10.15 GiB (21.6%) Init: systemd v: 248 tool: systemctl Compilers: 
  gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 2062 lib: 457 Shell: Zsh v: 5.8 
  running-in: xfce4-terminal inxi: 3.3.06 
➜  efi                                                                                                                                                                                

fabby said to ask for @stephane :wink:

I would like to:

  • reinstall rEFInd (for safety)
  • clean the entries in UEFI and keep only the necessary

This is not urgent, but it has to be done sometime from me (and yes i know - my pc - my responsibility)

I did reinstall rEFInd 10 minutes ago

Install refind with ERRORS
➜  efi export LANG=C;trizen -S refind                                                                                                                                                 
:: Pacman command: /usr/bin/sudo /usr/bin/pacman -S refind
[sudo] password for andreas: 
warning: refind-0.13.2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) refind-0.13.2-1

Total Installed Size:  5.01 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                [------------------------------------------------------------------] 100%
(1/1) checking package integrity                                                                              [------------------------------------------------------------------] 100%
(1/1) loading package files                                                                                   [------------------------------------------------------------------] 100%
(1/1) checking for file conflicts                                                                             [------------------------------------------------------------------] 100%
(1/1) checking available disk space                                                                           [------------------------------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 18647
:: Processing package changes...
(1/1) reinstalling refind                                                                                     [------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Removing unnecessary cached files (keeping the latest two)…
==> no candidate packages found for pruning
(3/5) Checking which packages need to be rebuilt
(4/5) Updating rEFInd on ESP
ShimSource is none
Installing rEFInd on Linux....
ESP was found at /boot/efi using vfat
Found rEFInd installation in /boot/efi/EFI/refind; upgrading it.
Installing driver for btrfs (btrfs_x64.efi)
Copied rEFInd binary files

Notice: Backed up existing icons directory as icons-backup.
Existing refind.conf file found; copying sample file as refind.conf-sample
to avoid overwriting your customizations.

Creating new NVRAM entry

ALERT: There were problems running the efibootmgr program! You may need to
rename the refind_x64.efi binary to the default name (EFI/BOOT/bootx64.efi
on x86-64 systems, EFI/BOOT/bootia32.efi on x86 systems, or
EFI/BOOT/bootaa64.efi on ARM64 systems) to have it run!

Existing //boot/refind_linux.conf found; not overwriting.
(5/5) Performing snapper post snapshots for the following configurations...
==> root: 18648
➜  efi 

and i did install manjaro-refind-installer (didn’t know this existed)
but i did not reboot yet

1 Like

Can you do an:

export LANG=C
trizen -S refind 

and replace the current output with the new output?

:pray:

Sorry for the late reply, I was on holiday

so can you then return from your linux disk

sudo cat /etc/fstab 
sudo ls -la /boot/* 
2 Likes

cat /etc/fstab

# /dev/sdx2 UUID=3487ba3d-1cba-4cdc-a043-c420ebca2aca
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/         	btrfs     	rw,noatime,compress-force=zstd:9,commit=300,subvol=@	0 0

# /dev/sdx2 UUID=3487ba3d-1cba-4cdc-a043-c420ebca2aca
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/home     	btrfs     	rw,noatime,compress-force=zstd:9,commit=300,subvol=@home	0 0

# /dev/sda1: UUID="C579-EF17" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b1d3d562-88ff-4ac2-8326-9c5d82892379"
# /dev/sda1 UUID=C579-EF17
PARTUUID=b1d3d562-88ff-4ac2-8326-9c5d82892379	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 0

# /dev/sdx4 UUID=64672187-dc50-4a50-a9a2-754e2286532d 
PARTUUID=64672187-dc50-4a50-a9a2-754e2286532d	/mnt/restore	btrfs		noauto,rw,noatime,compress-force=zstd:9,commit=300	0 0

# eigene optimierung für tmp nicht auf ssd
tmpfs 						/tmp		tmpfs   	defaults,size=60%,mode=1777	0 0
# 60% damit /tmp zum compilieren genommen werden kann =9.6GB Ramdisk

# /dev/sdx2 UUID=3487ba3d-1cba-4cdc-a043-c420ebca2aca
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/.snapshots	btrfs     	rw,relatime,compress-force=zstd:9,commit=300,subvol=@snapshots	0 0

# /dev/sdx2 UUID=3487ba3d-1cba-4cdc-a043-c420ebca2aca
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/home/.snapshots	btrfs     	rw,relatime,compress-force=zstd:9,commit=300,subvol=@home.snapshots	0 0

# /dev/sdx2 UUID=3487ba3d-1cba-4cdc-a043-c420ebca2aca
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/var/nosnap	btrfs   	rw,relatime,compress-force=zstd:9,commit=300,subvol=@nosnap	0 0

#PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/var/nosnap	btrfs   	rw,relatime,compress-force=zstd:9,commit=300,subvol=@nosnap	0 0
/var/nosnap/var/cache				/var/cache	none bind	0 0
/var/nosnap/var/spool				/var/spool	none bind	0 0

# swap /dev/sda1 e5163a37-eb50-44b8-aeb4-f7e1fcd87215
#PARTUUID=e5163a37-eb50-44b8-aeb4-f7e1fcd87215	none		swap		defaults,discard=once,nofail	0 0

ls -la /boot/*

-rw-r--r-- 1 root root    40960 19. Jul 21:16 /boot/amd-ucode.img
-rw-r--r-- 1 root root 28835270 28. Aug 16:38 /boot/initramfs-4.19-x86_64-fallback.img
-rw-r--r-- 1 root root  9844849 28. Aug 16:38 /boot/initramfs-4.19-x86_64.img
-rw-r--r-- 1 root root 29406909 28. Aug 16:39 /boot/initramfs-5.10-x86_64-fallback.img
-rw-r--r-- 1 root root  9381096 28. Aug 16:39 /boot/initramfs-5.10-x86_64.img
-rw-r--r-- 1 root root 33090801 28. Aug 16:39 /boot/initramfs-5.13-x86_64-fallback.img
-rw-r--r-- 1 root root  9528972 28. Aug 16:39 /boot/initramfs-5.13-x86_64.img
-rw-r--r-- 1 root root       23 15. Aug 13:51 /boot/linux419-x86_64.kver
-rw-r--r-- 1 root root       22 15. Aug 15:10 /boot/linux510-x86_64.kver
-rw-r--r-- 1 root root       22 15. Aug 15:14 /boot/linux513-x86_64.kver
-rw-r--r-- 1 root root      553 13. Sep 18:35 /boot/refind_linux.conf
-rw-r--r-- 1 root root  5986112 17. Aug 20:02 /boot/vmlinuz-4.19-x86_64
-rw-r--r-- 1 root root  9387104 17. Aug 20:02 /boot/vmlinuz-5.10-x86_64
-rw-r--r-- 1 root root  9681216 17. Aug 20:02 /boot/vmlinuz-5.13-x86_64

/boot/efi:
insgesamt 8
drwxr-xr-x 3 root root 4096  1. Jan 1970  .
drwxr-xr-x 1 root root  710 13. Sep 18:35 ..
drwxr-xr-x 6 root root 4096 13. Sep 18:35 EFI

/boot/efi_backup:
insgesamt 0
drwxr-xr-x 1 root root   6  1. Jan 1970  .
drwxr-xr-x 1 root root 710 13. Sep 18:35 ..
drwxr-xr-x 1 root root  22 15. Sep 2018  EFI

/boot/grml:
insgesamt 3304900
drwxr-xr-x 1 root    root           122 12. Feb 2020  .
drwxr-xr-x 1 root    root           710 13. Sep 18:35 ..
-rw-r--r-- 1 andreas andreas  704905216 12. Feb 2020  grml64-full_2018.12.iso
-rw-r--r-- 1 andreas andreas 2679310336 29. Jan 2020  manjaro-xfce-18.1.5-191229-linux54.iso

/boot/grub:
insgesamt 268
drwxr-xr-x 1 root root    182 17. Aug 20:03 .
drwxr-xr-x 1 root root    710 13. Sep 18:35 ..
drwxr-xr-x 1 root root     22 25. Jun 2020  fonts
-rw-r--r-- 1 root root 213050 17. Aug 20:03 grub-btrfs.cfg
-rw------- 1 root root  13435 17. Aug 20:03 grub.cfg
-rw------- 1 root root   9719 16. Sep 2018  grub.cfg.man
-rw------- 1 root root  18963 16. Sep 2018  grub.cfg.old
-rw-r--r-- 1 root root   1024 27. Jul 2020  grubenv
drwxr-xr-x 1 root root     12 19. Okt 2018  locale
drwxr-xr-x 1 root root     18 25. Jun 2020  themes
-rw-r--r-- 1 root root    150 11. Feb 2020  unicode.pf2
drwxr-xr-x 1 root root   6238 26. Jun 2020  x86_64-efi

/boot/memtest86+:
insgesamt 152
drwxr-xr-x 1 root root     22 13. Jul 17:00 .
drwxr-xr-x 1 root root    710 13. Sep 18:35 ..
-rw-r--r-- 1 root root 153868 12. Jun 03:20 memtest.bin

As i can see there may be a cleanup needed :wink:
/boot/efi-backup, grub-btrfs.cfg, grub.cfg.man, grub.cfg.old
These are, because /boot/efi is not in btrfs, so there are no snapshots for me to compare when something goes bad

The problem is, i don´t know if this is the right /boot/efi, because there are 4 devices in this pc. And on the most of them is an “outdated” EFI-Partition. When i removed one of the devices (for test) the UEFI changed the numbering of the devices and it did not boot any more.
But now i do have an USB-Stick with manjaro on it (ID-5) so i will always be able to repair things in the EFI-Partitions
Andreas

you have to check
on /boot/efi/EFI
what you have , if is it bootx64.efi or refind_x64.efi.
if in this case you see refind_x64.efi , rename to bootx64.efi

also check in efibootmgr if there is an entry

sudo efibootmgr -v

see this section about “manual installation”
about refind & bootx64 efi
https://wiki.archlinux.org/title/rEFInd