Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586254 - sys-kernel/dracut-044 needs upstream patch to include initrd-root-device.target for compatibility with >=sys-apps/systemd-230
Summary: sys-kernel/dracut-044 needs upstream patch to include initrd-root-device.targ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL: https://github.com/dracutdevs/dracut/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-18 05:59 UTC by Marien Zwart (RETIRED)
Modified: 2016-11-04 18:43 UTC (History)
3 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 Marien Zwart (RETIRED) gentoo-dev 2016-06-18 05:59:29 UTC
systemd-230 introduces a new special target "initrd-root-device.target", and uses it to order the (generated) systemd-fsck-root.service correctly (systemd commit 453980c4889deed61c24ccc20d92059ccf9d57ec), instead of directly ordering it after the device.

Upstream dracut will include initrd-root-device.target in the initramfs as of commit f305207bb812d11455359e4177a0445bee234247, but that commit is not present in dracut-044.

Without that change, my system does not boot. The initramfs tries to fsck the root device before it (or at least the /dev/disk/by-uuid/ symlink it tries to fsck it by) exists in /dev, so fsck fails, and the boot is aborted. The most recent initramfs that still booted contained systemd 229.

With the dracut commit mentioned above applied on top of dracut-044, my system can boot with an initramfs with systemd-230 in it.

As far as I can tell from booting with systemd.log_level=debug and staring at journalctl -b, systemd ignores the "After=initrd-root-device.target" in systemd-fsck-root.service because that target does not exist, and then tries to start systemd-fsck-root.service too early. I can attach logs of a failed boot as further evidence if required (I only looked at them from the initramfs environment without copying them to storage, so I'd have to do a little dance to get them before I can attach them).

You probably need a slightly exotic root fs device for the /dev node to appear late enough for this problem to materialize. I'm seeing this with a mirrored btrfs referenced by the by-uuid symlink in fstab.

I did not test what dracut with this patch does with <systemd-230 installed, but it should work (the file is installed with dracut-install -o, meaning "optional, do not fail if source is missing").

Portage 2.3.0_rc1 (python 2.7.11-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.23-r2, 4.6.2-gentoo-m19 x86_64)
=================================================================
System uname: Linux-4.6.2-gentoo-m19-x86_64-Intel-R-_Core-TM-_i7-4771_CPU_@_3.50GHz-with-gentoo-2.2
KiB Mem:    16378112 total,  13645604 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of repository gentoo: Sat, 18 Jun 2016 01:45:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.5 [disabled]
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.4::gentoo, 3.5.1-r3::gentoo
dev-util/ccache:          3.2.5::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

marienz
    location: /usr/local/portage/private
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE fping freedist free-noncomm google-chrome AdobeFlash-11.x Google-TOS D1X CC-Sampling-Plus-1.0 unRAR MPEG-4 gSOAP repoze MSttfEULA AMD"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-ggdb -O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-ggdb -O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.internode.on.net/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/var/tmp/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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi adns alsa amd64 avahi bluetooth branding btrfs bzip2 cairo canberra caps cdda cdio cdr clang cli clutter colord corefonts crypt cups cxx dbus device-mapper distinct-l doc dos dot dri dri3 drm dts dvd dvdr dvi eds efi egl emacs emboss encode equalizer evo exif expat ffmpeg firefox flac fontconfig fortran fuse g3dvl gbm gflags ghcbootstrap gif git glamor gles gles2 gmp gnome gnome-keyring gnome-online-accounts gnuefi go google gpg gstreamer gtk gtk3 gtkstyle http iconv icu idn imap infinality inotify introspection ipv6 irc jpeg lame latex lcms libass libcaca libffi libkms libnotify libsecret libvisual llvm llvm-shared-libs lua lzma mad maildir minizip mmx mmxext mng modules mp3 mp4 mpeg mtp multilib multimedia nautilus ncurses nfsidmap nls nptl numpy objc ogg opengl openmp opus pam pango pch pdf playlist png policykit postscript ppds prelink preview-latex pulseaudio python python3 qml qt5 readline realtime s3tc sandbox scanner schroedinger seccomp semantic-desktop session sip smtp speex spell spice sqlite sse sse2 ssl startup-notification svg symlink system-harfbuzz system-icu system-jflex system-jpeg system-jsoncpp systemd sysv-utils theora tiff tokyocabinet toolkit-scroll-bars tools tracker truetype udev udisks udisks2 unicode unwind upower urwid usb vaapi vala valgrind vorbis vpx wayland webkit webp widevine widgets wxwidgets x264 xattr xcb xcomposite xetex xft xinerama xml xmp xorg xv xvfb xvmc zeroconf zlib zsh-completion" 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" 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="aes avx avx2 f16c fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="nss" DRACUT_MODULES="btrfs" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB en_US nl fy fy_NL" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5 pypy" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby21" SANE_BACKENDS="u12" USERLAND="GNU" VIDEO_CARDS="intel i965" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON