Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504018 - sys-kernel/dracut-0.36 generates initrd that fails to decrypt LUKS partition
Summary: sys-kernel/dracut-0.36 generates initrd that fails to decrypt LUKS partition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-09 20:16 UTC by Andrius Štikonas
Modified: 2014-03-20 10:52 UTC (History)
2 users (show)

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


Attachments
rdsosreport.txt (rdsosreport.txt,301.91 KB, text/plain)
2014-03-16 02:53 UTC, Andrius Štikonas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius Štikonas 2014-03-09 20:16:50 UTC
Using sys-kernel/dracut-0.36 renders my system unbootable.



Reproducible: Always

Steps to Reproduce:
Install dracut-036 on system with full disk encryption.
Generate initramfs.
Reboot
Actual Results:  
At boot time the following error message is shown:
Failed to issue method call: Unit systemd-cryptsetup@luks[...a few times something like \x2d161c22c0...].service failed to load: No such file or directory.

Expected Results:  
System boots.

dracut-034 works fine.
Comment 1 Andrius Štikonas 2014-03-09 20:23:40 UTC
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.7.3, glibc-2.17, 3.13.6-gentoo-gnu x86_64)
=================================================================
System uname: Linux-3.13.6-gentoo-gnu-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_740_@_1.73GHz-with-gentoo-2.2
KiB Mem:     8111540 total,     71432 free
KiB Swap:    4194300 total,   4194236 free
Timestamp of tree: Sun, 09 Mar 2014 18:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4                                                                                                                                                                                  
sys-kernel/linux-headers: 3.9 (virtual/os-headers)                                                                                                                                                                 
sys-libs/glibc:           2.17                                                                                                                                                                                     
Repositories: gentoo kde tbc My-Local-Overlay                                                                                                                                                                      
ACCEPT_KEYWORDS="amd64"                                                                                                                                                                                            
ACCEPT_LICENSE="@FREE"                                                                                                                                                                                             
CBUILD="x86_64-pc-linux-gnu"                                                                                                                                                                                       
CFLAGS="-march=native -O2 -pipe"                                                                                                                                                                                   
CHOST="x86_64-pc-linux-gnu"                                                                                                                                                                                        
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0 /var/lib/hsqldb"                                                   
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"                                     
CXXFLAGS="-march=native -O2 -pipe"                                                                                                                                                                                 
DISTDIR="/usr/portage/distfiles"                                                                                                                                                                                   
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 userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.qubenet.net/mirror/gentoo/"
LANG="lt_LT.utf8"
LC_ALL="lt_LT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/kde /var/lib/layman/tbc /usr/local/portage"
SYNC="rsync://stikonas.eu/gentoo-portage"
USE="16k_voice 1stclassmsg 3dnow 3dnowext R X a52 aac aacs aalib acl acpi addns addressbook ads aesicm aio akonadi alsa amd64 amr analitza android ap apache2 apng archive atmo attica auth autoipd autoreplace autotools avahi bash-completion bazaar berkdb bindist bittorrent bl blender bluetooth bluray bogofilter bookmarks boost branding btrfs bugzilla bzip2 c++0x cairo captcha cdb cdda cddb cdr cgi chappa chatzilla chm cjk clang cli clucene cmake color colordiff connection-sharing contactnotes context cracklib crypt cryptsetup csharp css csv cups curl custom-optimization cvs cxx d darcs dbus dc1394 deblob declarative deflate designer designer-plugin desktopglobe device-mapper dhcpcd dirac djvu doc doc-pdf docbook dos dot downloadorder dri drm dselect dts dump dvb dvd dvdr dvi dvi2tty dvipdfm dynamic eap-sim ebook edit editor egl eigen emacs embedded emboss emovix enchant encode examples exif extensions extra extra-algorithms extras fakevim fam farstream fat fbcon festival ffmpeg fftw fgpanel firefox fits flac fltk fluidsynth fontconfig fontforge foomaticdb fortran fortran2003 fortran95 fpm fpx freetds ftp fuse g3dvl gallium games garmin gbm gcj gd gdbm gecko geoip geoloc geolocation gflags ghcbootstrap gif gimp git gles gles1 gles2 glew glsl gmail gme gmp gnuplot gnutls go gold google gpg gphoto2 gpm gps gpssync gptfdisk gpu graphics graphite graphviz gsl gsm gstreamer gtk gtk3 gtkspell gtkstyle gudev gyroscopic gzip handbook harden hdf5 hdri hfs highlight history hscolour html hunspell hwdb i18n icedtea7 iconv icu id3tag ieee1394 ilbc imagemagick imaging imap imlib imlib2 inkjar introspection iodbc ipc iplayer ipod ipv6 irc jabber jack jadetex java javascript jbootstrap jingle jit jpeg jpeg2k json kate kde kdepim kerberos keymap kipi kontact kpathsea lame lapack laptop lastfm latex latexmk lcms ldap lensfun less libass libcaca libkms libnotify libproxy libsamplerate libssh2 libtiger lightning llvm lm_sensors lpsol lto lua luatex lvm lyrics lzma lzo mad magic magnetgenerator maildir marble math mathml matplotlib matroska md5sum mdnsresponder-compat mediaplayer mediawiki melt mercurial metalink mhash midi mikmod minizip mjpeg mms mmx mmxext mng mod mod_muc mod_pubsub modemmanager modplug modules mono monolithic monolithic-build monotone mount mp3 mp4 mpeg mpg123 mplayer mpx mtp multilib multitarget musepack music musicbrainz mysql mythtv nat native native-exceptions ncurses nethack network networkmanager new-login nls nntp nptl nsplugin nss ntfs ntfsprogs ntp numpy oauth objc objc++ objc-gc octave ogg ogg123 ogm okteta okular omega openal openexr opengl opengtl openid openldap openmp openstreetmap openvg optimization opus otr p2p pam pango parted pcap pcmcia pcntl pcre pdf pdfannotextractor pdfimport pdo perl phonon php plasma player plymouth png pnm policykit postgres postproc postscript ppds prediction preview-latex prison privacy private-headers privatestorage projectm ps psf pstoedit pstricks pth publishers pulseaudio pyqt4 python qalculate qml qt3support qt4 qthelp quicktime quota qwt r600-llvm-compiler radio radius raster raw rdesktop readline realtime redeyes resolvconf rss rtmp rtsp ruby samba sandbox sasl sbcl scanner schroedinger science script sdk sdl search secure-delete semantic-desktop sensord server session sftp sha512 shapefile shared-dricore shared-glapi sip sipim skins smime sndfile soap sockets socks5 solver sound soundtouch sparse speech speex spell sql sqlite sqlite3 srt srtp sse sse2 sse3 sse4 ssh ssl ssse3 stars startup-notification statistics strong-optimization stun subversion suhosin supernodal svg symlink syslog system-boost system-cairo system-ffmpeg system-icu system-jpeg system-libs system-libvncserver system-libyaml system-mpmath system-mupdf system-renpy system-sqlite system-wine systemd taglib tcl tcpd telepathy templates terminal tesseract tex4ht texteffect themedesigner themes theora thesaurus threads thumbnail thumbnails tidy tiff timidity tk tls tntc tor tordns translator truetype twolame udev udisks udisks2 umfpack unicode unlock-notify unzip upnp upnp-av upower usb v4l v8 vaapi vala valgrind vamp vdpau video videos videoslideshow vim vim-syntax vlc vlm vnc vorbis vpx wav wavpack wayland wayland-compositor webcam webdav webgl webkit webkit2 webm webp wifi wikipedia wimax win32 win64 winbind wma wmf word-perfect wps wxwidgets x264 xa xcb xcomposite xetex xface xfs xft xinerama xml xmlwriter xmp xorg xpm xrandr xrender xscreensaver xv xvfb xvid xvmc xwayland xz youtube zeroconf zip zlib" ABI_X86="64 32" 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" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" DRACUT_MODULES="btrfs caps crypt lvm plymouth" 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 keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver pdfimport" LINGUAS="lt en en_GB" NETBEANS_MODULES="nb php harness websvccommon" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby18 ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="dummy fbdev intel nouveau radeon v4l vesa via vmware" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Alexander Tsoy 2014-03-10 08:49:08 UTC
As a workaround please try to disable systemd module: issue dracut with "--omit systemd", or add omit_dracutmodules+=" systemd " to dracut.conf|dracut.conf.d/*.conf
Comment 3 Alexander Tsoy 2014-03-10 08:51:10 UTC
And please show the output of "emerge -pv sys-apps/systemd"
Comment 4 Andrius Štikonas 2014-03-10 10:47:41 UTC
(In reply to Alexander Tsoy from comment #3)
> And please show the output of "emerge -pv sys-apps/systemd"

[ebuild   R    ] sys-apps/systemd-208-r2:0/1  USE="acl cryptsetup doc filecaps firmware-loader gudev introspection kmod lzma pam (policykit) python tcpd -audit -gcrypt -http -qrcode (-selinux) {-test} -vanilla -xattr" ABI_X86="(64) (-32) (-x32)" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" 0 kB
Comment 5 Andrius Štikonas 2014-03-10 11:15:30 UTC
(In reply to Alexander Tsoy from comment #2)
> As a workaround please try to disable systemd module: issue dracut with
> "--omit systemd", or add omit_dracutmodules+=" systemd " to
> dracut.conf|dracut.conf.d/*.conf

The workaround works for me.
Comment 6 Alexander Tsoy 2014-03-12 14:02:32 UTC
Hmm.. I set up a full disk encryption - everything except /boot and bios_grub is on LUKS volume. And dracut-036 with systemd module works fine for me. I tried it with systemd-210.9999 and systemd-211. The only annoying thing is that kernel messages hides the password prompt, so I need to press enter to see it.
Comment 7 Andrius Štikonas 2014-03-12 14:06:21 UTC
(In reply to Alexander Tsoy from comment #6)
> Hmm.. I set up a full disk encryption - everything except /boot and
> bios_grub is on LUKS volume. And dracut-036 with systemd module works fine
> for me. I tried it with systemd-210.9999 and systemd-211. The only annoying
> thing is that kernel messages hides the password prompt, so I need to press
> enter to see it.

Could it be that two dracut modules somehow interact to produce this bug? I use plymouth as well. But this is strange... At least the workaround you suggested works.
Comment 8 Alexander Tsoy 2014-03-12 19:15:24 UTC
(In reply to Andrius Štikonas from comment #7)
> Could it be that two dracut modules somehow interact to produce this bug?

Very unlikely.

Does boot process hangs or you can get to an emergency shell? If you can get to an emergency shell, then please try booting with "rd.shell rd.debug log_buf_len=1M" in the kernel cmdline, save /run/initramfs/rdsosreport.txt file somewhere (e.g. in /boot) and attach it to this bug report.
Comment 9 Andrius Štikonas 2014-03-12 22:28:55 UTC
Boot process hangs with the error message that I provided in my first post.
Comment 10 Alexander Tsoy 2014-03-15 13:35:17 UTC
dracut-initqueue from systemd module have very big RDRETRY count. Please add "rd.break rd.debug log_buf_len=1M systemd.log_level=debug rd.retry=4" to the kernel cmdline. Dracut should drop you to the emergency shell very quickly. And then follow instructions from comment 8.
Comment 11 Andrius Štikonas 2014-03-16 02:53:28 UTC
Created attachment 372782 [details]
rdsosreport.txt
Comment 12 Alexander Tsoy 2014-03-16 12:37:17 UTC
(In reply to Andrius Štikonas from comment #11)
> Created attachment 372782 [details]
> rdsosreport.txt

systemd-cryptsetup-generator does not read /etc/cmdline.d/*.conf files. That's why you need to add 'rd.luks.uuid=luks-161c22c0-1741-4711-8a1e-e793cb41e7e8' to the kernel cmdline. Moreover starting with dracut-037 files in /etc/cmdline.d/ will not be generated by default (this behaviour can be configured via hostonly_cmdline variable in dracut.conf or -[-no]-hostonly-cmdline switch). So I'd recommend you to also add 'rd.lvm.lv=lvm/root' to the kernel cmdline.
Comment 13 Andrius Štikonas 2014-03-16 14:32:16 UTC
(In reply to Alexander Tsoy from comment #12)
> (In reply to Andrius Štikonas from comment #11)
> > Created attachment 372782 [details]
> > rdsosreport.txt
> 
> systemd-cryptsetup-generator does not read /etc/cmdline.d/*.conf files.
> That's why you need to add
> 'rd.luks.uuid=luks-161c22c0-1741-4711-8a1e-e793cb41e7e8' to the kernel
> cmdline. Moreover starting with dracut-037 files in /etc/cmdline.d/ will not
> be generated by default (this behaviour can be configured via
> hostonly_cmdline variable in dracut.conf or -[-no]-hostonly-cmdline switch).
> So I'd recommend you to also add 'rd.lvm.lv=lvm/root' to the kernel cmdline.

Just tried this. Computer can boot successfully now.

There is however a small regression. Plymouth is not started by initrd for some reason... It only starts late in the boot process.
Comment 14 Alexander Tsoy 2014-03-16 15:48:11 UTC
(In reply to Andrius Štikonas from comment #13)
> There is however a small regression. Plymouth is not started by initrd for
> some reason... It only starts late in the boot process.

Please open a separate bug report.