You are not logged in.

#1 2013-03-30 19:04:26

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

efibootmgr 0.5.4 works but 0.6.0 fails silently

The code below works flawlessly with the 0.5.4 version of efibootmgr but not with version 0.6.0 ... it fails silently and does not add any entries to the NVRAM.

echo "initrd=\EFI\arch\initramfs-linux.img root=/dev/mapper/vgTESTDrive-lvRoot cryptdevice=/dev/md33:vgTESTDrive add_efi_memmap pcie_aspm=force quiet" | iconv -f ascii -t ucs2 | efibootmgr --verbose --create --write-signature --gpt --disk /dev/sdd --part 1 --label "arch 2013-03-30 14:30:52" --loader '\EFI\arch\vmlinuz-linux.efi' --append-binary-args -

So my question is what changed in efibootmgr 0.6.0 that could explain this and how do I fix my code?

Offline

#2 2013-03-30 19:33:52

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

Can you try it like this:

efibootmgr --verbose --create --write-signature --gpt --disk /dev/sdd --part 1 --label "arch 2013-03-30 14:30:52" --loader '\EFI\arch\vmlinuz-linux.efi' -u "initrd=\\EFI\\arch\\initramfs-linux.img root=/dev/mapper/vgTESTDrive-lvRoot cryptdevice=/dev/md33:vgTESTDrive add_efi_memmap pcie_aspm=force quiet"

As a side note (and I am not sure if this would cause it to silently fail), you need to escape your backslashes.

On my machine, the conversion from ascii to unicode, truncates part of the path to my kernel.  I am not sure why this happens, but if I simply use "-u" it works just fine.

BTW, what kind of machine are you using?

Offline

#3 2013-03-31 13:10:19

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

WonderWoofy wrote:

Can you try it like this:

efibootmgr --verbose --create --write-signature --gpt --disk /dev/sdd --part 1 --label "arch 2013-03-30 14:30:52" --loader '\EFI\arch\vmlinuz-linux.efi' -u "initrd=\\EFI\\arch\\initramfs-linux.img root=/dev/mapper/vgTESTDrive-lvRoot cryptdevice=/dev/md33:vgTESTDrive add_efi_memmap pcie_aspm=force quiet"

As a side note (and I am not sure if this would cause it to silently fail), you need to escape your backslashes.

On my machine, the conversion from ascii to unicode, truncates part of the path to my kernel.  I am not sure why this happens, but if I simply use "-u" it works just fine.

BTW, what kind of machine are you using?

No luck with your code I'm afraid. efobootmgr 0.6.0 still fails silently. Good news is I replaced iconv with --unicode and added the escapes you suggested and both your code and my new code work with 0.5.4.

Machine:   Mobo: ASUSTeK model: M5A99X EVO version: Rev 1.xx
           Bios: American Megatrends version: 1604 date: 10/16/2012

Offline

#4 2013-04-03 15:03:06

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

KairiTech wrote:

No luck with your code I'm afraid. efobootmgr 0.6.0 still fails silently. Good news is I replaced iconv with --unicode and added the escapes you suggested and both your code and my new code work with 0.5.4.

Could you please provide your entire command string -- the one that worked, of course -- so I could study it a bit? Thanks.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#5 2013-04-03 16:05:27

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

@dhave, I think they both worked for KairiTech, but only with the 0.5.4 version.  Here is what I use for my system:

# efibootmgr --create --disk /dev/sda --part 1 --label "Arch Linux" --loader '\EFI\arch\vmlinuz-linux.efi' -u "root=/dev/mapper/volgrp0-root_arch initrd=\\EFI\\arch\\initramfs-linux.img add_efi_memmap quiet libahci.ignore_sss=1"

But you can also take the arguments (the part after "-u") and pipe them in, as was originally recommended:

 # echo "root=/dev/mapper/volgrp0-root_arch initrd=\\EFI\\arch\\initramfs-linux.img add_efi_memmap quiet libahci.ignore_sss=1" | iconv --from-code=ascii --to-code=ucs2 | efibootmgr --create --disk /dev/sda --part 1 --label "Arch Linux" --loader '\EFI\arch\vmlinuz-linux.efi' --append-binary-args - 

If you pipe like that, make sure the end of the efibootmgr command has the "-" in order to let it know that it will be taking those binary arguments from stdin.

Offline

#6 2013-04-03 16:47:33

timi
Member
Registered: 2013-03-02
Posts: 1

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

depends on the kernel, efibootmgr works with 3.7.* er kernel, and probably pre 3.8.3 but not with 3.8.3 and above on my system (mainboard: asus f1a75m-pro)
due to uefi patches in 3.8.3?

Offline

#7 2013-04-03 16:52:06

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

timi wrote:

depends on the kernel, efibootmgr works with 3.7.* er kernel, and probably pre 3.8.3 but not with 3.8.3 and above on my system (mainboard: asus f1a75m-pro)
due to uefi patches in 3.8.3?

@KairiTech: What kernel are you using? Timi's post has me wondering.

Last edited by dhave (2013-04-03 16:52:35)


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#8 2013-04-03 18:36:08

moleculecolony
Member
Registered: 2012-05-04
Posts: 3

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

Just having the same problem, although a bit stranger even.

I was installing Arch on another hard disk today, connected to this computer, from this one, for possible rescue purposes, using pacstrap.
Then arch-chroot to there, and then installing efi with this command from the installation guide:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug

The script said, no errors, and efibootmgr -v showed that the new entry was there in the nvram.

Then I changed the boot order to make it not boot before my usual installation, and it worked also.

Then I deleted this entry because I wanted to make it anew with another label, and it got deleted.

But from then on everything I tried to write with efibootmgr didn't work at all, as described in the other posts, (also not efibootmgr -n 1), all fails silently.

I don't want to go on for the moment trying to delete one of my older entries because if I never will be able to write to the nvram again I hope at least I can do with this as long as possible.

Could it be that it corrupted the nvram, in which case the only solution would be going back to bios one day? (Not really a problem, it's only that I like to get the best out of my hardware.)

[eri]  efibootmgr
BootCurrent: 0000
BootOrder: 0000,0001
Boot0000* Arch Linux
Boot0001* Fallback
[eri]  efibootmgr --version
version 0.6.0
[eri]  uname -a
Linux mitlDing 3.8.4-1-ARCH #1 SMP PREEMPT Wed Mar 20 22:10:25 CET 2013 x86_64 GNU/Linux

Offline

#9 2013-04-04 00:13:42

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

dhave wrote:
timi wrote:

depends on the kernel, efibootmgr works with 3.7.* er kernel, and probably pre 3.8.3 but not with 3.8.3 and above on my system (mainboard: asus f1a75m-pro)
due to uefi patches in 3.8.3?

@KairiTech: What kernel are you using? Timi's post has me wondering.

efibootmgr version 0.5.4
Linux archboot 3.6.2-1-ARCH #1 SMP PREEMPT Fri Oct 12 23:58:58 CEST 2012 x86_64 GNU/Linux

Code below works as expected and adds an entry to the NVRAM:

efibootmgr --create --write-signature --gpt --disk /dev/sdd --part 1 --label "TESTarch 2013-04-03 19:45:25" --loader '\EFI\TESTarch\vmlinuz-linux.efi' --unicode "initrd=\\EFI\\TESTarch\\initramfs-linux.img root=/dev/mapper/vgTESTDrive-lvRoot cryptdevice=/dev/md33:vgTESTDrive add_efi_memmap pcie_aspm=force quiet"

efibootmgr version 0.6.0
Linux archboot 3.8.4-1-ARCH #1 SMP PREEMPT Wed Mar 20 22:10:25 CET 2013 x86_64 GNU/Linux

Code below does not add an entry to the NVRAM nor provides any error messages:

efibootmgr --create --write-signature --gpt --disk /dev/sdd --part 1 --label "TESTarch 2013-04-03 19:59:14" --loader '\EFI\TESTarch\vmlinuz-linux.efi' --unicode "initrd=\\EFI\\TESTarch\\initramfs-linux.img root=/dev/mapper/vgTESTDrive-lvRoot cryptdevice=/dev/md33:vgTESTDrive add_efi_memmap pcie_aspm=force quiet"

The two lines of code above are generated by the same script and should be identical except for the time in the label text.

Last edited by KairiTech (2013-04-04 00:20:12)

Offline

#10 2013-04-04 04:01:04

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

@KairiTech: Thanks for the clear data. It looks like the determining factor could indeed be the kernel version rather than the efibootmgr version, right?


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#11 2013-04-04 13:32:47

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

dhave wrote:

@KairiTech: Thanks for the clear data. It looks like the determining factor could indeed be the kernel version rather than the efibootmgr version, right?

Not quite sure I fully understand how the kernel could affect efibootmgr in that way but I should mention that I now always get a efivars update failure message:

efivars: set variable() failed: status=8000000000000009

for every command I issue for 0.6.0. I usually clean up my boot entries and rearrange the boot order with -b X -B and -o respectively and even though they work as expected the failure status of 9 is always the message I get.

Last edited by KairiTech (2013-04-06 16:41:36)

Offline

#12 2013-04-04 23:18:45

moleculecolony
Member
Registered: 2012-05-04
Posts: 3

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

Don't know what happened, but after today's kernel update it works again.

The funny thing is, it worked again BEFORE I rebooted, when the old kernel still was in use. And it still works now after rebooting.

All I did was this (from pacman.log)
[2013-04-05 00:19] removed lua (5.2.1-3)
[2013-04-05 00:23] upgraded linux (3.8.4-1 -> 3.8.5-1)
[2013-04-05 00:23] upgraded linux-docs (3.8.4-1 -> 3.8.5-1)
[2013-04-05 00:23] upgraded linux-headers (3.8.4-1 -> 3.8.5-1)
[2013-04-05 00:23] upgraded lirc-utils (1:0.9.0-39 -> 1:0.9.0-40)
[2013-04-05 00:23] >>> Updating module dependencies. Please wait ...
[2013-04-05 00:23] upgraded lirc (1:0.9.0-39 -> 1:0.9.0-40)
[2013-04-05 00:23] upgraded opera (12.14.1738-1 -> 12.15.1748-1)

Don't understand this, but the good thing is you only have to understand when there's a problem.
(Which makes problems a fine thing sometimes, btw.)

Offline

#13 2013-05-10 15:34:02

FrozenCow
Member
Registered: 2011-02-03
Posts: 19

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

I seem to have the same problem. I have a script to set --bootnext, which now doesn't work anymore. Any efibootmgr command I use that attempts to change anything will fail (exitcode 1). I hoped a upgrade would solve things, but with my current kernel it still doesn't work:
3.8.12-1-ck #1 SMP PREEMPT Wed May 8 05:48:42 EDT 2013 x86_64 GNU/Linux

Is there anybody for whom it does work with the latest kernel and efibootmgr?

EDIT:
I tried linux-lts and it *does* work there: 3.0.77-1-lts #1 SMP Wed May 8 09:28:56 CEST 2013 x86_64 GNU/Linux
I tried the standard (official) linux kernel and it *doesn't* work there: 3.8.11-1-ARCH #1 SMP PREEMPT Wed May 1 20:18:57 CEST 2013 x86_64 GNU/Linux

I'll try linux-git next, but it'll take a while to compile.

EDIT2:
Alright, installed linux-git and it works again, so I guess it is fixed in the latest linux versions (3.9.0-1-12494-g05a88a4-dirty #1 SMP PREEMPT Fri May 10 18:27:35 CEST 2013 x86_64 GNU/Linux)

Last edited by FrozenCow (2013-05-10 16:42:53)

Offline

#14 2013-05-10 18:21:00

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

FrozenCow wrote:

EDIT2:
Alright, installed linux-git and it works again, so I guess it is fixed in the latest linux versions (3.9.0-1-12494-g05a88a4-dirty #1 SMP PREEMPT Fri May 10 18:27:35 CEST 2013 x86_64 GNU/Linux)

Read about efibootmgr working again with the 3.9 kernel just today so I'm waiting to test it when the next Arch install image with that version is released.

Offline

#15 2013-05-10 18:40:21

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

Read this...

Last edited by KairiTech (2013-05-11 04:46:17)

Offline

#16 2013-05-11 00:47:18

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

KairiTech wrote:

Was it your intent to link back to the same spot?  I was very confused for a second...

Offline

#17 2013-05-11 04:48:10

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

WonderWoofy wrote:
KairiTech wrote:

Was it your intent to link back to the same spot?  I was very confused for a second...

No. I got my reply windows muddled...LOL

Offline

#18 2013-05-13 00:26:53

sinatosk
Member
Registered: 2010-11-28
Posts: 107

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

I'm using linux 3.9.2-1 x86_64 and it's not working for me... silently fails using efibootmgr 0.6.0-1

efibootmgr 0.6.0-1 gives me the ENOSPC (No space left on device)
efibootmgr 0.5.4-3 gives me the EIO (Input/Output error)

Booted into linux-lts 3.0.77-1 x86_64 using efibootmgr 0.6.0-1 and it works fine.

Mobo: Asus Sabertooth 990FX R2.0
BIOS: 1503

I've stated the same on a bug report

Last edited by sinatosk (2013-05-13 00:27:17)

Offline

#19 2013-05-14 14:12:55

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: efibootmgr 0.5.4 works but 0.6.0 fails silently

WonderWoofy wrote:

On my machine, the conversion from ascii to unicode, truncates part of the path to my kernel.  I am not sure why this happens, but if I simply use "-u" it works just fine.

I've experimented a bit with the 3.9 kernel and efibootmgr 0.6.0 seems to work now but I do have the same issue with the truncating. If I name my kernel vmlinuz-linux-ALT.efi it gets truncated to vmlinuz-linux-ALT.e but if I name it ALT-vmlinuz-linux.efi it doesen't. And that's with the -u option.

Waiting for the new install media with the 3.9 kernel to test it more fully.

Offline

Board footer

Powered by FluxBB