You are not logged in.

#1 2016-06-27 03:02:40

nostro
Member
Registered: 2016-06-27
Posts: 9

[Solved] Booting Failed: Problem with EFI stub

Upon booting I get this error.

EFI stub: ERROR: Failed to read file
Trying to load files to higher address
EFI stub: ERROR: Failed to read file

I have been running arch on a laptop for a few months now and this happened all of a sudden. What could have caused this? What can I do to diagnose and fix it?

Last edited by nostro (2016-06-29 03:38:34)

Offline

#2 2016-06-27 03:20:57

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Booting Failed: Problem with EFI stub

Which bootloader are you using?

Offline

#3 2016-06-27 03:39:05

nostro
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

x33a wrote:

Which bootloader are you using?

systemd-boot

Last edited by nostro (2016-06-27 03:39:31)

Offline

#4 2016-06-27 04:39:52

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Booting Failed: Problem with EFI stub

Try booting from a live cd and reinstall systemd-boot.

Offline

#5 2016-06-27 07:41:34

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [Solved] Booting Failed: Problem with EFI stub

Look like the efi stub (part of the kernel that boot the kernel under UEFI) can't find the kernel (or initrd). That's weird. Are you not referring to an non existent initramfs file? Try to fsck the system partition. You can also try to reinstall systemd boot as suggested.

If that does not work, boot an UEFI shell and try to read the kernel and initrd (for example copy them on a removable media and then check that they were properly copied). You may also try to launch the kernel from the UEFI shell with the good options (initrd are passed with the initrd= option).

As mentioned previously, you will need a bootable CD.

Updated: I have a similar error if I specify a non existent initrd file. It is likely your issue.

Last edited by olive (2016-06-27 07:49:29)

Offline

#6 2016-06-28 03:17:03

nostro
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

Hi guys, thanks for the replies. So I have set up my live USB and booted. As suggested I used fsck (I had to man it first, I'm not too familiar with it). I tried...

$fsck /dev/sda

which yielded a big quote saying /dev/sda does not describe ext2/ext3/ext

I also tried...

$fsck /dev/sda1

which yielded

0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action

I'm assuming the second attempt was the correct way to use fsck. What is a dirty bit should I try removing it?

Last edited by nostro (2016-06-28 03:17:19)

Offline

#7 2016-06-28 04:08:24

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Booting Failed: Problem with EFI stub

Dirty bit: https://technet.microsoft.com/en-us/lib … 90641.aspx

And yes, go ahead and see if fsck can fix it.

Offline

#8 2016-06-28 05:59:20

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [Solved] Booting Failed: Problem with EFI stub

It's better to fix your error from fsck but it is unlikely your issue. Can you double check the path of the initrd you pass to the EFI stub? You must specify the full path of the initramfs, taking as root the root of the partition from which the kernel is booted. If yu have still issue post the exact content of the EFI partition as well as your systemd configuration files.

Offline

#9 2016-06-28 10:06:52

ymf331
Banned
Registered: 2015-04-18
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

if you already had arch installed, only certain things could have changed in your efi partition. like has anything changed in your loader.conf or arch.conf? have you compiled a custom kernel since then? messed around with your partitions? need to make a new ramdisk? does your layout match the wiki basically? like any clues?


i can't put this zsh config on the forum: http://dotshare.it/dots/1144/

Offline

#10 2016-06-28 10:26:40

nostro
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

olive wrote:

It's better to fix your error from fsck but it is unlikely your issue. Can you double check the path of the initrd you pass to the EFI stub? You must specify the full path of the initramfs, taking as root the root of the partition from which the kernel is booted. If yu have still issue post the exact content of the EFI partition as well as your systemd configuration files.

How would I do that from the live USB?

Offline

#11 2016-06-28 10:35:55

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [Solved] Booting Failed: Problem with EFI stub

@nostro Just mount your partitions: https://wiki.archlinux.org/index.php/Mount

Last edited by olive (2016-06-28 10:36:07)

Offline

#12 2016-06-28 20:48:20

nostro
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

So I have mounted my boot partition. initamfs-linux.img is located at the root of my boot device.

here is my /entries/arch.conf

title     Arch Linux
linux     /vmlinuz-linux
initrd     /inter-ucode.img
initrd     /initramfs-linux.img
options root=PARTUUID=... rw initrd=/intel-ucode.img initrd=/initramfs-linux.img

they seem to be right assuming root starts with my boot device.



ymf331 wrote:

if you already had arch installed, only certain things could have changed in your efi partition. like has anything changed in your loader.conf or arch.conf? have you compiled a custom kernel since then? messed around with your partitions? need to make a new ramdisk? does your layout match the wiki basically? like any clues?

My boot partition was working for the past few months, i did not intentionally (nor consciously) change loader.conf or arch.conf. My partition layout is one partition for boot,  one swap partition and one for the rest of root (sda1, sda2, sda3 in that order).

Last edited by nostro (2016-06-28 22:01:52)

Offline

#13 2016-06-28 23:18:50

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [Solved] Booting Failed: Problem with EFI stub

I don't think you need the "initrd=xxxx" parts in your option line.


Matt

"It is very difficult to educate the educated."

Offline

#14 2016-06-28 23:45:47

nostro
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

mrunion wrote:

I don't think you need the "initrd=xxxx" parts in your option line.

https://wiki.archlinux.org/index.php/Mi … de_updates

for intel microcode I think I should.

Offline

#15 2016-06-28 23:51:02

likeahundredninjas
Banned
Registered: 2015-12-13
Posts: 23

Re: [Solved] Booting Failed: Problem with EFI stub

nah, you don't, and your options root= can just be /dev/sdax or whatever, too. the wiki isn't too clear on these matters. i threw away the partuuid idea as something too hard to remember. i assume your two initrd entries have something to do with intel cpu clocking, but you might mess around with that to see if that's the problem.

maybe it would be a good idea to redo the whole systemd-boot install from the beginner's wiki? i'd start by making a new initial ramdisk. check in your boot partition to see if all the files mentioned in your arch.conf even exist, and work from there.

Last edited by likeahundredninjas (2016-06-28 23:58:27)

Offline

#16 2016-06-28 23:58:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Booting Failed: Problem with EFI stub

likeahundredninjas wrote:

nah, you don't, and your options root= can just be /dev/sdax or whatever, too. the wiki isn't too clear on these matters. i threw away the partuuid idea as something too hard to remember.

The final sentence, while telling, is the only thing that prevents your post from being a clean sweep of wrong...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#17 2016-06-28 23:59:27

likeahundredninjas
Banned
Registered: 2015-12-13
Posts: 23

Re: [Solved] Booting Failed: Problem with EFI stub

@jasonwryan u so smart u just solved this man's problem

edit: i won't fight back too hard since i borrowed some stuff from your vimprobable2 config but don't you think that trying to flame me might be counter-productive?

Last edited by likeahundredninjas (2016-06-29 00:03:05)

Offline

#18 2016-06-29 01:42:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Booting Failed: Problem with EFI stub

I wasn't flaming you: I was ensuring that no-one else that read this thread would be left with the impression that not using UUIDs was a good idea, or that the wiki was unclear about that.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#19 2016-06-29 02:22:36

nostro
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

Should I try reinstalling systemd-boot? How would I do that from a  live cd?

I imagine it being along the lines of...
1) chroot to root partition
2) bootctl install

Would I have to remove the old systemd-boot?

edit: all the files in my arch.conf exist where they should

Last edited by nostro (2016-06-29 02:26:26)

Offline

#20 2016-06-29 02:35:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [Solved] Booting Failed: Problem with EFI stub

No, you need to fix your arch.conf. You need either the initrd lines OR initrd= in the options. Like you were told before, take them out of the options line.

Last edited by Scimmia (2016-06-29 02:36:16)

Offline

#21 2016-06-29 02:57:42

ymf331
Banned
Registered: 2015-04-18
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

jasonwryan wrote:

I wasn't flaming you: I was ensuring that no-one else that read this thread would be left with the impression that not using UUIDs was a good idea, or that the wiki was unclear about that.

what was i wrong about? you can use, in my case, 'options root=/dev/sda3 rw' and the wiki in no way mentions that. it's probably safest to wear a helmet while crossing the street, but in most cases nobody regrets not doing so. i didn't say that it was the best way to go about it. only mentioned it as an alternative. then you strut in, quipping about my wrongness and in no way contributing to the thread.


i can't put this zsh config on the forum: http://dotshare.it/dots/1144/

Offline

#22 2016-06-29 03:01:53

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [Solved] Booting Failed: Problem with EFI stub

ymf331 wrote:

what was i wrong about? you can use, in my case, 'options root=/dev/sda3 rw' and the wiki in no way mentions that.

Yeah, that works until your firmware decides to change the order it detects drives. Or you boot with a USB drive plugged in and the numbers change. It's a very fragile way to do things and is NOT recommended.

Offline

#23 2016-06-29 03:25:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Booting Failed: Problem with EFI stub

ymf331 wrote:
jasonwryan wrote:

I wasn't flaming you: I was ensuring that no-one else that read this thread would be left with the impression that not using UUIDs was a good idea, or that the wiki was unclear about that.

what was i wrong about? you can use, in my case, 'options root=/dev/sda3 rw' and the wiki in no way mentions that. it's probably safest to wear a helmet while crossing the street, but in most cases nobody regrets not doing so. i didn't say that it was the best way to go about it. only mentioned it as an alternative. then you strut in, quipping about my wrongness and in no way contributing to the thread.

You realise multiple accounts is forbidden here?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#24 2016-06-29 03:28:26

nostro
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Booting Failed: Problem with EFI stub

Scimmia wrote:

No, you need to fix your arch.conf. You need either the initrd lines OR initrd= in the options. Like you were told before, take them out of the options line.


This worked, sorry for not doing it sooner, thank you all.

Solved.

Offline

Board footer

Powered by FluxBB