Commit b5db1e5a authored by Michael Biebl's avatar Michael Biebl

Skip filesystem check if already done by the initramfs

Newer versions of initramfs-tools already fsck and mount / and /usr in
the initramfs. Skip the filesystem check in this case.

This makes fstab-generator-don-t-rely-on-usr-being-mounted-in-t.patch
obsolete, so remove it.

Closes: #782522
parent 12483a05
......@@ -6,6 +6,7 @@ systemd (215-16) UNRELEASED; urgency=medium
[ Michael Biebl ]
* Do not print anything while passwords are being queried. This should make
password prompts without plymouth more usable. (Closes: #765013)
* Skip filesystem check if already done by the initramfs. (Closes: #782522)
-- Martin Pitt <mpitt@debian.org> Sun, 12 Apr 2015 06:04:48 -0500
......
From: Michael Biebl <biebl@debian.org>
Date: Mon, 13 Apr 2015 19:34:23 +0200
Subject: Skip filesystem check if already done by the initramfs
Newer versions of initramfs-tools already fsck and mount / and /usr in
the initramfs. Skip the filesystem check in this case.
Closes: #782522
---
src/fstab-generator/fstab-generator.c | 4 +++-
units/systemd-fsck-root.service.in | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index cb3d9dc..3323884 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -163,11 +163,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
From: Michael Stapelberg <stapelberg@debian.org>
Date: Tue, 29 Oct 2013 22:29:22 +0100
Subject: =?utf-8?q?fstab-generator=3A_don=E2=80=99t_rely_on_/usr_being_mou?=
=?utf-8?q?nted_in_the_initrd?=
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Debian is not there yet. Let’s revert this upstream change for now.
Closes: #724797
---
src/fstab-generator/fstab-generator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 1256a1c..21d30c8 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -160,9 +160,7 @@ static bool mount_is_network(struct mntent *me) {
static bool mount_in_initrd(struct mntent *me) {
assert(me);
- return
- hasmntopt(me, "x-initrd.mount") ||
- streq(me->mnt_dir, "/usr");
+ return hasmntopt(me, "x-initrd.mount");
}
static int add_mount(
......@@ -158,7 +158,6 @@ systemctl-don-t-skip-native-units-when-enabling-disa.patch
Run-update-rc.d-defaults-before-update-rc.d-enable-d.patch
don-t-try-to-start-autovt-units-when-not-running-wit.patch
timedated-don-t-rely-on-usr-being-mounted-in-the-ini.patch
fstab-generator-don-t-rely-on-usr-being-mounted-in-t.patch
Make-logind-hostnamed-localed-timedated-D-Bus-activa.patch
Launch-logind-via-a-shell-wrapper.patch
Start-logind-on-demand-via-libpam-systemd.patch
......@@ -204,3 +203,4 @@ core-don-t-fail-to-run-services-in-user-instances-if.patch
PrivateTmp-shouldn-t-require-tmpfs.patch
sysv-generator-add-support-for-etc-insserv-overrides.patch
syslog-Increase-max_dgram_qlen-by-pulling-in-systemd.patch
Skip-filesystem-check-if-already-done-by-the-initram.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment