Multiple EFI boot entries -> change default

malonn

Member
Joined
May 23, 2023
Messages
67
Reaction score
33
Credits
574
Hey. My Debian 12 install has two EFI options to choose from when I boot. One is the "normal" boot. The other (default) is some kind of "safe mode". Simply, how can I remove the behavior of booting right into the "safe mode"/recovery desktop. I hope to be able to do it via GRUB2, because I went though a whole ordeal with the efibootmgr command and it amounted to nothing more than a time drain.
 


G'day malonn, Welcome to Linux.org

Did you or do you have more than one OS on this PC ?
 
Just Debian 12.8. It installs with these boot entries.
 
Can you take a clear phone pic of the grub menu and upload it?

TIA

Wizard
 
It's actually not a Grub menu. This is before it gets to any Grub menu to choose your kernel, etc. I'm talking UEFI stuff here. I have two identically-named entries. Grub defaults to one of them (a recovery file, I think). I want the other one to be default.
 
I'll just describe it instead of transferring pics from my phone to PC. Something like this at either the F11 or "Boot" page of the UEFI menus:
XML:
debian <my hdd/ssd>
debian <my hdd/ssd>
It boots to the 1st option by default. I'd like it to boot to the 2nd. I have to always be at the PC when I boot/reboot to choose the one I want. I don't like that.

Thanks, guys.
 
@wizardfromoz will make comment here shortly

In the meantime, when you boot is it possible for you to tap the down arrow when that appears on screen...in order to select the one you want?

fwiw....both 'options' look the same to me
 
Sounds like the OP is calling the short Boot Order facility.

If he calls up the full Settings page (could be F2 or other), he can likely go to Boot Order tab/page and move up up/down the boot order entry, save changes and reboot.

Cheers

Wizard
 
@wizardfromoz will make comment here shortly
In the meantime, when you boot is it possible for you to tap the down arrow when that appears on screen...in order to select the one you want?
Yes, of course. I can easily choose between entries; it's what I do to boot the desktop I want.
@wizardfromoz
fwiw....both 'options' look the same to me
Yes, they do... and it's been frustrating. Don't ask me why the Debian devs did it that way. Fedora does the same thing, but theirs defaults to the "normal" desktop.
Sounds like the OP is calling the short Boot Order facility.

If he calls up the full Settings page (could be F2 or other), he can likely go to Boot Order tab/page and move up up/down the boot order entry, save changes and reboot.

Cheers

Wizard
Yes, that's correct. The crux of my inquiry is how can I, via GRUB2 (or something else not found in the BIOS page), set the default option? Or even remove the option I don't want from the BIOS altogether?
 
Hey. My Debian 12 install has two EFI options to choose from when I boot. One is the "normal" boot. The other (default) is some kind of "safe mode". Simply, how can I remove the behavior of booting right into the "safe mode"/recovery desktop. I hope to be able to do it via GRUB2, because I went though a whole ordeal with the efibootmgr command and it amounted to nothing more than a time drain.
Normally one can change the boot order with efibootmgr or delete a boot entry with that facility. Some examples are here:

Perhaps if could outline the "ordeal" or describe or show what didn't work, it may help readers to get a clearer handle on the issue.
 
Grub Customizer is a very useful graphical tool that can be used to change the default Grub boot loader settings.
 
No, Grub Customizer is very intrusive and changes the boot config files significantly, it is also very difficult to remove if you try to, you will have headaches.

Wizard
 
I know this is an EFI issue - or appears to be one. If you've not mucked about with the EFI boot settings in your BIOS (not technically BIOS anymore, but UEFI settings) and still have the entry you used to use, you might want to try 'boot repair'.


My thinking is that the boot info for the specific OS you're after has gone wonky or missing, perhaps because of another OS's actions. Restoring that information may work, assuming you still have the reference to it as a start up choice in your UEFI settings.
 
Normally one can change the boot order with efibootmgr or delete a boot entry with that facility. Some examples are here:

Perhaps if could outline the "ordeal" or describe or show what didn't work, it may help readers to get a clearer handle on the issue.
Yeah. I'd been dibble-dabbling a bit prior to even posting here, and one of the things I toyed with was the
Code:
efibootmgr
command. I couldn't figure that dern thing out. Also, that site you linked is appreciated. The linked page is kinda basic; my noob behind was aware of more than she (?) posted—the Linux way, perhaps? Give you a taste and figure the rest out on your own. RTFM, guys. :p
Grub Customizer is a very useful graphical tool that can be used to change the default Grub boot loader settings.
I read to consider with caution prior to using that piece of software. Besides, I want to learn the systems, not just GUI my way around them.
I know this is an EFI issue - or appears to be one. If you've not mucked about with the EFI boot settings in your BIOS (not technically BIOS anymore, but UEFI settings) and still have the entry you used to use, you might want to try 'boot repair'.


My thinking is that the boot info for the specific OS you're after has gone wonky or missing, perhaps because of another OS's actions. Restoring that information may work, assuming you still have the reference to it as a start up choice in your UEFI settings.
Thanks. But, these entries are default with Debian installation (as of revsion 12.8—the latest ca. Oct.). I have not screwed the pooch with this installation yet.
 
...I toyed with was the
Code:
efibootmgr
command. I couldn't figure that dern thing out.
- List all entries
# efibootmgr
- Delete an entry
# efibootmgr -b 0000 -B (where 0000 would correspond with the numbers listed from the above, eg 0001)
Wiping everything is completely safe, your BIOS* will autodetect it all next boot an repopulate it.
- Set boot order (if you can tell the difference, which it seems you can't)
# efibootmgr -o 0001,0005,0002,0012 (and so on)
- Try to ded-dup (may be useful, though I go with purge)
# efibootmgr -D
- Find out more
man efibootmgr (not meaning RTFM, I promise, lol, just want to get on with the topic)

Anyway, on-topic...

The easiest thing I'd start with just update GRUB config.

But first, a word from my sponsor, SafeKitty-chan.
"Before making boot changes, nyan, always have a LiveCD, nyan. It may save your life, nyan."
For those who don't speak Kawaii (i.e. the sane folks): Get a LiveCD (doesn't matter which) to recover before proceeding with any boot alterations unless you know how to manually boot from GRUB.


Anyway, more on-topic...

Let's "fix" your config:
# nano /etc/default/grub
uncomment GRUB_DISABLE_RECOVERY="true"
make sure GRUB_TIMEOUT is 5-10 seconds so you get the chance to edit the menu if you need to manually recovery in the future.
# update-grub

Reboot you machine and hopefully all is well. It's not uncommon to see two entries because your BIOS* will auto-detect EFI files and most installs tend to have the following .efi files: grubx64, shimx64, BOOTX64, distroname/grubx64 (case may vary). Anyway, all roads lead to the same destination, and if your GRUB config is updated, then that's what'll reflect when you enter GRUB.

If that does not work, then please, please, please:
Can you take a clear phone pic of the grub menu and upload it?
while (!THREAD_SOLVED) {
So again, take a picture of it?
}
...And also you boot menu from your BIOS*


*UEFI, I know, it's just one of those colloquialisms to still say BIOS, like how technically it's a "sink" in your bathroom, but we say "basin" for the bathroom and "sink" for the kitchen.
 

Members online


Top