You are not logged in.

#1 2021-02-14 11:36:19

solidassassin
Member
Registered: 2021-02-14
Posts: 2

New boot entry created with efibootmgr boots to wrong disk

Currently I have 2 disks on my machine. An NVME and an SSD. On the NVME I have an Arch install with systemd-boot which I use for work. I decided to test out Arch with EFISTUB on my SSD as well, everything goes smoothly until it's time to boot from a newly created boot entry, surprisingly my new boot entry just boots into Arch installed on my NVME, even tho I specified /dev/sda to efibootmgr, here's the full command I ran (ofc with the UUID in place):

# efibootmgr --disk /dev/sda --part 2 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw initrd=\initramfs-linux.img' --verbose

sda2 is the root (mounted to /mnt) and sda1 is the efi (mounted to /mnt/boot). If I understand correctly pacman should detect and update the /boot directory. Please point out what I've done wrong in the process, thank you!

Offline

#2 2021-02-14 11:41:44

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,198

Re: New boot entry created with efibootmgr boots to wrong disk

Did you chroot into /mnt before running the given command ?

Offline

#3 2021-02-14 11:45:03

solidassassin
Member
Registered: 2021-02-14
Posts: 2

Re: New boot entry created with efibootmgr boots to wrong disk

Yup, just fully followed the Arch installation guide.

Offline

#4 2021-02-14 18:42:57

salquestfl
Member
Registered: 2021-02-05
Posts: 8

Re: New boot entry created with efibootmgr boots to wrong disk

Can you post the output of:

# lsblk -f
# parted -l
# efibootmgr -v

Offline

#5 2021-02-15 09:51:00

Kaylier
Member
Registered: 2021-02-15
Posts: 1

Re: New boot entry created with efibootmgr boots to wrong disk

First of all, you must indicate the EFI System Partition in your command line and not the root partition (--part 1 in your case).

Then, check that you entered the correct PARTUUID in your command. It is not the filesystem UUID that you get from lsblk, but the partition UUID you get from blkid.


If it's all right, here are two problems I encountered recently in a similar setup:

1. Your firmware overwrites the EFI System Partition UUID
I don't know where is the root of this problem. I created the entry with efibootmgr, it was correctly written. But after rebooting, the ESP UUID was changed back to the ESP UUID of my other disk.

Once the entry is created is executed, check the output of efibootmgr -v. You should see a different UUID in the ESP of your entries (this is the HD(1,GPT,...) part).
Reboot and check again.

If is has changed, you may need to create the entry via your firmware settings instead of efibootmgr.

2. Your firmware doesn't pass command line parameters to your kernel. (see https://wiki.archlinux.org/index.php/EF … I_directly)
My guess is that the firmware uses the correct loader, but fallback on the first root partition it finds.
In that case, you'll need to create and load a unified kernel image.

Offline

Board footer

Powered by FluxBB