You are not logged in.

#1 2020-09-11 21:23:21

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

EFISTUB problem

Hello,
I'm not currently new to Linux, however it's the first time I'm installing Arch and I'm stuck a bit. I don't know the real root of the problem, but assuming it's related to the bootloader.
I decided to use EFISTUB, followed all wiki pages of its configuration but in the end no result, UEFI doesn't get along with my new just created ESP and /root block devices.
Here are my main parts of the installation:
...

cfdisk /dev/sda
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
pacstrap /mnt base linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

...

pacman -S efibootmgr
cat /etc/fstab
efibootmgr --create --label "archlinux" --disk /dev/sda --part 1 --loader /vmlinuz-linux --unicode 'root=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw initrd=\initramfs-linux.img' --verbose    # PARTUUID is set properly
efibootmgr -b XXXX -B    # sometimes used to delete old boot entry of "archlinux"
exit
umount -R /mnt
reboot

As I have said I suppose that the problem's in EFISTUB, but I have no idea why.
Also I don't have a keen interest in any second-stage bootloaders like GRUB, that's why I'm tackling it so uncompromisingly.

Thanks in advance.

Last edited by chinesegranny (2020-09-11 22:27:00)

Offline

#2 2020-09-11 22:01:58

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,076
Website

Re: EFISTUB problem

Please edit your topic title to actually describe the issue you are facing.

https://wiki.archlinux.org/index.php/Co … ow_to_post


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2020-09-11 22:03:58

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,060

Re: EFISTUB problem

Also give ACTUAL errors. You never tell us why it's not working.

Offline

#4 2020-09-11 22:13:23

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

The problem's clear, it's impossible for me to boot up, I'm redirected to the emergency shell and it's written something like "ERROR: device "" not found, skipping fsck".

Offline

#5 2020-09-11 22:15:08

porcelain1
Member
Registered: 2020-01-18
Posts: 35

Re: EFISTUB problem

I also use EFISTUB to boot Arch, so maybe I can help smile

Where are you stuck, exactly? What do you see when you try to boot?

Also, can you wrap the parts of your installation in code tags (look up here)?

I think this article from the wiki General troubleshooting may help you get more useful information for us to help you.

While you gather more info, I have some wild guesses: did you include include microcode in the boot entry as in Microcode#EFISTUB? also, I'm not sure any /root takes part in the process, it is either /boot or /efi if I'm not mistaken (I use /boot).

Last edited by porcelain1 (2020-09-11 22:15:45)

Online

#6 2020-09-11 22:17:30

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,060

Re: EFISTUB problem

chinesegranny wrote:

The problem's clear, it's impossible for me to boot up, I'm redirected to the emergency shell and it's written something like "ERROR: device "" not found, skipping fsck".

That's a lot more clear, you omitted all of that info in your first post. Still not really clear, though, as that error itself won't stop the system from booting. I'm going to assume that it then says it can't mount it on new_root, and that it includes the PARTUUID. If those are wrong assumptions, tell us.

Give us the actual PARTUUID you used, and the output of blkid.

Last edited by Scimmia (2020-09-11 22:42:39)

Offline

#7 2020-09-11 22:54:09

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

Scimmia wrote:
chinesegranny wrote:

The problem's clear, it's impossible for me to boot up, I'm redirected to the emergency shell and it's written something like "ERROR: device "" not found, skipping fsck".

That's a lot more clear, you omitted all of that info in your first post.

Give us the actual PARTUUID you used, and the output of blkid.



blkid says:

/dev/sda1: UUID="F52E-B0C9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0cb6032f-6fd1-7641-b959-68db0da97fcc"
/dev/sda2: UUID="53f0cf37-33f0-478f-aef0-ab37c67c539f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6a1c1ec6-0e97-8346-8699-759751e32b24"

PARTUUID I used:

efibootmgr --create --label "archlinux" --disk /dev/sda --part 1 --loader /vmlinuz-linux --unicode 'root=PARTUUID=6a1c1ec6-0e97-8346-8699-759751e32b24 rw initrd=\initramfs-linux.img' --verbose

Offline

#8 2020-09-12 02:52:05

porcelain1
Member
Registered: 2020-01-18
Posts: 35

Re: EFISTUB problem

chinesegranny wrote:

blkid says:

/dev/sda1: UUID="F52E-B0C9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0cb6032f-6fd1-7641-b959-68db0da97fcc"
/dev/sda2: UUID="53f0cf37-33f0-478f-aef0-ab37c67c539f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6a1c1ec6-0e97-8346-8699-759751e32b24"

PARTUUID I used:

efibootmgr --create --label "archlinux" --disk /dev/sda --part 1 --loader /vmlinuz-linux --unicode 'root=PARTUUID=6a1c1ec6-0e97-8346-8699-759751e32b24 rw initrd=\initramfs-linux.img' --verbose

The PARTUUIDs don't match at all. As in the Wiki article EFISTUB#efibootmgr, you should put the PARTUUID of your EFI system partition (ESP) on the UEFI boot entry (tip: the one from /dev/sda1 according to your blkid output). Also, remember to set the boot order later wink

Also you should install the correct microcode for your CPU (with pacstrap or with pacman after arch-chrooting, see Microcode#Installation) and add it to the UEFI boot entry as well. See Microcode#EFISTUB.

Last edited by porcelain1 (2020-09-12 03:23:30)

Online

#9 2020-09-12 03:14:15

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,060

Re: EFISTUB problem

porcelain1 wrote:
chinesegranny wrote:

blkid says:

/dev/sda1: UUID="F52E-B0C9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0cb6032f-6fd1-7641-b959-68db0da97fcc"
/dev/sda2: UUID="53f0cf37-33f0-478f-aef0-ab37c67c539f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6a1c1ec6-0e97-8346-8699-759751e32b24"

PARTUUID I used:

efibootmgr --create --label "archlinux" --disk /dev/sda --part 1 --loader /vmlinuz-linux --unicode 'root=PARTUUID=6a1c1ec6-0e97-8346-8699-759751e32b24 rw initrd=\initramfs-linux.img' --verbose

The PARTUUIDs don't match at all. As in the Wiki article EFISTUB#efibootmgr, you should put the PARTUUID of your EFI system partition (ESP) on the UEFI boot entry (tip: the one from /dev/sda1 according to your blkid output).

No, this is wrong. You need to re-read it, porcelain1.

Offline

#10 2020-09-12 03:15:27

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,060

Re: EFISTUB problem

chinesegranny wrote:
Scimmia wrote:
chinesegranny wrote:

The problem's clear, it's impossible for me to boot up, I'm redirected to the emergency shell and it's written something like "ERROR: device "" not found, skipping fsck".

That's a lot more clear, you omitted all of that info in your first post.

Give us the actual PARTUUID you used, and the output of blkid.



blkid says:

/dev/sda1: UUID="F52E-B0C9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0cb6032f-6fd1-7641-b959-68db0da97fcc"
/dev/sda2: UUID="53f0cf37-33f0-478f-aef0-ab37c67c539f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6a1c1ec6-0e97-8346-8699-759751e32b24"

PARTUUID I used:

efibootmgr --create --label "archlinux" --disk /dev/sda --part 1 --loader /vmlinuz-linux --unicode 'root=PARTUUID=6a1c1ec6-0e97-8346-8699-759751e32b24 rw initrd=\initramfs-linux.img' --verbose

Alright, then, how about the exact error you get when booting?

Offline

#11 2020-09-12 03:22:46

porcelain1
Member
Registered: 2020-01-18
Posts: 35

Re: EFISTUB problem

Holy shit ignore me. I shot myself on the foot. I confess I ended adding the device file to the UEFI boot entry since I couldn't get this correct.

Online

#12 2020-09-12 09:24:46

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,542
Website

Re: EFISTUB problem

chinesegranny wrote:
efibootmgr --create --label "archlinux" --disk /dev/sda --part 1 --loader /vmlinuz-linux --unicode 'root=PARTUUID=6a1c1ec6-0e97-8346-8699-759751e32b24 rw initrd=\initramfs-linux.img' --verbose

The --unicode option is passed to the kernel so the initrd should have a forward slash to delimit the path.

Offline

#13 2020-09-12 12:23:55

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

Head_on_a_Stick wrote:
chinesegranny wrote:
efibootmgr --create --label "archlinux" --disk /dev/sda --part 1 --loader /vmlinuz-linux --unicode 'root=PARTUUID=6a1c1ec6-0e97-8346-8699-759751e32b24 rw initrd=\initramfs-linux.img' --verbose

The --unicode option is passed to the kernel so the initrd should have a forward slash to delimit the path.

Arch wiki says about backslashes - https://wiki.archlinux.org/index.php/EF … ng_EFISTUB and the example below on that page uses backslashes with --unicode option.
I 'mn't really sure that the problem's with it.

Offline

#14 2020-09-12 12:31:17

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

porcelain1 wrote:

did you include include microcode in the boot entry as in Microcode#EFISTUB

?

I didn't use a microcode, look up at my efibootmgr command, there's no a kernel parameter connected to microcode.

Offline

#15 2020-09-12 12:38:26

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,542
Website

Re: EFISTUB problem

chinesegranny wrote:

Arch wiki says about backslashes - https://wiki.archlinux.org/index.php/EF … ng_EFISTUB and the example below on that page uses backslashes with --unicode option

Well I've just tried it on my hardware and the boot fails with your described error unless a forward-slash is used for the initrd path.

Offline

#16 2020-09-12 12:46:57

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

Scimmia wrote:

Alright, then, how about the exact error you get when booting?

Ok, when I boot up I see:

[    0.110486] DMAR: [Firmware Bug]: No firmware reserved region can cover this
RMRR [0x000000007d000000-0x000000007f7fffff], contact BIOS vendor for fixes
:: running early hook [udev]
Starting version 246.4-1-arch
::running hook [udev]
:: Triggering uevents...
ERROR: device '' not found. Skipping fsck.
:: mounting '' on real root
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#

It was quite annoying to type this error. smile

Last edited by chinesegranny (2020-09-12 12:49:20)

Offline

#17 2020-09-12 13:00:21

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

Head_on_a_Stick wrote:

Well I've just tried it on my hardware and the boot fails with your described error unless a forward-slash is used for the initrd path.

Unfortunately, the error still presents.

Offline

#18 2020-09-12 13:03:20

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,060

Re: EFISTUB problem

It really just says ':: mounting '' on real root' without a UUID? If so, the root= parameter isn't getting passed to the kernel correctly. How about the output of `efibootmgr -v`?

Offline

#19 2020-09-12 14:14:16

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

Scimmia wrote:

It really just says ':: mounting '' on real root' without a UUID? If so, the root= parameter isn't getting passed to the kernel correctly. How about the output of `efibootmgr -v`?

Boot0001* archlinux        HD(1,GPT,0cb6032f-6fd1-7641-b959-68db0da97fcc,0x800,0x100000)/File(\vmlinuz-linux)r.o.o.t=.P.A.R.T.U.U.I.D.=.6.a.1.c.1.e.c.6.-.0.e.9.7.-.8.3.4.6.-.8.6.9.9.-.7.5.9.7.5.1.e.3.2.b.2.4. .r.w. .i.n.i.t.r.d.=.\.i.n.t.i.r.a.m.f.s.-.l.i.n.u.x...i.m.g.

Last edited by chinesegranny (2020-09-12 14:14:46)

Offline

#20 2020-09-12 17:25:16

d_fajardo
Member
Registered: 2017-07-28
Posts: 942

Re: EFISTUB problem

[    0.110486] DMAR: [Firmware Bug]: No firmware reserved region can cover this
RMRR [0x000000007d000000-0x000000007f7fffff], contact BIOS vendor for fixes

I have a feeling the boot partition doesn't have a partition GUID so the firmware can't locate it.

Offline

#21 2020-09-12 17:36:42

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

d_fajardo wrote:
[    0.110486] DMAR: [Firmware Bug]: No firmware reserved region can cover this
RMRR [0x000000007d000000-0x000000007f7fffff], contact BIOS vendor for fixes

I have a feeling the boot partition doesn't have a partition GUID so the firmware can't locate it.

Look at the output of blkid command (post №7):

/dev/sda1: UUID="F52E-B0C9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0cb6032f-6fd1-7641-b959-68db0da97fcc" 

Offline

#22 2020-09-12 18:07:07

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

It's said that "If your motherboard has a good UEFI implementation, it is possible to embed the kernel parameters within a UEFI boot entry and for the motherboard to boot Arch directly. You can use efibootmgr or UEFI Shell v2 to modify your motherboard's boot entries." by the Arch wiki (https://wiki.archlinux.org/index.php/EF … I_directly).

Is it possible that it'sn't my case and my UEFI's somehow bad?

Last edited by chinesegranny (2020-09-12 18:20:56)

Offline

#23 2020-09-12 18:24:59

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,542
Website

Re: EFISTUB problem

It is possible to merge the kernel image, initramfs and kernel command line into a single UEFI binary:

cat /proc/cmdline > cmdline.txt
objcopy \
   --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
   --add-section .cmdline=cmdline.txt --change-section-vma .cmdline=0x30000 \
   --add-section .linux=/boot/vmlinuz-linux --change-section-vma .linux=0x40000 \
   --add-section .initrd=/boot/initramfs-linux.img --change-section-vma .initrd=0x3000000 \
   /usr/lib/systemd/boot/efi/linuxx64.efi.stub BOOTX64.EFI

Then copy the resultant BOOTX64.EFI binary to /EFI/BOOT/ on the EFI system partition, it should boot automatically without any NVRAM entries at all. Or use the --loader option to create an NVRAM entry for it (ie, without the --unicode option).

Use a pacman hook to recreate BOOTX64.EFI every time the kernel is updated.

EDIT: reference: https://github.com/haraldh/mkrescue-uef … ue-uefi.sh

Last edited by Head_on_a_Stick (2020-09-13 09:49:45)

Offline

#24 2020-09-12 18:41:02

chinesegranny
Member
From: Russia, Saint-Petersburg
Registered: 2020-09-11
Posts: 13

Re: EFISTUB problem

Head_on_a_Stick wrote:

Then copy the resultant BOOTX64.EFI binary to /EFI/BOOT/ on the EFI system partition.

Should I create a new mounting point - /mnt/efi/boot instead of /mnt/boot?

Last edited by chinesegranny (2020-09-12 18:41:38)

Offline

#25 2020-09-12 18:51:00

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,542
Website

Re: EFISTUB problem

As an example, if the EFI system partition is /dev/sda1 then use

# mount /dev/sda1 /mnt
# mkdir -p /mnt/EFI/BOOT
# cp BOOTX64.EFI /mnt/EFI/BOOT

Mutatis mutandis.

Offline

Board footer

Powered by FluxBB