How do I add UEFI entries to boot any USB device?

3 years ago by Pantherina to c/linux

My stupid Lenovo "Thinkpad" UEFI doesnt have a real F12 devices menu.

It just shows registered UEFI targets that can be booted.

This is pretty catastrophic, somehow I got Fedora and Windows installed, but thats it. If something breaks, I am in trouble. I cant do a memtest86 even though I think my RAM is faulty.

So in Linux, is there a way to add an UEFI entry to boot just any USB stick? Or to boot a specific one, like with Ventoy on it?

Thanks!

TheyCallMeHacked 13 points 3 years ago

You can look into using efibootmgr to create UEFI boot entries

path: 0 4778417, hotness: undefined, score: 13, children: 0
OneCardboardBox 11 points 3 years ago

rEFInd can auto-detect bootable devices, and you can select them during startup. You need to install it to the efi partition as your boot manager.

With a simple config edit and file copy operation, I put a memtest86 efi image on my boot partition, and it shows up as an option for every boot. It's nice to know I won't have to fumble around with USB drives if I need to test my RAM in the future.

path: 0 4778532, hotness: undefined, score: 11, children: 4
Pantherina 0 points 3 years ago

Thats awesome! But sounds pretty hacky... so I would remove grub and use refind instead?

Fedora Kinoite is built for Grub afaik, with the deployments and all. Not wanting to destroy that really...

path: 0 4778532 4785003, hotness: undefined, score: 0, children: 3
OneCardboardBox 2 points 3 years ago

I use Fedora Sericea, another Silverblue spin, on my laptop. It wasn't hard to install rEFInd, and it coexists just fine with GRUB in my experience. rEFInd detects that grub is there and shows it as an option, like any other bootable media.

The rEFInd documentation at https://www.rodsbooks.com/refind is extensive, but the summary of how to install is

That was it for me, but the full installation steps are available at https://www.rodsbooks.com/refind/installing.html if you run into trouble.

The next time I rebooted, rEFInd popped up and I was back in Fedora with no problem.

path: 0 4778532 4785003 4795686, hotness: undefined, score: 2, children: 1
Pantherina 1 point 3 years ago

Damn thanks! Thats great!

But for some reason my Bios works now, it shows USB devices, doing a memtest currently, after booting Fedora KDE and having a Win11 usb fail because of missing Lenovo Drivers loool I hate this OS SO MUCH.

path: 0 4778532 4785003 4795686 4815531, hotness: undefined, score: 1, children: 0
Max_P -1 points 3 years ago

You can also chain rEFInd to GRUB if you don't want to mess with that.

path: 0 4778532 4785003 4788598, hotness: undefined, score: -1, children: 0
ShouldIHaveFun 9 points 3 years ago

Don't you have an option to boot from usb in the BIOS?

Note that accessing the boot menus is not always with F12. Sometimes it's also ESC, F1, F2 or DEL. You should try those.

path: 0 4778224, hotness: undefined, score: 9, children: 8
Klaymore 3 points 3 years ago

or F11

path: 0 4778224 4779400, hotness: undefined, score: 3, children: 4
Contort3860 2 points 3 years ago

I've had F10 before too.

path: 0 4778224 4779400 4781253, hotness: undefined, score: 2, children: 3
scottywh 2 points 3 years ago

F10 is typical on HP / Compaq

path: 0 4778224 4779400 4781253 4814496, hotness: undefined, score: 2, children: 2
Contort3860 2 points 3 years ago

My example is an old LG netbook.

path: 0 4778224 4779400 4781253 4814496 4822095, hotness: undefined, score: 2, children: 1
Pantherina 0 points 3 years ago

Its the boot menu for sure.

Maybe I need to set "legacy first" to boot from USB?

There is no "boot from USB" in the BIOS and the F12 menu doesnt show devices, just UEFI entries.

path: 0 4778224 4784971, hotness: undefined, score: 0, children: 2
ShouldIHaveFun 1 point 3 years ago

The BIOS should have a boot order option. You could set you USB as first priority there. Your USB may need to be plugged in to appear in this list.

path: 0 4778224 4784971 4798049, hotness: undefined, score: 1, children: 1
Pantherina 1 point 3 years ago

Ok thats a valid point. I will try to plug it in.

path: 0 4778224 4784971 4798049 4807382, hotness: undefined, score: 1, children: 0
horsemobile 9 points 3 years ago

I had to enable "USB hard drives" in the regular bios setup to get access to them in the F12 menu (Thinkpad L480). Not in front of me at the moment but on the "boot" or startup page there was a sort of unintuitive to find "boot" menu that looked like a page header that lets you enable or disable boot devices. USB was disabled by default.

path: 0 4778882, hotness: undefined, score: 9, children: 0
alphapuggle 7 points 3 years ago

Huh? Every ThinkPad I've had let's me boot to a USB drive. Check your bios settings something is off, unless it's through a company and they have it specifically disabled.

path: 0 4780405, hotness: undefined, score: 7, children: 6
Pantherina -3 points 3 years ago

Not that one. Not from a company too. Maybe only using legacy only will solve this.

path: 0 4780405 4785118, hotness: undefined, score: -3, children: 5
alphapuggle 1 point 3 years ago

What model?

path: 0 4780405 4785118 4785651, hotness: undefined, score: 1, children: 4
Pantherina 0 points 3 years ago

Thinkpad t495 amd

path: 0 4780405 4785118 4785651 4787249, hotness: undefined, score: 0, children: 3
alphapuggle 2 points 3 years ago

I'm not seeing anything that would be preventing this from showing up in the BIOS, is the USB drive formatted GPT? Does it recognize on any other computers? It may just be that it's not discovering the EFI file. Also check Startup > Boot > Excluded from Boot Priority Order, but this shouldn't matter for the F12 menu.

path: 0 4780405 4785118 4785651 4787249 4797618, hotness: undefined, score: 2, children: 2
kugmo 7 points 3 years ago

When asking help with your laptop, not providing your laptop's model number is a great way to not get proper help.

path: 0 4785267, hotness: undefined, score: 7, children: 1
Pantherina 3 points 3 years ago

True. Its a Thinkpad T495

But what I meant is that I am pretty sure there is no secret setting, but that I simply need to fix it otherwise, like with rEFInd or something like that

path: 0 4785267 4785424, hotness: undefined, score: 3, children: 0
scottywh 4 points 3 years ago path: 0 4798296, hotness: undefined, score: 4, children: 0
paf 4 points 3 years ago

Have you tried to press Enter to show bios setup? (Don't have one, but that's what a quick search tell)

path: 0 4778322, hotness: undefined, score: 4, children: 1
Pantherina 0 points 3 years ago

Have to check

path: 0 4778322 4785160, hotness: undefined, score: 0, children: 0
beirdobaggins 3 points 3 years ago

It sounds like you got it working-ish.

One thing you might be running into is having hiberboot (AKA fast startup)enabled in windows. Instead of shutting down it hibernates when you choose "shutdown".

If it is in the hibernated state instead of actually shutdown. You won't be able to choose a different boot option.

Here is some info on how to turn it off. https://www.elevenforum.com/...

path: 0 4819262, hotness: undefined, score: 3, children: 1
Pantherina 2 points 3 years ago

No that is off, I really have no problems with Windows not shutting down.

But now I actually have an UEFI+legacy boot menu, listing my entries AND drives!

path: 0 4819262 4819807, hotness: undefined, score: 2, children: 0
darius 3 points 3 years ago

I'm a bit late here but when installing grub to a USB drive with a GPT/EFI compatible partitioning, you need to run the following command: "grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable" (without the quotes).

path: 0 4804402, hotness: undefined, score: 3, children: 1
Pantherina 1 point 3 years ago

Do you know if any flashing tool does this automatically? Etcher? Fedora media writer? Because they always override everything.

Kde iso image writer doesnt seem to do this, but this might be the fix!

path: 0 4804402 4805034, hotness: undefined, score: 1, children: 0
MigratingtoLemmy 3 points 3 years ago

WTF, the BIOS doesn't let you select the boot-order? Which Thinkpad is this?

path: 0 4808215, hotness: undefined, score: 3, children: 7
Pantherina 2 points 3 years ago

Weird, suddenly, after like 20 tries, I can boot any media? Wtf?

Yes I could select the boot order but only for the UEFI entries (Fedora, Linux firmware updater, Windows Boot manager)

Not for plugged in devices. I never saw the name of my NVME for example, now suddenly its there?

I hate this proprietary garbage Bios so much, I cant wait to get a Clevo NV41MZ and flash dasharo on that, then try Heads.

path: 0 4808215 4815146, hotness: undefined, score: 2, children: 6
MigratingtoLemmy 2 points 3 years ago

Never heard of the Clevo before, thanks

path: 0 4808215 4815146 4815596, hotness: undefined, score: 2, children: 1
Pantherina 2 points 3 years ago

Novacustom and 3mdeb do all the work. So if you want to support them, get a machine from them!

path: 0 4808215 4815146 4815596 4826562, hotness: undefined, score: 2, children: 0
Zanz 2 points 3 years ago

Did you enable CSM? By default you should never see a device to boot from and should only see valid UEFI targets.

path: 0 4808215 4815146 4822243, hotness: undefined, score: 2, children: 3
Pantherina 2 points 3 years ago

What is CSM?

path: 0 4808215 4815146 4822243 4826326, hotness: undefined, score: 2, children: 2
baru 3 points 3 years ago

Compatibility Support Module. It'll allow you to boot non-UEFI things. I often disable that to enable secure boot.

path: 0 4808215 4815146 4822243 4826326 4826405, hotness: undefined, score: 3, children: 1
Kabutor 3 points 3 years ago

If you have UEFI enabled, probably you also have secure boot. I did a script to create a usb pendrive that works with UEFI and Secure Boot, you can boot a liveusb Debian, Ubuntu or clonezilla at the moment

https://github.com/kabutor/liveusb

Edit: but I don't think you can run memtestx86, last time I checked don't have uefi support

path: 0 4805265, hotness: undefined, score: 3, children: 0
alphapuggle 1 point 3 years ago
path: 0 4785641, hotness: undefined, score: 1, children: 0
linux
linux

@lemmy.ml

login for more options
68121
9466
5670

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

go to feed...