You are not logged in.

#1 2021-03-07 23:52:24

Yastanub
Member
Registered: 2021-03-07
Posts: 4

[SOLVED] efibootmgr returns not enough space on device

Hello Everyone,

SOLUTION
The solution was to use the fallback boot path /EFI/BOOT/bootx64.efi which some efi systems seem to use. With that GRUB was able to load and with

grub-mkconf -o /boot/grub/grub.cfg

i could automatically
create a config file for grub which finally boots my system properly. Ill still look into the GRUB configuration guides but now my system is running as intended.


What i wanted to to
i wanted to upgrade my home servers Hardware and got me an old intel WX58BP workstation Motherboard with a Xeon l5638 CPU.
The server is ment to be an all purpose experimenting station whenever i find something i want to try out with a server and networking stuff.
As the system drive i choose a 64G SSD and wanted to install it also in the new server.
But unfortunately the Ubuntu system on the SSD from my old server refused to boot. So I went on the long journey to try to boot my old system.
Nothing i did was really fixing the old system so i decided to install it freshly and backup any data i wanted to keep. But that also didnt work the
ubuntu installer would always fail at installing grub when i booted in EFI mode. When i disabled UEFI boot the installer would boot in BIOS mode
and i could install Ubuntu (also for BIOS boot) but it wouldnt boot.
So i decided to try to install Arch to learn about all the stuff myself and maybe find a fix for the broken booting process.

What happened
I followed the instructions in the Installation guide and decided to try to get the EFI/GPT boot working.
Everything went well until it came to the bootloader installation. I wanted to use GRUB as my bootloader but everytime i would run

grub-install

it showed

Installing for x86_64-efi platform.
Could not prepare Boot variable: No space left on device
grub-install: error: efibootmgr failed to register the boot entry: Input/Output error.

rerunning with

grub-install -v

shows the problem is indeed caused by efibootmgr

grub-install: info: executing efibootmgr -c -d /dev/sda -p 1 -w -L arch -l \EFI\arch\grubx64.efi.
Could not prepare Boot variable: No space left on device
grub-install: error: efibootmgr failed to register the boot entry: Input/Output error.

what i tried
I stumbled upon several internet posts describing my problem but mostly for laptpops as it seems like. The most promising seemed to be a filled up NVRAM since the board was in use before i bought it for a long time. I reflashed the exact same BIOS version via the update utility of the Motherboard in hope that would flush the NVRAM. It did not work.
Executing efibootmgr -v results in

No BootOrder is set; firmware will attempt recovery

I also tried to install the system in BIOS boot mode with a 1MiB BIOS partition but it also did not boot just as the Ubuntu version before. There is a UEFI boot option in my BIOS menu which when disabled leads to the live arch distro booting in BIOS mode and when enabled leads to the live distro booting in EFI mode. I tried booth settings for all i did and it did not work whatsoever (the efibootmgr obviously reporting no efi when i disabled the option.

What i got to work somehow
In some posts i found mentions of old EFI systems not using NVRAM but instead looking for a predefined path as i understood it. So i took the grubx64.efi which the grub-install managed to place but not write to the boot order and put it in /EFI/BOOT/bootx64.efi in the EFI partition as mentioned in those posts. After that i could find the EFI-Shell in my boot manager of my of Motherboard (pressing F-10 in my case while booting) and managed to get to the GRUB terminal. A quick search on the internet lead me the way to boot into my installed linux system.
By entering

root=(hd0,3)
linux vmlinuz-linux root=/dev/sda3
initrd initramfs-linux.img
boot

Conclusion
So now i have a somewhat working system which does not boot on its own. I may be able to figure out how to configure GRUB to automate the boot process but id rather have a properly set up bootloader and boot order. My question is now if anyone knows a fix for the efibootmgr not beeing able to set up a bootorder? My guess is a bugged Motherboard firmware since it is quite old (latest version bpx5810j 86b 0042 is from 6/20/2011) or some kind of safelock preventing me from accessing the NVRAM but i could not find a solution to that.

Current environment

sda (my SSD) with GPT created via fdisk
   sda1 vfat (EFI Partition 512M)
       /EFI/BOOT/bootx64.efi
   sda2 swap (Linux Swap 512M)
   sda3 ext4 (System Partition with the remainder of the SSD)
      my arch installation

fstab:
# static information about the filesystems.
# see fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# UUID=b0be6fcd-c8e1-4211-9088-7c6eaa186bc6
/dev/sda3     /     ext4     rw,relatime     0 1

# UUID=6821-46FF
/dev/sda1     /boot/efi     vfat     rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=asii,shortname=mixed,utf8,errors=remount-ro     0 2

Last edited by Yastanub (2021-03-08 01:23:35)

Offline

#2 2021-03-08 00:16:34

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] efibootmgr returns not enough space on device

Is this a tutorial? Some info?
This belongs and already is in the wiki.

I get the intention but posts like these get buried quick in the forums, and this suits better a blog...


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2021-03-08 00:19:04

Yastanub
Member
Registered: 2021-03-07
Posts: 4

Re: [SOLVED] efibootmgr returns not enough space on device

GaKu999 wrote:

Is this a tutorial? Some info?
This belongs and already is in the wiki.

I get the intention but posts like these get buried quick in the forums, and this suits better a blog...

No its not ment to be a tutorial. As mentioned in the conclusion i have a problem i want to fix but am not able to fix myself sad
What things could i change about my post so it does not get burried?

Offline

#4 2021-03-08 00:24:10

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

Re: [SOLVED] efibootmgr returns not enough space on device

No need to change anything, it's an excellent post as is.
GaKu999 just didn't read/understand the question properly.


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

#5 2021-03-08 00:37:11

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] efibootmgr returns not enough space on device

Yastanub wrote:

As mentioned in the conclusion i have a problem i want to fix but am not able to fix myself sad

I see, so it’s the firmware derping around...didn’t compute the thread at first... hmm

IIRC some systems where designed to be very dumb and only care about the windows bootloader in the fallback boot path or something of the sort...

Try from the wiki: https://wiki.archlinux.org/index.php/EF … efibootmgr

If removing the dumps fails alongside the kernel option, fallback boot path it is.

I personally only use the fallback boot path regardless if the firmware is good or not, too many bad experiences regarding those...


To properly install grub if fallback is the only option you need to use the flag “—removable”, and maybe “—no-nvram”, but with removable I think it’s redundant...

And then just generate your grub config, the thing should boot alone without problems. Do note that arch does not run grub-mkconfig for you.

It is also nice to learn the syntax of the grub.cfg, you can do more complex shenanigans with control of the config, but considering it’s a server you can just focus on straight boot without any sort of queries and waiting no?

Last edited by GaKu999 (2021-03-08 00:53:11)


My reposSome snippets

Heisenberg might have been here.

Offline

#6 2021-03-08 00:54:26

Yastanub
Member
Registered: 2021-03-07
Posts: 4

Re: [SOLVED] efibootmgr returns not enough space on device

GaKu999 wrote:
Yastanub wrote:

As mentioned in the conclusion i have a problem i want to fix but am not able to fix myself sad

I see, so it’s the firmware derping around...didn’t compute the thread at first... hmm

IIRC some systems where designed to be very dumb and only care about the windows bootloader in the fallback boot path or something of the sort...

Try from the wiki: https://wiki.archlinux.org/index.php/EF … efibootmgr

If removing the dumps fails alongside the kernel option, fallback boot path it is.

I personally only use the fallback boot path regardless if the firmware is good or not, too many bad experiences regarding those...

I tried deleting dump files but there werent any under /sys/firmware/efi/efivars.
So i do have a stable solution when i manage to configure GRUB to auto boot my linux with these 3 commands?
I tried to add those under

GRUB_CMDLINE_LINUX="root=(hd0,3) linux vmlinuz-linux root=/dev/sda3 initrd initramfs-linux.img boot"

in /etc/default/grub
but it didnt work since i did not quite figure out GRUB configuration.

After your edit:
Okay so with --removable the installation was successful now i need to use grub-mkconfig to generate a config and place it like

grub-mkconfig > /etc/default/grub

?

Last edited by Yastanub (2021-03-08 00:58:12)

Offline

#7 2021-03-08 00:55:50

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

Re: [SOLVED] efibootmgr returns not enough space on device

In a lot of cases the workaround you've already done is the only solution.

I believe that your NVRAM and GRUB issues are unrelated, if everything was installed correctly you should be booting properly already.

Did you actually configure GRUB?


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

#8 2021-03-08 00:58:13

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

Re: [SOLVED] efibootmgr returns not enough space on device

Yastanub wrote:

So i do have a stable solution when i manage to configure GRUB to auto boot my linux with these 3 commands?
I tried to add those under

GRUB_CMDLINE_LINUX="root=(hd0,3) linux vmlinuz-linux root=/dev/sda3 initrd initramfs-linux.img boot"

in /etc/default/grub
but it didnt work since i did not quite figure out GRUB configuration.

Did you read the wiki? It's all in there...
https://wiki.archlinux.org/index.php/GRUB#Configuration


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

#9 2021-03-08 01:01:27

Yastanub
Member
Registered: 2021-03-07
Posts: 4

Re: [SOLVED] efibootmgr returns not enough space on device

Slithery wrote:
Yastanub wrote:

So i do have a stable solution when i manage to configure GRUB to auto boot my linux with these 3 commands?
I tried to add those under

GRUB_CMDLINE_LINUX="root=(hd0,3) linux vmlinuz-linux root=/dev/sda3 initrd initramfs-linux.img boot"

in /etc/default/grub
but it didnt work since i did not quite figure out GRUB configuration.

Did you read the wiki? It's all in there...
https://wiki.archlinux.org/index.php/GRUB#Configuration

No to be honest i am quite exhausted since i already spent 10 hours on this and hopes someone here already knows the correct links.
And yes i do have a qorking system it just does not boot by itself which i will now propably be able to change thank you very much smile

Offline

#10 2021-03-08 01:10:01

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] efibootmgr returns not enough space on device

Yastanub wrote:

No to be honest i am quite exhausted since i already spent 10 hours...

Only 10 hours? And here I remember spending a week messing around with the installation and the wiki in 2019...


The wiki is very important and arch is more a DiY distro, so there will be a lot of reading, manual pages/tomes as well.

If you got the idea of how to get things done already you can “mark” this thread as solved, editing the first post and prepending [SOLVED] to the title, if the title is too large just delete a little something to make space.


My reposSome snippets

Heisenberg might have been here.

Offline

#11 2021-03-08 08:44:51

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: [SOLVED] efibootmgr returns not enough space on device

Certain motherboard EFI implementations don't work well with efibootmgr. I have an excellent Asrock motherboard but efibootmgr somehow can't reach it similar to yours: efibootmgr failed to register the boot entry: Input/Output error.
The only way I could access the NVRAM was via UEFI Shell and from there it was straightforward. I use rEFInd and I have configured it to have an extra entry for the UEFI Shell in case I would need to access it.

Offline

Board footer

Powered by FluxBB