The officially official Devuan Forum!

You are not logged in.

#1 2019-04-30 20:10:37

rolfie
Member
Registered: 2017-11-25
Posts: 1,046  

Uefi trouble

Mainboard ASUS M5A99X-EVO-R2. Had to re-install the Windows7 hat was present on another device. This re-install screwed the Devuan Uefi entries which is normal. With the help of a life Linux called Knoppix on a stick and some fumbling around I could revive the primary Beowulf installation on the main disk. This topic is posted from the Beowulf installation.

Remaining problem is that I can't update grub so that if I want I can jump to Windows from the grub menu. I discovered the following issues with Uefi:

One of the entries in the flash cannot be read, changed or deleted by the efibootmgr. Error shown is:

# efibootmgr
Skipping unreadable variable "Boot0004": Input/output error
BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0001,0000,0003,0005
Boot0000* Windows Boot Manager
Boot0001* Linux
Boot0003* CD/DVD Drive 
Boot0005* UEFI: TOSHIBA TransMemory
# efibootmgr -b 0004 -B
Skipping unreadable variable "Boot0004": Input/output error
Could not delete variable: Input/output error

[*][/*]The usual procedure for re-installing grub also throws several errors:

# apt --reinstall install grub-common grub-efi-amd64 os-prober
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 3 erneut installiert, 0 zu entfernen und 3 nicht aktualisiert.
Es müssen 2.547 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Holen:1 http://deb.devuan.org/merged beowulf/main amd64 grub-common amd64 2.02+dfsg1-16 [2.477 kB]
Holen:2 http://deb.devuan.org/merged beowulf/main amd64 grub-efi-amd64 amd64 2.02+dfsg1-16 [39,7 kB]
Holen:3 http://deb.devuan.org/merged beowulf/main amd64 os-prober amd64 1.77 [30,2 kB]
Es wurden 2.547 kB in 0 s geholt (7.042 kB/s).
Vorkonfiguration der Pakete ...
(Lese Datenbank ... 232926 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../grub-common_2.02+dfsg1-16_amd64.deb ...
Entpacken von grub-common (2.02+dfsg1-16) über (2.02+dfsg1-16) ...
Vorbereitung zum Entpacken von .../grub-efi-amd64_2.02+dfsg1-16_amd64.deb ...
Entpacken von grub-efi-amd64 (2.02+dfsg1-16) über (2.02+dfsg1-16) ...
Vorbereitung zum Entpacken von .../os-prober_1.77_amd64.deb ...
Entpacken von os-prober (1.77) über (1.77) ...
grub-common (2.02+dfsg1-16) wird eingerichtet ...
os-prober (1.77) wird eingerichtet ...
grub-efi-amd64 (2.02+dfsg1-16) wird eingerichtet ...
x86_64-efi wird für Ihre Plattform installiert.
grub-install: Warnung: Cannot read EFI Boot* variables.
grub-install: Warnung: read_file: could not read from file: Eingabe-/Ausgabefehler.
grub-install: Warnung: vars_get_variable: read_file(/sys/firmware/efi/vars/Boot0004-8be4df61-93ca-11d2-aa0d-00e098032b8c/raw_var) failed: Eingabe-/Ausgabefehler.
grub-install: Warnung: efi_get_variable: ops->get_variable failed: Eingabe-/Ausgabefehler.
grub-install: Fehler: failed to register the EFI boot entry: Eingabe-/Ausgabefehler.
Failed: grub-install --target=x86_64-efi  
WARNING: Bootloader is not properly installed, system may not be bootable
GRUB-Konfigurationsdatei wird erstellt …
Found background image: .background_cache.png
Linux-Abbild gefunden: /boot/vmlinuz-4.19.0-4-amd64
initrd-Abbild gefunden: /boot/initrd.img-4.19.0-4-amd64
Linux-Abbild gefunden: /boot/vmlinuz-4.19.0-2-amd64
initrd-Abbild gefunden: /boot/initrd.img-4.19.0-2-amd64
Windows Boot Manager auf /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi gefunden
Adding boot menu entry for EFI firmware configuration
erledigt
Trigger für man-db (2.8.5-2) werden verarbeitet ...
Trigger für shim-signed (1.28+nmu1+0.9+1474479173.6c180c6-1) werden verarbeitet ...
No DKMS packages installed: not changing Secure Boot validation state.
Fehler: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PackageKit was not provided by any .service files

One of them relates to the faulty entry in the efi flash, grub-install fails, in addition I get a DBus error.
update-grub just runs without error. When I try to invoke the Windows installation from grub I get an error that the UUID of the Windows (efi) partition is wrong which is not the case, its the same blkid presents.

Any suggestion what else I can do to reset the efi flash memory?

Thanks, Rolf

Online

#2 2019-04-30 20:47:11

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Uefi trouble

rolfie wrote:

When I try to invoke the Windows installation from grub I get an error that the UUID of the Windows (efi) partition is wrong which is not the case, its the same blkid presents.

Try creating a file at /boot/grub/custom.cfg with this content:

menuentry 'Custom Windows Boot' {
   set root=(hd0,1)
   chainloader efi/Microsoft/Boot/bootmgfw.efi
}

If you reboot and select the 'Custom Windows Boot' entry, does that work?

If not then please post the Windows menuentry from grub.cfg along with the output of blkid.

To clear the troublesome NVRAM entry try

# efibootmgr -b 0004 -B

Brianna Ghey — Rest In Power

Offline

#3 2019-05-01 17:21:38

rolfie
Member
Registered: 2017-11-25
Posts: 1,046  

Re: Uefi trouble

Head_on_a_Stick wrote:

To clear the troublesome NVRAM entry try

# efibootmgr -b 0004 -B

When you look at the end of the first code box, you see I tried this. This entry is somehow defective, repeated tries to delete it do not work, and grub-install does not like the entry and fails. This was with efibootmgr and a tool called EasyUEFI under Windows.

I suspect that I have a hardware failure on the main board.

Anyhow, for some unknown reason, after the PC being off for a night, it suddenly is possible to boot Windows. Maybe it required a (another) reboot?

The PC now is somehow doing what it should, still I am not happy about the defective UEFI memory. Would a clear CMOS possibly help?

Rolf

Online

#4 2019-05-01 19:36:05

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Uefi trouble

rolfie wrote:
Head_on_a_Stick wrote:

To clear the troublesome NVRAM entry try

# efibootmgr -b 0004 -B

When you look at the end of the first code box, you see I tried this.

Oh dear, sorry Rolf, I was tired when I posted that.

rolfie wrote:

Would a clear CMOS possibly help?

Unlikely, the entries are stored on non-volatile memory (NVRAM).


Brianna Ghey — Rest In Power

Offline

Board footer