You are not logged in.

#1 2017-09-03 14:36:08

matfurla
Member
Registered: 2016-06-29
Posts: 8

[SOLVED] Boot without GRUB2

Hi everyone,

My problem is the following. I installed arch on a UEFI system in a ssd with grub2 and everything went ok, but when i remove the ssd, boot with another drive and get back with the ssd, my UEFI entry seems to disappear from my motherboard and i can't boot arch again. I manage to get it back working using the arch live iso with efibootmgr and creating the entry using this command: efibootmgr -c -g -d /dev/sda -p 1 -w -L "Arch Linux (GRUB)" -l /EFI/arch_grub/grubx64.efi

But the problem persist, everytime i remove the drive the entry disappears and i have to do the entire process again.

So, there's a way to use just the kernel to boot without grub2, creating a UEFI entry manually using efibootmgr and still be able to boot when the drive gets removed?

Thank you!

P.S. Sorry for my english i'm brazilian

Last edited by matfurla (2017-09-07 10:10:48)

Offline

#2 2017-09-03 15:05:17

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] Boot without GRUB2

The Arch kernel is by default EFISTUB enabled. That means UEFI can launch it directly. No boot loader or boot manager needed. I can pass on my command used on my system to write the entry to UEFI to launch the kernel directly but you seem to have somewhat different needs. What follows the -u option are the kernel parameters.

# efibootmgr -c -d /dev/sda -p 1 -L "ArchLinux" -l \vmlinuz-linux -u "root=/dev/sda2 rw initrd=/initramfs-linux.img"

Are you not using GPT? An ESP?


Simple and Open

Offline

#3 2017-09-03 15:14:48

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Boot without GRUB2

You may find that you still have the same issue even if you do change from GRUB.

Some motherboards (mine included) automatically delete UEFI entries for disks that are no longer attached to the system.
There's no way round this without a firmware fix from the manufacturer.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2017-09-03 15:38:19

matfurla
Member
Registered: 2016-06-29
Posts: 8

Re: [SOLVED] Boot without GRUB2

Blasphemist wrote:

The Arch kernel is by default EFISTUB enabled. That means UEFI can launch it directly. No boot loader or boot manager needed. I can pass on my command used on my system to write the entry to UEFI to launch the kernel directly but you seem to have somewhat different needs. What follows the -u option are the kernel parameters.

# efibootmgr -c -d /dev/sda -p 1 -L "ArchLinux" -l \vmlinuz-linux -u "root=/dev/sda2 rw initrd=/initramfs-linux.img"

Are you not using GPT? An ESP?

Yes i'm using GTP and ESP, but i have another kind of problem. I know i can boot without grub, using only the kernel, but the problem is: how can i creat the UEFI entry using efibootmgr in a way that this entry persists even if i remove the ssd from the motherboard?

slithery wrote:

You may find that you still have the same issue even if you do change from GRUB.

Some motherboards (mine included) automatically delete UEFI entries for disks that are no longer attached to the system.
There's no way round this without a firmware fix from the manufacturer.

I was afraid that was the case. But something seems wrong, i have installed arch before the same way and i could make it boot again even removing the drive when i used grub2. How can i make this again?

Offline

#5 2017-09-04 18:20:45

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] Boot without GRUB2

I create a script to add the UEFI boot entry and store it in my boot folder. I simply need to boot into the Arch install media, mount the boot partition and run the script to re-add the boot entry.

Offline

#6 2017-09-04 18:26:40

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] Boot without GRUB2

Have you used this system and been able to keep boot entries from being deleted when you boot with a disk you have previously used removed? On a bios system there are no boot entries to get deleted. It's just a matter of what boot loader is in the MBR. My UEFI doesn't delete entries that belong to drives not currently in the system. Yours may. Some UEFI provided boot managers, built in, provide a way to pick existing EFI executable files (.efi). If yours does maybe you don't have to have a persistent entry. Mine only gives me options to select from the boot entries in NVRAM. On mine if a disk that has an entry in NVRAM isn't present I can't see that entry but if I then reattach that disk and boot I can then see the entry.


Simple and Open

Offline

Board footer

Powered by FluxBB