Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503132 - sys-kernel/dracut-036: boot hangs on dm-crypt
Summary: sys-kernel/dracut-036: boot hangs on dm-crypt
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-01 16:11 UTC by Maciej Piechotka
Modified: 2017-08-03 18:40 UTC (History)
5 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 Maciej Piechotka 2014-03-01 16:11:45 UTC
When I try to boot with newer dracut it asks for password for my hdd. However in meantime systemd states that unit (correspondint to dm-crypt volume) has changed and it is recommended to issue daemon-reload. When I enter the password message is repeated and boot apparently hangs (ctrl+alt+del works with clean reboot of system). Using older version of dracut works.

Unfortunately due to my irregular updates I'm not sure if it happend during update to 036 or to 034-r4. I don't have systemd module enabled in dracut.

Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/gnome, gcc-4.8.2, glibc-2.18-r1, 3.12.13-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-3820QM_CPU_@_2.70GHz-with-gentoo-2.2
KiB Mem:    16069260 total,  12641748 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of tree: Sat, 01 Mar 2014 15:45:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.4
dev-util/cmake:           2.8.12.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.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.7.3-r1, 4.8.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo crossdev gnome gentoo-haskell vala steam-overlay bumblebee rust x11 gnome-next local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="-j8 --load-average=7"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://ftp.heanet.ie/pub/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--add-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory"
MAKEOPTS="-j4 -l7"
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="/usr/local/portage-crossdev /var/lib/layman/gnome /var/lib/layman/haskell /var/lib/layman/vala /var/lib/layman/steam /var/lib/layman/bumblebee /var/lib/layman/rust /var/lib/layman/x11 /var/lib/layman/heather-gnome /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avx berkdb bluetooth branding bzip2 bzr c++0x cairo caps cdda cdr cli clutter colord cracklib crypt cryptsetup cups cxx dbus dconf debugger device-mapper doc dri dts dvd dvdr eds emacs emboss encode evo exif fam ffmpeg firefox flac flash fontconfig fortran fprint fuse g3dvl gbm gdbm gdm gif git gmp gnome gnome-keyring gnome-online-accounts gnuplot gnutls google gpm grilo gsettings gstreamer gtk gtk3 gtkstyle gui hoogle hscolour iconv inotify introspection iproute2 ipsec ipv6 ipython irc ithreads jabber jemalloc jit jpeg kerberos laptop latex lcms ldap libkms libnotify libproxy libsecret llvm lvm lzma mad map mercurial mmx mng modules mp3 mp4 mpeg multilib nautilus ncurses networking networkmanager nls nptl nsplugin ogg opencl opengl openmp oss pam pango parted pch pcre pdf perl pkcs11 plotutils png policykit ppds profiler pulseaudio python python3 qemu qt4 readline realtime rss samba scanner sdl session sna socialweb spell spice sqlite sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification steamruntime subversion svg symlink systemd tcpd telepathy theora threads tiff tracker truetype udev udisks unicode upnp upower usb v4l vaapi vala vdpau virt-network virtfs vorbis vpx webkit wxwidgets x264 xattr xcb xcomposite xinerama xml xrandr xv xvid zeitgeist zlib zsh-completion" ABI_X86="32 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" 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" DRACUT_MODULES="caps crypt lvm" 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 efi-64" INPUT_DEVICES="evdev synaptics mouse mutouch" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en pl en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_3" PYTHON_TARGETS="python3_3 pypy2_0" QEMU_SOFTMMU_TARGETS="arm x86_64 i386" QEMU_USER_TARGETS="arm x86_64 i386" RUBY_TARGETS="ruby20 ruby21" SANE_BACKENDS="gt68xx" USERLAND="GNU" VIDEO_CARDS="intel 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"
USE_PYTHON="3.3 2.7-pypy-2.0"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

sys-kernel/dracut-036-r4 was built with the following:
USE="(multilib) systemd -debug (-selinux)" ABI_X86="64"
Comment 1 Alexander Tsoy 2014-03-05 11:48:53 UTC
(In reply to Maciej Piechotka from comment #0)
> When I try to boot with newer dracut it asks for password for my hdd.
> However in meantime systemd states that unit (correspondint to dm-crypt
> volume) has changed and it is recommended to issue daemon-reload. When I
> enter the password message is repeated and boot apparently hangs
> (ctrl+alt+del works with clean reboot of system).

Did you try to enter a password second time? There was a bug in dracut which caused asking for password multiple times and may be it was not fixed completely.
Comment 2 Maciej Piechotka 2014-03-05 20:09:35 UTC
(In reply to Alexander Tsoy from comment #1)
> (In reply to Maciej Piechotka from comment #0)
> > When I try to boot with newer dracut it asks for password for my hdd.
> > However in meantime systemd states that unit (correspondint to dm-crypt
> > volume) has changed and it is recommended to issue daemon-reload. When I
> > enter the password message is repeated and boot apparently hangs
> > (ctrl+alt+del works with clean reboot of system).
> 
> Did you try to enter a password second time? There was a bug in dracut which
> caused asking for password multiple times and may be it was not fixed
> completely.

I've just did and it doesn't help. Echo is disabled though. Also during reboot messages multiple dm are displayed (corresponding to lvm on dm-crypt).

It looks like the systemd module is included now and it's enabled event with USE=-systemd (prevuiously I just needed not to put it in DRACUT_MODULES). Adding systemd to omit_dracutmodules seems to fixed the problem.

I vaguely remember that I read that systemd module in dracut is for some specialized cases only. And, apparently, it does not play nice with dm-crypt.
Comment 3 Alexander Tsoy 2014-03-05 20:29:40 UTC
Please check that you built systemd with USE=cryptsetup
Comment 4 Alexander Tsoy 2014-03-05 20:33:02 UTC
(In reply to Maciej Piechotka from comment #2)
> It looks like the systemd module is included now and it's enabled event with
> USE=-systemd (prevuiously I just needed not to put it in DRACUT_MODULES).
> Adding systemd to omit_dracutmodules seems to fixed the problem.

Yes, systemd module is not removed if USE=-systemd. I don't know the reason for this. Amadeusz should know better. :)
Comment 5 Maciej Piechotka 2014-03-05 21:06:36 UTC
(In reply to Alexander Tsoy from comment #3)
> Please check that you built systemd with USE=cryptsetup

It was built with it.
Comment 6 Alexander Tsoy 2014-03-12 19:37:10 UTC
(In reply to Maciej Piechotka from comment #0)
> When I enter the password message is repeated and boot apparently hangs

So you can't get to an emergency shell?
Comment 7 Maciej Piechotka 2014-03-15 18:35:17 UTC
(In reply to Alexander Tsoy from comment #6)
> (In reply to Maciej Piechotka from comment #0)
> > When I enter the password message is repeated and boot apparently hangs
> 
> So you can't get to an emergency shell?

What exactly do you mean (i.e getting by setting target in kernel parameters, timeout...)?
Comment 8 Alexander Tsoy 2014-03-16 12:48:45 UTC
Please follow instructions from bug 504018:
https://bugs.gentoo.org/show_bug.cgi?id=504018#c10
Comment 9 Alexander Tsoy 2014-03-16 19:04:24 UTC
I meant instructions to btain rdsosreport.txt
Comment 10 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-04-24 19:57:09 UTC
systemd is being removed if systemd flag is disabled in 037 which partially solves the problem. But the bug appears with systemd enabled, yes? Is this a problem of misconfiguration and we can close the bug or the bug is still valid?
Comment 11 Maciej Piechotka 2014-04-26 09:44:22 UTC
(In reply to Amadeusz Żołnowski from comment #10)
> systemd is being removed if systemd flag is disabled in 037 which partially
> solves the problem. But the bug appears with systemd enabled, yes? Is this a
> problem of misconfiguration and we can close the bug or the bug is still
> valid?

If the systemd will not be enabled even when USE=systemd it should solve the problem.
Comment 12 Alexander Tsoy 2014-05-16 11:10:00 UTC
I suspect you don't have rd.luks.uuid option in you kernel cmdline. Please try the patch from ML [1]. For >=dracut-037 you should also use "--hostonly-cmdline" option.

Another possible solution to this problem is to explicitly append all needed options to the kernel cmdline. You can get them using "dracut --print-cmdline" command.

[1] http://article.gmane.org/gmane.linux.kernel.initramfs/3704
Comment 13 Maciej Piechotka 2014-05-17 12:37:23 UTC
(In reply to Alexander Tsoy from comment #12)
> I suspect you don't have rd.luks.uuid option in you kernel cmdline. Please
> try the patch from ML [1]. For >=dracut-037 you should also use
> "--hostonly-cmdline" option.
> 
> Another possible solution to this problem is to explicitly append all needed
> options to the kernel cmdline. You can get them using "dracut
> --print-cmdline" command.
> 
> [1] http://article.gmane.org/gmane.linux.kernel.initramfs/3704

I have rd.luks.uuid in my kernel commandline as configured by grub2.
Comment 14 Alexander Tsoy 2014-05-20 22:51:41 UTC
Please try 037-r2. 

If it doesn't fix the problem please provide rdsosreport.txt. Add "rd.debug log_buf_len=1M systemd.log_level=debug rd.retry=4" to the kernel cmdline. You will be dropped to an emergency shell. Then save /run/initramfs/rdsosreport.txt file on persistent storage (e.g. in /boot or any other device which you can mount from initramfs) and attach it to this bug report.
Comment 15 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-03-24 15:28:10 UTC
@Maciej Piechotka: Any news on this bug?
Comment 16 Maciej Piechotka 2017-08-03 18:40:41 UTC
I cannot repro on TOT.