You are not logged in.

#1 2014-06-17 11:13:48

23ua
Member
From: Kiev, Ukraine
Registered: 2014-06-17
Posts: 7

UEFI problem: Could not prepare boot variable: No space left on device

I'm trying to install bootloader for my x64 system. (on GPT)
First, I tried to install gummiboot.
When installing it from repository I get error:

Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/gummibootx64.efi
Failed to create EFI Boot variable entry: No space left on device

When I do "gummiboot install" I also get the message about no space left on device.
Then I've tried to install GRUB bootloader, but also got similar message.

Could not prepare boot variable: No space left on device

Trying to install rEFInd with efibootmgr command also failed with the same message:

Could not prepare boot variable: No space left on device

I've got an efi partition formatted as FAT32, 512Mb space on it and 487M available.

efivar -l returns me some list of variables.

So does this mean there is a problem writing to my UEFI NVRAM?
Is it possible to fix it or install bootloader without writing entries to NVRAM?

Last edited by 23ua (2014-06-17 16:32:45)

Offline

#2 2014-06-17 15:56:27

Maxim
Member
Registered: 2014-06-13
Posts: 1

Re: UEFI problem: Could not prepare boot variable: No space left on device

How did you try to install the grub bootloader?
If grub-install /dev/sda gives you an error, you could try the following command: grub-install --target=i386-pc --recheck /dev/sda

Offline

#3 2014-06-17 16:24:47

23ua
Member
From: Kiev, Ukraine
Registered: 2014-06-17
Posts: 7

Re: UEFI problem: Could not prepare boot variable: No space left on device

Maxim wrote:

How did you try to install the grub bootloader?
If grub-install /dev/sda gives you an error, you could try the following command: grub-install --target=i386-pc --recheck /dev/sda

I used the following command:

[root@archiso /]# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck
Installing for x86_64-efi platform.

Could not prepare boot variable: No space left on device

Installation finished. No error reported.

But system doesn't boot.

[root@archiso /]# grub-install /dev/sda
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

[root@archiso /]# grub-install --target=x86_64-efi --recheck /dev/sda
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

Last edited by 23ua (2014-06-17 16:31:52)

Offline

#4 2014-06-17 16:57:26

surfatwork
Member
Registered: 2012-01-05
Posts: 137

Re: UEFI problem: Could not prepare boot variable: No space left on device

I use refind and havent written any entries into the UEFI NVRAM. Simply ask your UEFI to run the refind efi executable by default on startup. Hopefully your UEFI has an option to specify a custom efi executable. Or if it is hardcoded to some efi executable name, you can rename refind_x86.efi to whatever the hardcoded name is.

Offline

#5 2014-06-17 17:36:15

23ua
Member
From: Kiev, Ukraine
Registered: 2014-06-17
Posts: 7

Re: UEFI problem: Could not prepare boot variable: No space left on device

surfatwork wrote:

I use refind and havent written any entries into the UEFI NVRAM. Simply ask your UEFI to run the refind efi executable by default on startup. Hopefully your UEFI has an option to specify a custom efi executable. Or if it is hardcoded to some efi executable name, you can rename refind_x86.efi to whatever the hardcoded name is.

I haven't seen that option.
Where can I check the hardcoded name then? In some UEFI variable?

Offline

#6 2014-06-17 17:37:39

surfatwork
Member
Registered: 2012-01-05
Posts: 137

Re: UEFI problem: Could not prepare boot variable: No space left on device

The UEFI/BIOS manual for your PC/laptop should tell you. or a bit of googling. Or just explore your UEFI

Last edited by surfatwork (2014-06-17 17:38:34)

Offline

#7 2014-06-17 19:20:04

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: UEFI problem: Could not prepare boot variable: No space left on device

@23ua: Try "rm /sys/firmware/efi/efivars/dump-*" as root and reboot and try gummiboot install again.

Offline

#8 2014-06-17 19:56:27

23ua
Member
From: Kiev, Ukraine
Registered: 2014-06-17
Posts: 7

Re: UEFI problem: Could not prepare boot variable: No space left on device

the.ridikulus.rat wrote:

@23ua: Try "rm /sys/firmware/efi/efivars/dump-*" as root and reboot and try gummiboot install again.

There are no dump-* files in that folder.
But there are Backup000* files. (See list)
Should I try removing them?


UPD: I tried and it didn't help. Also, I can't copy them back due to the same "No space left on device" issue.
UPD2: It was really bad idea!

Last edited by 23ua (2014-06-17 23:18:37)

Offline

#9 2014-06-17 20:09:20

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,509
Website

Re: UEFI problem: Could not prepare boot variable: No space left on device

What is your /etc/fstab?
Maybe your /boot is mounted read-only...


Freedom for Öcalan!

Offline

#10 2014-06-17 20:19:37

23ua
Member
From: Kiev, Ukraine
Registered: 2014-06-17
Posts: 7

Re: UEFI problem: Could not prepare boot variable: No space left on device

Head_on_a_Stick wrote:

What is your /etc/fstab?
Maybe your /boot is mounted read-only...

I loaded from archlinux livecd and chrooted into the new system, that I'm installing.
These are fstab and mounted filesystems when I'm chrooted.

Offline

#11 2014-06-17 20:27:30

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,509
Website

Re: UEFI problem: Could not prepare boot variable: No space left on device

The /boot entry has "errors=remount-ro" in the "options" --- maybe the partition has errors & has been re-mounted read-only?
Maybe try removing the "errors=remount-ro" bit & then re-mounting /boot and see if you can write anything to it...


Freedom for Öcalan!

Offline

#12 2014-06-17 22:05:06

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: UEFI problem: Could not prepare boot variable: No space left on device

23ua wrote:

But there are Backup000* files. (See list)
Should I try removing them?
UPD: I tried and it didn't help. Also, I can't copy them back due to the same "No space left on device" issue.

You are very lucky. The last time I did this, the machine was bricked. I had to unsolder the NVRAM, flash it externally, solder it again *and* reprogram the keyboard controller. Strange. However, there is a kernel option to play with: See https://wiki.archlinux.org/index.php/Un … k_properly. But be prepared: It may brick your device.

Edit: Your problem has nothing to do with any partitions, only with the NVRAM.

Last edited by Tarqi (2014-06-17 22:09:15)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#13 2014-06-17 23:06:21

23ua
Member
From: Kiev, Ukraine
Registered: 2014-06-17
Posts: 7

Re: UEFI problem: Could not prepare boot variable: No space left on device

Tarqi wrote:

You are very lucky. The last time I did this, the machine was bricked. I had to unsolder the NVRAM, flash it externally, solder it again *and* reprogram the keyboard controller. Strange. However, there is a kernel option to play with: See https://wiki.archlinux.org/index.php/Un … k_properly. But be prepared: It may brick your device.

Edit: Your problem has nothing to do with any partitions, only with the NVRAM.

No, I'm not. sad
I just didn't reboot my computer at that time. smile
Now I'm trying to restore it with Phenix Crisis Disk tool. Hope it'll help.

Offline

#14 2014-06-18 07:29:57

surfatwork
Member
Registered: 2012-01-05
Posts: 137

Re: UEFI problem: Could not prepare boot variable: No space left on device

OP: I am not sure what the Phenix Crisis Disk Tool does, but as others are telling you: this is not a problem with your partitions or your OS. There seems to be some issue with your NVRAM.
The good thing is that you dont need to mess with the NVRAM or add entries to it to be able to boot. I hope that you don't mess up your installation and data since you seem to be rather confused (if I may say so).
Also, if you are going to use Arch, you "must" read and understand what you are doing, to atleast a reasonable degree. If you don't want to, then you should consider whether Arch is the best Linux OS for you - no disrespect.

Offline

#15 2014-06-18 08:21:30

23ua
Member
From: Kiev, Ukraine
Registered: 2014-06-17
Posts: 7

Re: UEFI problem: Could not prepare boot variable: No space left on device

surfatwork,
I understand that the problem is with my NVRAM. I thought I had no space left on my NVRAM due to some backup variables and tried to temporally remove them, but was not able to copy them back due to the issue with my NVRAM. That broke my UEFI and I'm not able to boot anything now - even UEFI setup menu. That's why I need Phenix Crisis Disk Tool - I hope it will restore UEFI.
I know, I should have tried your solution first.

Thanks everyone.

Offline

#16 2014-07-24 17:00:15

pmzqla
Member
Registered: 2014-07-24
Posts: 1

Re: UEFI problem: Could not prepare boot variable: No space left on device

Hi,

I had the same problem and I've managed to fix it.
This was the second time I attempted to install Linux on my machine, the first everything went fine without any problem. I recently decided to reinstall everything, but I encountered this issue.

As here suggested, the problem is the NVRAM. Deleting some boot entries with efibootmgr allowed me to add a new entry for GRUB, but upon reboot my BIOS noticed that there were missing entries, showed me a message and restored the default configuration.

After some research, I found that if more than half of the NVRAM is used, no changes are be performed unless "efi_no_storage_paranoia" is passed to the kernel.
The limit was added to work around some buggy firmwares, so be careful with it.

Offline

Board footer

Powered by FluxBB