Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 462705 - sys-boot/efibootmgr with kernel >3.8.2 - `efibootmgr -o x,y,z' does not set boot order
Summary: sys-boot/efibootmgr with kernel >3.8.2 - `efibootmgr -o x,y,z' does not set b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Yannick Schaeffer
URL:
Whiteboard:
Keywords:
Depends on: 510070
Blocks:
  Show dependency tree
 
Reported: 2013-03-22 16:36 UTC by Chris Smith
Modified: 2014-11-26 00:47 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2013-03-22 16:36:49 UTC
efibootmgr not working correctly with >gentoo-sources-3.8.2

Reproducible: Always

Actual Results:  
"efibootmgr -o x,y,z" does not set bootorder

"efibootmgr -b x -B" deletes the boot number but does not remove it from the bootorder

"efibootmgr -O" unfortunately will delete the bootorder (unfortunate in that you can't get it back)


Also tried with efibootmgr-0.6.0 (not in portage).

Fails with with both gentoo-sources-3.8.3 and gentoo-sources-3.8.4, works if I boot into gentoo-sources-3.8.2.
Comment 1 Chris Smith 2013-03-22 16:43:19 UTC
emerge --info
Portage 2.2.0_alpha169 (default/linux/amd64/13.0/desktop/gnome, gcc-4.7.2, glibc-2.16.0, 3.8.4-gentoo x86_64)
=================================================================
System uname: Linux-3.8.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.2
KiB Mem:    32900296 total,  29473276 free
KiB Swap:    6291452 total,   6291452 free
Timestamp of tree: Fri, 22 Mar 2013 16:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo desktop server
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/desktop /usr/local/portage/server"
SYNC="rsync://rsync11.us.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr apache2 audiofile bash-completion berkdb bluray branding bzip2 cairo caps cdaudio cdda cddb cdparanoia cdr cdrdao chm cli colord consolekit cracklib crypt cups curl cxx dbus designer-plugin djvu dri dts dv dvb dvd dvdr ebook emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gif gmp gnome gnome-keyring gnome-online-accounts gphoto2 gpm graphite gstreamer gtk gtk3 iconv icu ieee1394 imagemagick imap imlib ipv6 jack java jpeg jpeg2k kpathsea lame lcms libffi libnotify mad marble midi mmap mmx mng modules mozilla mp3 mp4 mpeg mudflap multilib musicbrainz mythtv nautilus ncurses network nls nodrm nptl nsplugin nvidia ofx ogg opencl openexr opengl openmp pam pango pcre pdf png policykit ppds pulseaudio quicktime readline rtmp samba sasl scanner sdl semantic-desktop session slp smp sndfile socialweb spell sse sse2 ssl startup-notification subversion svg theora threads tiff tk transparency truetype udev udisks unicode upower usb v4l vaapi vcd vdpau vim-syntax vorbis vpx wav wavpack wmf wxwidgets x264 xattr xcomposite xine xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel hdsp hpet hrtimer rtctimer seqdummy virmidi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer" LINGUAS="en_US en" NGINX_MODULES_HTTP="autoindex fancyindex fastcgi gzip" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Oleg Shirochenkov 2013-03-25 11:33:04 UTC
Hello.
I think the issue here is inside sys-kernel/gentoo-sources in EFI support.
3.8.2 is booting and working flawlessly in UEFI mode with EFI_STUB directly without any bootloaders, providing full access to efivars.
I've tried to upgrade to sys-kernel/gentoo-sources-3.8.4 by using oldconfig from 3.8.2, also sys-kernel/gentoo-sources-3.8.3-r1 has been tested.
Both 3.8.3-r1 and 3.8.4 are not loading in UEFI mode using EFI_STUB: screen is blank.
I've used GRUB2 for additional testing: loads 3.8.2, 3.8.3-r1 and 3.8.4 fine with the only difference between 3.8.2 and others that under 3.8.3-r1 and 3.8.4 efivars can be only read or removed, adding new boot records ignored without any error messages.

* efibootmgr -v

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0003,0002,3000,3001,2001,2002,2003
Boot0000* Linux	HD(1,800,100000,c44fa297-6e50-44cd-9fe4-972a821db2bf)File(\kernel-3.8.2-1.efi)r.o.o.t.=.U.U.I.D.=.5.a.5.3.4.2.6.1.-.c.8.8.f.-.4.b.2.9.-.b.f.8.9.-.8.e.7.9.8.c.2.f.a.8.1.6. .r.o. .i.n.i.t.r.d.=.\.i.n.i.t.r.a.m.f.s.-.3...8...2.-.1...i.m.g...
Boot0001* GRUB2	HD(1,800,100000,c44fa297-6e50-44cd-9fe4-972a821db2bf)File(\grub2\grub.efi)
Boot0002* Linux 3.8.3	HD(1,800,100000,c44fa297-6e50-44cd-9fe4-972a821db2bf)File(\kernel-3.8.3-1.efi)r.o.o.t.=.U.U.I.D.=.5.a.5.3.4.2.6.1.-.c.8.8.f.-.4.b.2.9.-.b.f.8.9.-.8.e.7.9.8.c.2.f.a.8.1.6. .r.o. .i.n.i.t.r.d.=.\.i.n.i.t.r.a.m.f.s.-.3...8...3.-.1...i.m.g...
Boot0003* Linux 3.8.4	HD(1,800,100000,c44fa297-6e50-44cd-9fe4-972a821db2bf)File(\kernel-3.8.4-1.efi)r.o.o.t.=.U.U.I.D.=.5.a.5.3.4.2.6.1.-.c.8.8.f.-.4.b.2.9.-.b.f.8.9.-.8.e.7.9.8.c.2.f.a.8.1.6. .r.o. .i.n.i.t.r.d.=.\.i.n.i.t.r.a.m.f.s.-.3...8...4.-.1...i.m.g...
Boot2001* USB Drive (UEFI)	RC
Boot3000* Internal Hard Disk or Solid State Disk	RC
Boot3001* Internal Hard Disk or Solid State Disk	RC
Boot3002* Internal Hard Disk or Solid State Disk	RC

* diff .config-3.8.2 .config-3.8.3-r1

3c3
< # Linux/x86_64 3.8.2-gentoo Kernel Configuration
---
> # Linux/x86_64 3.8.3-gentoo-r1 Kernel Configuration

* diff .config-3.8.2 .config-3.8.4
3c3
< # Linux/x86_64 3.8.2-gentoo Kernel Configuration
---
> # Linux/x86_64 3.8.4-gentoo Kernel Configuration

* .config-3.8.4

http://pastebin.com/Yj1REFgG

* file /boot/kernel-3.8.*

/boot/kernel-3.8.2-1.efi: Linux kernel x86 boot executable bzImage, version 3.8.2-gentoo (root@localhost) #1 SMP Thu Mar 7 02:06:46 MSK 201, RO-rootFS, swap_dev 0x4, Normal VGA
/boot/kernel-3.8.3-1.efi: Linux kernel x86 boot executable bzImage, version 3.8.3-gentoo-r1 (root@localhost) #1 SMP Mon Mar 25 12:02:49 MSK, RO-rootFS, swap_dev 0x4, Normal VGA
/boot/kernel-3.8.4-1.efi: Linux kernel x86 boot executable bzImage, version 3.8.4-gentoo (root@localhost) #1 SMP Mon Mar 25 00:30:57 MSK 20, RO-rootFS, swap_dev 0x4, Normal VGA

* /proc/version of kernel-3.8.2-1.efi

Linux version 3.8.2-gentoo (root@localhost) (gcc version 4.7.2 (Gentoo 4.7.2-r1 p1.5, pie-0.5.5) ) #1 SMP Thu Mar 7 02:06:46 MSK 2013

* /proc/version of kernel-3.8.4-1.efi

Linux version 3.8.4-gentoo (root@localhost) (gcc version 4.7.2 (Gentoo 4.7.2-r1 p1.5, pie-0.5.5) ) #1 SMP Mon Mar 25 00:30:57 MSK 2013

* emerge --info

Portage 2.1.11.58 (default/linux/amd64/13.0, gcc-4.7.2, glibc-2.16.0, 3.8.2-gentoo x86_64)
=================================================================
System uname: Linux-3.8.2-gentoo-x86_64-Intel-R-_Celeron-R-_CPU_B820_@_1.70GHz-with-gentoo-2.2
KiB Mem:     1873280 total,   1739292 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of tree: Sun, 24 Mar 2013 18:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror2.corbina.ru/gentoo-distfiles/ http://mirror.yandex.ru/gentoo-distfiles/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync2.ru.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre readline session sse sse2 ssl symlink tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2013-03-25 11:41:59 UTC
does not CC arch teams
Comment 4 Oleg Shirochenkov 2013-03-25 12:31:41 UTC
Upstream reports a Bug 55471 – efivars.c: fail for write boot entry - https://bugzilla.kernel.org/show_bug.cgi?id=55471
Comment 5 Oleg Shirochenkov 2013-03-25 19:22:44 UTC
Working patch is published in Bug 55471 – efivars.c: fail for write boot entry - https://bugzilla.kernel.org/show_bug.cgi?id=55471
Comment 6 Chris Smith 2013-04-27 15:15:57 UTC
This is still an issue with gentoo-sources-3.8.10. Have to keep gentoo-sources-3.8.2 around to use efibootmgr.
Comment 7 Florian Manschwetus 2013-08-17 17:28:40 UTC
still an issue with gentoo-sources 3.10.7, as there are no tools to do equivalent with efivarfs ti becomes a pita
Comment 8 Yannick Schaeffer 2014-09-11 09:38:36 UTC
(In reply to Florian Manschwetus from comment #7)
> still an issue with gentoo-sources 3.10.7, as there are no tools to do
> equivalent with efivarfs ti becomes a pita

efibootmgr v0.8 can do it with efivarfs. You'll need to build it yourself from the sources : https://github.com/vathpela/efibootmgr
Alongside one new dependency : https://github.com/vathpela/efivar
Comment 9 Yannick Schaeffer 2014-09-16 11:09:20 UTC
(In reply to Yannick Schaeffer from comment #8)
> (In reply to Florian Manschwetus from comment #7)
> > still an issue with gentoo-sources 3.10.7, as there are no tools to do
> > equivalent with efivarfs ti becomes a pita
> 
> efibootmgr v0.8 can do it with efivarfs. You'll need to build it yourself
> from the sources : https://github.com/vathpela/efibootmgr
> Alongside one new dependency : https://github.com/vathpela/efivar

There is an updated ebuild on my overlay : https://github.com/Wyti/Wyti-Overlay
Everything seems to work on my computer (kernel 3.16.2 with efivars disabled and only efivarfs)
feel free to repport any issues on the github issue tracker.
Comment 10 Mike Gilbert gentoo-dev 2014-11-26 00:47:52 UTC
Should be fixed with efibootmgr 0.11.0.