LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-16-2022, 09:15 AM   #16
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382

Original Poster
Blog Entries: 1

Rep: Reputation: 71

Instead of creating a new thread, I decided to continue this one.

The computer does not show a BIOS entry for the disk anymore. The output of efibootmgr now is
Code:
aris@hp2Debian:~$ sudo efibootmgr -v
BootCurrent: 003D
Timeout: 0 seconds
BootOrder: 000F,000E,2001,2002,2003
Boot000E* Network Adapter (IPv6 UEFI)   PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(28924a28302c,0)/IPv6([::]:<->[::]:,0,0)RC
Boot000F* Network Adapter (IPv4 UEFI)   PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(28924a28302c,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot2001* USB Drive (UEFI)      RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)      RC
and I do not see anywhere a 003D or 2003 entry (non under /sys/firmware/efi/efivars).
Edit. And I cannot remove those two entries
Code:
aris@hp2Debian:~$ sudo efibootmgr -b 003D -B
Could not delete variable: No such file or directory
aris@hp2Debian:~$ sudo efibootmgr -b 2003 -B
Could not delete variable: No such file or directory
/Edit

I believe here there should have been two directories, the one listed below and a "BOOT" directory. Am I wrong?
Code:
aris@hp2Debian:~$ ls -l /boot/efi/EFI/
drwx------ 2 root root 4.0K Nov  8 09:26 debian
And no, I did not delete anything. Edit2. Since yesterday. /Edit2.

The only thing that was done to the computer since the last known good boot (yesterday) was a grub-- package upgrade
Code:
Start-Date: 2022-11-16  07:29:17
Commandline: apt upgrade
Requested-By: aris (1000)
Upgrade: grub-efi-amd64:amd64 (2.06-4, 2.06-5)
Finally, thanks to a link provided in another thread here, is this what I should do?
Code:
efibootmgr -c -L "Debian" -d /dev/sda1 -l '\EFI\debian\grubx64.efi'
with /dev/sda1 being my EFI partition (/boot/efi mount point).


Right now I can boot manually from BIOS through a sequence of "Boot from EFI file" > "EFI-some-string" > EFI > debian > grubx64.efi, which loads the grub menu.

Last edited by Debian6to11; 11-16-2022 at 10:26 AM.
 
Old 11-16-2022, 12:57 PM   #17
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382

Original Poster
Blog Entries: 1

Rep: Reputation: 71
With some more reading I ended up with this line
Code:
sudo efibootmgr -c -d /dev/sda -p 1 -L Debian -l \EFI\debian\grubx64.efi
And i guess "-p 1" is not needed in this case.
 
Old 11-16-2022, 01:24 PM   #18
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,852
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by Debian6to11 View Post
I believe here there should have been two directories, the one listed below and a "BOOT" directory. Am I wrong?
Mine are all debian10, debian11 or debian12. A BOOT is there as a fallback, so if it's missing, it doesn't matter if there's another that produces the desired results.

Quote:
The only thing that was done to the computer since the last known good boot (yesterday) was a grub-- package upgrade
Code:
Start-Date: 2022-11-16  07:29:17
Commandline: apt upgrade
Requested-By: aris (1000)
Upgrade: grub-efi-amd64:amd64 (2.06-4, 2.06-5)
Was it a full-upgrade that appeared to fully complete?

Quote:
Finally, thanks to a link provided in another thread here, is this what I should do?
Code:
efibootmgr -c -L "Debian" -d /dev/sda1 -l '\EFI\debian\grubx64.efi'
with /dev/sda1 being my EFI partition (/boot/efi mount point).
With a possible exception of -L, all good. If /etc/default/grub's GRUB_DISTRIBUTOR= contains `lsb_release -i -s 2> /dev/null || echo Debian` and lsb_release -i -s 2> /dev/null || echo Debian produces "Debian", then yes. If it produces "debian", then no, IIUC. The ESP is not a case sensitive filesystem, but because of the presence of GRUB, and the fact that all other directories in /boot/efi/EFI/ on mine are lower case only, I'm not sure for this purpose whether or not Grub is sufficiently sophisticated in this area to not care about the case of the directory name that contains grubx64.efi.

None of my GRUB_DISTRIBUTOR=s contain `lsb_release -i -s 2> /dev/null || echo Debian`. Because I multiboot, I change every one to the form above, e.g. ="debian11". This keeps each installation's /boot/efi/EFI/ directory unique, which prevents overwrites resulting from upgrades.
 
Old 11-16-2022, 01:27 PM   #19
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,852
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by Debian6to11 View Post
With some more reading I ended up with this line
Code:
sudo efibootmgr -c -d /dev/sda -p 1 -L Debian -l \EFI\debian\grubx64.efi
And i guess "-p 1" is not needed in this case.
I believe so.

I've never tried not quoting what follows -L.
 
Old 11-16-2022, 01:56 PM   #20
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382

Original Poster
Blog Entries: 1

Rep: Reputation: 71
Just fixed it.

The BOOT directory is missing, and there is none at my stable computer as well.

This system has all possible Debian sources in, including unstable and experimental; you might call it a rolling Debian release.
I had another package that came in before the fix and did not fix it either. It was "grub-efi-amd64-signed".

From the link in another thread (which I think it was provided by you): boot manager display label (defaults to "Linux") ; { and this should be the same as stored in (grep GRUB_DISTRIBUTOR /etc/default/grub) }
Which in my case it is Debian with a capital.
I have read some ten threads with examples, some have quotes and some not. If there are no spaces then I think that quotes are not necessary.

Anyway, the line was correct, it was installing an entry
Boot0000* Debian HD(1,GPT,a13692c0-aa2c-4bec-8669-a98f290251d6,0x800,0x200000)/File(EFIdebiangrubx64.efi)
which was probably removed at shutdown. On reboot the entry was missing.

Then I went in the BIOS. Disabled the "Internal Network Adapter Boot", which I do not use anyway, and enabled "Legacy Support".
Edit. At his point I let it boot and ended in a blank page with "GRUB" on the top left. No input no cursor. Rebooted, went to BIOS boot options and next sentence. /Edit.
Booted manually (as described in the last sentence of post # 16), reinstalled grub, and updated grub. That was it. It looks good.
Notice: I've checked my history and I did not create an entry with efibootmgr the last time; probably it was made by update-grub(?).

For fun, have a look at the efibootmgr output, Boot 0 & 1. I have an SSD (sda) and a HDD (sdb) in the laptop.
Code:
aris@hp2Debian:~$ sudo efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 3002,2001,2002,2003
Boot0000* Notebook Hard Drive   BBS(HD,��,0x500)................-.Y.......Y.A.Y........................................
Boot0001* Notebook Hard Drive   BBS(HD,��,0x500)................-.g.......g.A.g...."...................................
Boot0002* debian        HD(1,GPT,a13692c0-aa2c-4bec-8669-a98f290251d6,0x800,0x200000)/File(\EFI\debian\shimx64.efi)
Boot2001* USB Drive (UEFI)      RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)      RC
Boot3002* Internal Hard Disk or Solid State Disk        RC

Last edited by Debian6to11; 11-16-2022 at 02:15 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do I purge (delete) my HP printer "driver" then reinstall Michael Piziak Linux - Newbie 3 02-08-2020 12:15 PM
apt-get purge or --purge is false advertising... jmgibson1981 Linux - Newbie 12 07-01-2015 08:04 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] Purge and reinstall of Fail2Ban on Ubuntu 10.04 is failing thinktink Linux - General 3 10-18-2010 02:18 AM
reinstall windows, reinstall GRUB too? leupi Linux - Software 1 05-07-2005 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration