Skip to contentSkip to conversation

efibootmgr not working on xen-unstable booted on uefi system

DISCUSSION Fantu 2 participants 8 messages May 29, 2012 – May 31, 2012 2 messages not in the archive

lore
Share & tools
lore

Fantu

author
#0 lore raw

I have installed dom0 Wheezy 64 bit on Dell PowerEdge T310 with kernel from package and xen-unstable. System is in Uefi mode and booted with grub-efi-amd64.
Booting without xen efibootmgr works, while with xen not, efivars kernel module is loaded but show this message:
efibootmgr
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.
If you need some additional info please notify me, thanks for any reply.

--
View this message in context: http://xen.1045712.n5.nabble.com/efibootmgr-not-working-on-xen-unstable-booted-on-uefi-system-tp5709153.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

#1 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line · Fantu

I have installed dom0 Wheezy 64 bit on Dell PowerEdge T310 with kernel from package and xen-unstable. System is in Uefi mode and booted with grub-efi-amd64.

In -unstable, you shouldn't use any boot manager (other than EFI's build in one) to boot Xen - neither GrUB or elilo are suitable, as for making use of EFI runtime services you need to boot xen.efi instead of xen.gz.

Quoted 6 lines

Booting without xen efibootmgr works, while with xen not, efivars kernel module is loaded but show this message:
efibootmgr
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.

Presumably the module loads nevertheless, but without the necessary underlying infrastructure it won't be able to do any runtime calls, and hence wouldn't set up anything under /sys or /proc.

Jan

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Fabio Fantoni

Thanks for reply, I don't have xen.efi in my test build, full xen build log on attachment.
I see this on log:
EFI support disabled
But I not undestand why and where set it.

This is dependent on your tool chain - binutils 2.22 (older versions only if properly patched) and gcc 4.5.x (4.6.x recommended, as 4.5.x was never tested afaict) are the minimum required to make that message go away. (You could have looked at the build logic that produces that message to see what the requirements are.)

Jan

PS: Please don't drop xen-devel from Cc on conversations like this.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line · Fabio Fantoni

Il 29/05/2012 15:21, Jan Beulich ha scritto:

Quoted 2 lines

PS: Please don't drop xen-devel from Cc on conversations like this.

You dropped xen-devel again.

Quoted 4 lines

Thanks for reply, I check binutils and gcc, are installed and right version seems:
...
2.22-6 GNU assembler, linker and binary

And it also is configured properly (i.e. lists i386pep as supported emulation)? If building xen.efi doesn't work, the first thing to look at is (in the Xen build tree) xen/arch/x86/efi/disabled, which stores any error encountered while checking for the necessary features in compiler in linker).

Jan

#6 lore raw

Il 29/05/2012 16:00, Jan Beulich ha scritto:

Quoted 17 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line · Fabio Fantoni

Il 29/05/2012 15:21, Jan Beulich ha scritto:

Quoted 2 lines

PS: Please don't drop xen-devel from Cc on conversations like this.

You dropped xen-devel again.

Quoted 4 lines

Thanks for reply, I check binutils and gcc, are installed and right version seems:
...
2.22-6 GNU assembler, linker and binary

And it also is configured properly (i.e. lists i386pep as supported emulation)? If building xen.efi doesn't work, the first thing to look at is (in the Xen build tree) xen/arch/x86/efi/disabled, which stores any error encountered while checking for the necessary features in compiler in linker).

Quoted 11 lines

Jan

-----
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 2012.0.1913 / Database dei virus: 2425/5030 - Data di rilascio: 29/05/2012

The content of xen/arch/x86/efi/disabled is:
ld: unrecognised emulation mode: i386pep
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om How can I do for fix this?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#7 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Fabio Fantoni

The content of xen/arch/x86/efi/disabled is:
ld: unrecognised emulation mode: i386pep
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
How can I do for fix this?

If your distor doesn't offer a suitably configured binutils package, you'll have to build one yourself, I'm afraid.

Jan

#8 lore raw

Il 30/05/2012 10:44, Jan Beulich ha scritto:

Quoted 9 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Fabio Fantoni

The content of xen/arch/x86/efi/disabled is:
ld: unrecognised emulation mode: i386pep
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
How can I do for fix this?

If your distor doesn't offer a suitably configured binutils package, you'll have to build one yourself, I'm afraid.

Quoted 11 lines

Jan

-----
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 2012.0.1913 / Database dei virus: 2425/5032 - Data di rilascio: 29/05/2012

Currently I'm testing xen-unstable on Debian Wheezy, I installed binutils-mingw-w64 package that provide binutils with i386pep emulation, I tried to rebuild but I had same error on xen/arch/x86/efi/disabled. The ld binary provided with this package has a different name, what can I do to make xen use it instead of the default one? (/usr/bin/ld)
I loocked for $(LD) definition used in makefile but I didn't found it.
Thanks for any reply.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#9 lore raw
Quoted 23 lines
Quoted 1 line
Quoted 1 line · Fabio Fantoni

Il 30/05/2012 10:44, Jan Beulich ha scritto:

Quoted 9 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Fabio Fantoni

The content of xen/arch/x86/efi/disabled is:
ld: unrecognised emulation mode: i386pep
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
How can I do for fix this?

If your distor doesn't offer a suitably configured binutils package, you'll have to build one yourself, I'm afraid.

Quoted 8 lines

Jan

-----
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 2012.0.1913 / Database dei virus: 2425/5032 - Data di rilascio:

29/05/2012

Quoted 3 lines
Quoted 7 lines

Currently I'm testing xen-unstable on Debian Wheezy, I installed binutils-mingw-w64 package that provide binutils with i386pep emulation, I tried to rebuild but I had same error on xen/arch/x86/efi/disabled. The ld binary provided with this package has a different name, what can I do to make xen use it instead of the default one? (/usr/bin/ld) I loocked for $(LD) definition used in makefile but I didn't found it. Thanks for any reply.

Setting LD can be done on the make command line (you shouldn't modify any sources for this). I don't think, however, that using a mingw targeting binary will work, as the *same* ld will be used to link the normal ELF executable (ending up as xen.gz). You should use a Linux linker (i.e. defaulting to ELF) that *also* supports i386pep. (Building binutils is, btw, a pretty simple process, so I don't see why you're not just doing that - all customization you need is adding "--enable-targets=x86_64-pep" to the configure script invocation command line.)

Jan