Package: systemd Version: 215-15 Severity: important Tags: patch Since version 0.117, initramfs-tools will fsck and mount / (and /usr, if on a separate file system) in the initramfs. These changes will be part of jessie.
With ext[234] this has some unpleasant side-effects though, if the RTC is set to local time and not UTC. A workaround has been added for new installations [2], which disables the e2fsck superblock time check. Upgraded systems won't have such a /etc/e2fsck.conf though. I therefore propose that we skip the fsck for / and /usr altogether, if already done by the initramfs and asked for flag files to be created [3] in that case. Attached is a patch, which makes use of those flag files. Martin, I'd especially appreciate your review here, as I'd like to upload this very soon. This patch makes debian/patches/fstab-generator-don-t-rely-on-usr-being-mounted-in-t.patch obsolete. I tested this patch successfully with both initramfs-tools 0.119 and 0.120. Michael [1] https://packages.qa.debian.org/i/initramfs-tools/news/20140925T091944Z.html [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767040 [3] http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/2015-April/006741.html -- Package-specific info: -- System Information: Debian Release: 8.0 APT prefers unstable APT policy: (500, 'unstable'), (200, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages systemd depends on: ii acl 2.2.52-2 ii adduser 3.113+nmu3 ii initscripts 2.88dsf-59 ii libacl1 2.2.52-2 ii libaudit1 1:2.4-1+b1 ii libblkid1 2.25.2-6 ii libc6 2.19-17 ii libcap2 1:2.24-8 ii libcap2-bin 1:2.24-8 ii libcryptsetup4 2:1.6.6-5 ii libgcrypt20 1.6.3-2 ii libkmod2 20-1 ii liblzma5 5.1.1alpha+20120614-2+b3 ii libpam0g 1.1.8-3.1 ii libselinux1 2.3-2 ii libsystemd0 215-15 ii mount 2.25.2-6 ii sysv-rc 2.88dsf-59 ii udev 215-15 ii util-linux 2.25.2-6 Versions of packages systemd recommends: ii dbus 1.8.16-1 ii libpam-systemd 215-15 Versions of packages systemd suggests: ii systemd-ui 3-3 -- Configuration Files: /etc/dbus-1/system.d/org.freedesktop.network1.conf 162e9a90d8f824f79ef2c6390827ec7b [Errno 2] Datei oder Verzeichnis nicht gefunden: u'/etc/dbus-1/system.d/org.freedesktop.network1.conf 162e9a90d8f824f79ef2c6390827ec7b' /etc/dbus-1/system.d/org.freedesktop.resolve1.conf 6969148b4616c56a5c9065cec5ab0775 [Errno 2] Datei oder Verzeichnis nicht gefunden: u'/etc/dbus-1/system.d/org.freedesktop.resolve1.conf 6969148b4616c56a5c9065cec5ab0775' /etc/systemd/journal-upload.conf fbc67bdd554f87d2f189c1a5fbdcfb27 [Errno 2] Datei oder Verzeichnis nicht gefunden: u'/etc/systemd/journal-upload.conf fbc67bdd554f87d2f189c1a5fbdcfb27' /etc/systemd/journald.conf changed [not included] -- no debconf information
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 1256a1c..1179eba 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -158,11 +158,13 @@ static bool mount_is_network(struct mntent *me) { } static bool mount_in_initrd(struct mntent *me) { + struct stat sb; + assert(me); return hasmntopt(me, "x-initrd.mount") || - streq(me->mnt_dir, "/usr"); + (streq(me->mnt_dir, "/usr") && stat("/run/initramfs/fsck-usr", &sb) == 0); } static int add_mount( diff --git a/units/systemd-fsck-root.service.in b/units/systemd-fsck-root.service.in index 4162983..0668107 100644 --- a/units/systemd-fsck-root.service.in +++ b/units/systemd-fsck-root.service.in @@ -13,6 +13,7 @@ After=systemd-readahead-collect.service systemd-readahead-replay.service Before=local-fs.target shutdown.target ConditionPathIsReadWrite=!/ +ConditionPathExists=!/run/initramfs/fsck-root [Service] Type=oneshot