Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603484 - sys-apps/microcode-ctl microcode_ctl: cannot open source file '/lib/firmware/microcode.dat' errno=2 (No such file or directory)
Summary: sys-apps/microcode-ctl microcode_ctl: cannot open source file '/lib/firmware/...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-22 18:05 UTC by cronolio
Modified: 2018-01-10 23:15 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 cronolio 2016-12-22 18:05:11 UTC
/etc/init.d/microcode_ctl start
 * Updating microcode ...
microcode_ctl: cannot open source file '/lib/firmware/microcode.dat' errno=2 (No such file or directory)
 * Failed to update microcode via '/dev/cpu/microcode'                                                  [ !! ]
 * ERROR: microcode_ctl failed to start

looks like it now placed in /lib/firmware/intel-ucode/

emerge --info sys-firmware/intel-microcode sys-apps/microcode-ctl
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.4, glibc-2.22-r4, 4.4.35-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.35-gentoo-x86_64-Pentium-R-_Dual-Core_CPU_E6600_@_3.06GHz-with-gentoo-2.3
KiB Mem:     4042736 total,   1919460 free
KiB Swap:    3145724 total,   3145724 free
Timestamp of repository gentoo: Thu, 22 Dec 2016 11:02:43 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /mnt/mirror/portage
    sync-type: git
    sync-uri: git://github.com/gentoo-mirror/gentoo
    priority: -1000

rion
    location: /var/lib/layman/rion
    sync-type: laymansync
    sync-uri: git://github.com/rion-overlay/rion-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

local-crossdev
    location: /mnt/mirror/portage-crossdev
    masters: gentoo
    priority: 9999

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -mssse3 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe -mssse3 -fomit-frame-pointer"
DISTDIR="/mnt/mirror/gentoo-distfiles/distfiles/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
LANG="ru_RU.utf8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j 2"
PKGDIR="/mnt/mirror/gentoo-distfiles/packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aacplus acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit cpudetection cracklib crypt cue cxx dbus djvu dri dts dvd dvdr emboss encode exif faac fam ffmpeg firefox flac gdbm gif glamor gnome-keyring gstreamer gtk gtk3 gtkstyle iconv jpeg lcms libnotify lzma mad matroska mmx mmxext mng modplug modules mp3 mp4 mpeg multilib musepack mysqli natspec ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio rar readline sdl seccomp session spell sse sse2 sse3 ssl ssse3 startup-notification svg theora tiff truetype twolame udev udisks unicode upower usb v4l vaapi vdpau vorbis vpx wavpack wxwidgets x264 xattr xcb xml xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby21" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-firmware/intel-microcode-20151106::gentoo was built with the following:
USE="split-ucode -initramfs -monolithic" ABI_X86="64"


sys-apps/microcode-ctl-1.23::gentoo was built with the following:
USE="(-selinux)" ABI_X86="64"
Comment 1 cronolio 2016-12-22 19:07:51 UTC
ah.. i should complile sys-firmware/intel-microcode with use monolithic to have /lib/firmware/microcode.dat
but looks like all worked without
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2016-12-29 17:59:56 UTC
So I guess the request is to make microcode-ctl mention USE=monolith?
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2016-12-29 18:00:19 UTC
Honestly you should probably be using the early cpio code for loading microcode and not use microcode-ctl
Comment 4 cronolio 2016-12-29 20:27:12 UTC
looks like for my cpu external microcode is not required 
https://downloadcenter.intel.com/download/26400/Linux-Processor-Microcode-Data-File

also yes. it will be useful if microcode_ctl will check monolithic use flag

something like
...
RDEPEND="|| ( <sys-firmware/intel-microcode-20150121-r1 >=sys-firmware/intel-microcode-20150121-r1[monolithic] )
	selinux? ( sec-policy/selinux-cpucontrol )"
...
Comment 5 Francisco Lloret 2017-01-06 11:14:19 UTC
I get the same problem in my Core2Duo box.

Core2Duo firmware # rc-service microcode_ctl start
 * Updating microcode ...
microcode_ctl: cannot open source file '/lib/firmware/microcode.dat' errno=2 (No such file or directory)
 * Failed to update microcode via '/dev/cpu/microcode'                    [ !! ]
 * ERROR: microcode_ctl failed to start
Core2Duo firmware # pwd
/lib/firmware
Core2Duo firmware # ls mi*
ls: no se puede acceder a 'mi*': No existe el fichero o el directorio
Core2Duo firmware # ls -lda intel*
drwxr-xr-x 2 root root   864 sep 18 22:25 intel
-rw-r--r-- 1 root root 34304 sep 18 22:25 intelliport2.bin
drwxr-xr-x 2 root root  1992 ene  6 12:04 intel-ucode
Core2Duo firmware # 


Core2Duo firmware # emerge -av =intel-microcode-20150121

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD ] sys-firmware/intel-microcode-20150121::gentoo [20151106::gentoo] USE="(-initramfs%) (-monolithic%) (-split-ucode%*)" 0 KiB

Total: 1 package (1 downgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y
...
...

* Messages for package sys-firmware/intel-microcode-20150121:

 * The microcode available for Intel CPUs has been updated.  You'll need
 * to reload the code into your processor.  If you're using the init.d:
 * /etc/init.d/microcode_ctl restart
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
Core2Duo firmware # rc-service microcode_ctl start
 * Updating microcode ...                                                 [ ok ]
Core2Duo firmware # 

Downgrading intel-microcode to 20150121 version solves the problem. Then is a bug in the new firmware that has a missing file.
Comment 6 Richard Gray 2017-02-13 14:41:12 UTC
I can confirm that I have had exactly the same problem when the microcode_ctl service tries to start.

Adding "monolithic" to /etc/portage/package.use fixes the problem when the microcode_ctl service starts.

These steps fixed the problem for me:

# echo "sys-firmware/intel-microcode monolithic" >> /etc/portage/package.use
# emerge -1 intel-microcode

The annoying thing for me was that this change took place silently and it's only when I noticed a boot level service failing to start that I started to delve into why this was: the answer being hidden here in bugzilla.

Given that the file microcode.dat is less than 3MB, would it be so terrible to generate/include it anyway regardless of any use flag?

Richard.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2018-01-10 23:15:22 UTC
Intel is now not included some microcode in the .dat file anymore, and only shipping the split versions. iucode_tool can handle uploading these where microcode-ctl can't.

As such, sys-firmware/intel-microcode is dropping USE=monolithic, and you should move to using iucode_tool or early loading instead of microcode_ctl.