efibootmgr failed to register the boot entry: Input/output error

  • Open
  • quality assurance status badge
Details
3 participants
  • David Dashyan
  • Maxime Devos
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
David Dashyan
Severity
normal
D
D
David Dashyan wrote on 22 Mar 2021 20:20
(address . bug-guix@gnu.org)
87wntz3shi.fsf@davie.li
Dear Guix,

I ran 'guix system reconfigure' yesterday and it failed during
bootloader installation. I couldn't load system afterwards.

Toggle quote (14 lines)
> activating system...
> making '/gnu/store/agdqqyc7wm3gv53dgca9gir09h9ax0ym-system' the current system...
> setting up setuid programs in '/run/setuid-programs'...
> populating /etc from /gnu/store/bvvsriahzjxv8m977j84xsn802rrz27d-etc...
> The following derivation will be built:
> /gnu/store/cx5i04kjidixkkdi2cj01v0ij72frsan-install-bootloader.scm.drv
>
> building /gnu/store/cx5i04kjidixkkdi2cj01v0ij72frsan-install-bootloader.scm.drv...
> guix system: error: '/gnu/store/q5mhiwj4rap24i2b2y9svwbfsn3ya0v1-grub-efi-2.04/sbin/grub-install --boot-directory //boot --bootloader-id=Guix --efi-directory //boot/efi' exited with status 1; output follows:

> Installing for x86_64-efi platform.
> Could not prepare Boot variable: No space left on device
> /gnu/store/q5mhiwj4rap24i2b2y9svwbfsn3ya0v1-grub-efi-2.04/sbin/grub-install: error: efibootmgr failed to register the boot entry: Input/output error.

Running
Toggle quote (2 lines)
> sudo efibootmgr --create --disk /dev/nvme0n1p1 --part 1 --loader \
> '\EFI\Guix\grubx64.efi' --label Guix
has same effect on guix system, but works fine when runned in ubuntu
live cd.

I don't get why it complains that there is "no space left on device"
though.

output of `df -h` contains:
Toggle quote (2 lines)
> /dev/nvme0n1p1 548M 212K 548M 1% /boot/efi

Haven't woked out how to fix it manually, just keep suspending for now :)

--
David aka zzappie
T
T
Tobias Geerinckx-Rice wrote on 22 Mar 2021 22:17
(name . David Dashyan)(address . mail@davie.li)
87v99i99cr.fsf@nckx
David,

David Dashyan ???
Toggle quote (1 lines)
> failed to register the boot entry: Input/output error.
[...]
Toggle quote (3 lines)
> same effect on guix system, but works fine when runned in ubuntu
> live cd.

Thank you for noting this! This error is not uncommon in general,
but this is the first time I've heard (or it's even occurred to
me) that there's a difference between different efibootmgr builds.
I'll keep that in mind when this next happens to me.

Toggle quote (4 lines)
> I don't get why it complains that there is "no space left on
> device"
> though.

Because your UEFI firmware reports that the storage NVRAM (a chip
on your motherboard) is full.

There's no magic (simple + safe + guaranteed to work) way to fix
this. I don't think Guix could reliably automate one if we tried.

One of the safer things to try is looking at the output of
‘efibootmgr’, then deleting ‘obviously irrelevant’ BootNNNN
entries with ‘efibootmgr -b NNNN -B’. IIRC, my Lenovo X230T came
with options to boot from a floppy and/or optical drives, neither
of which it has. Each one takes up a tiny bit of the very limited
NVRAM storage.

Deleting just a few clearly-unused entries can fix the problem,
and is a lot safer than, e.g., manually mucking about in
/sys/firmware/efi/efivars. That could theoretically brick your
machine.

Some people also report success from the ‘load defaults’ or ‘load
optimised defaults’ options in the firmware's set-up menu. Of
course you'll lose all custom firmware settings, but you might not
have any, and they're quite easy to restore by hand.

Toggle quote (3 lines)
> output of `df -h` contains:
>> /dev/nvme0n1p1 548M 212K 548M 1% /boot/efi

The problem you're having has nothing to do with drives; you can
ignore them.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYFkJZA0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15XA8BALCLvpmaTGyjSZaboiugN0K2QY4+Z8Dcb4UVETsV
ry6WAQCxCAike9enuCQt86RJ0rnX7ZYxMD2yiUqlfHXogCLmAQ==
=k3Ix
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 22 Mar 2021 22:20
6a53623e3cdf51091d71a29719d10f2ade63c0c9.camel@telenet.be
On Mon, 2021-03-22 at 22:20 +0300, David Dashyan wrote:
Toggle quote (13 lines)
> Dear Guix,
>
> I ran 'guix system reconfigure' yesterday and it failed during
> bootloader installation. I couldn't load system afterwards.


> > activating system...
> > [...]
> >
> > building /gnu/store/cx5i04kjidixkkdi2cj01v0ij72frsan-install-bootloader.scm.drv...
> > guix system: error: '/gnu/store/q5mhiwj4rap24i2b2y9svwbfsn3ya0v1-grub-efi-2.04/sbin/grub-install --boot-directory //boot --bootloader-id=Guix --efi-directory //boot/efi' exited with status 1; output follows:
> > Installing for x86_64-efi platform.

The directory here is /boot (and /boot/efi) ...

Toggle quote (3 lines)
> > Could not prepare Boot variable: No space left on device
> > /gnu/store/q5mhiwj4rap24i2b2y9svwbfsn3ya0v1-grub-efi-2.04/sbin/grub-install: error: efibootmgr failed to register the boot entry: Input/output error.

That ‘Input/output error’ looks bad.

Toggle quote (12 lines)
> Running
> > sudo efibootmgr --create --disk /dev/nvme0n1p1 --part 1 --loader \
> > '\EFI\Guix\grubx64.efi' --label Guix
> has same effect on guix system, but works fine when runned in ubuntu
> live cd.
>
> I don't get why it complains that there is "no space left on device"
> though.
>
> output of `df -h` contains:
> > /dev/nvme0n1p1 548M 212K 548M 1% /boot/efi

But you are only looking at /boot/efi here ...

Are /boot/efi and /boot separate file systems?
Maybe paste the full output of "df -h"

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYFkKJhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jAMAP9PRfbgPPI7mhmYqSDbsmAtd6gf
lvBoYoeNw3tVtFQkBgEA8cqpyU+BM+3nt85vjIxzxEpJTtcRuDaGOWZKVGAGZwQ=
=6dxa
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Mar 2021 22:22
c81f30e3c5d55d4a78c8de51eab5143c45edf92e.camel@telenet.be
Nevermind, it seems Tobias Geerinckx knows what's going on here.
-----BEGIN PGP SIGNATURE-----

iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYFkKmxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7suaAQC9YYpsPeJC5aD6I6bNBA5gEHaE
KGzeOsoToZvvnGnN+wD+KaMicnvTI6SJaRiswvaTT6nM/rlxydbQw55W/0jNAAw=
=bViE
-----END PGP SIGNATURE-----


T
T
Tobias Geerinckx-Rice wrote on 22 Mar 2021 22:32
(name . David Dashyan)(address . mail@davie.li)
87sg4m98nn.fsf@nckx
David,

David Dashyan ???
Toggle quote (3 lines)
> Haven't woked out how to fix it manually, just keep suspending
> for now :)

Didn't we talk on #guix yesterday? I thought manually adding an
entry for \EFI\Guix\grubx64.efi fixed your next boot. Did it not?

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYFkM7A0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15wRAA/Aq39jiu4p4SihQ4lGFzBWVocP5abOSJHrtTfQh4
/2SfAP9Xfl5YQT6e75ahQeK0uAOhheg8zvqvYE90PnXUqfyeDQ==
=5z44
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 23 Mar 2021 14:01
(name . David Dashyan)(address . mail@davie.li)
87czvq81mi.fsf@nckx
David,

David Dashyan ???
Toggle quote (4 lines)
> After running `rm /sys/firmware/efi/efivars/dump-*` followed by
> reboot
> guix system reconfigure went without errors.

Happy to hear that!

I *think* that's a safe thing to do, at least on Lenovo devices.

Toggle quote (6 lines)
> Also. While rebooting (I had to boot to ubuntu live cd first) I
> noted
> that ubuntu has efibootmgr version 17. And It works there.
> Maybe we
> just need to update it?

Thanks, I'll try to update our efibootmgr. Upstream[0] is still
at 16. Need to figure out what the Debian package actually
contains.

Kind regards,

T G-R

-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYFnmxQ0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15Td8BAPDXBPu14/xfW0rn3q1Tn+lKI9kU+d/34A07X9fl
ppncAQCzUvJWrLC2myE++SzSEwvnnOBlylYEpxR2WbHLpjmIAw==
=2Yd0
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 23 Mar 2021 14:21
(name . David Dashyan)(address . mail@davie.li)
87a6qu80p5.fsf@nckx
David Dashyan ???
Toggle quote (6 lines)
> Also. While rebooting (I had to boot to ubuntu live cd first) I
> noted
> that ubuntu has efibootmgr version 17. And It works there.
> Maybe we
> just need to update it?

Done on master.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYFnrdw0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW1586gA/1xLSmMplZYRi28Ep2zIXQ2FV00MTKru7eL/XAaz
+cz0AP4vFQV+aMX+Iv+4i4IsAYuxb1FJ3QPA8DtwqJNyVFucCA==
=2hLQ
-----END PGP SIGNATURE-----

?