From a9ca75d5c8dbe47c7c900255092e18434366f0c6 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Mon, 8 May 2017 17:19:36 +0200 Subject: [PATCH] Skip starting systemd-remount-fs.service in containers even when /etc/fstab is present. This allows entering fully running state even when /etc/fstab lists / to be mounted from a device which is not present in the container. LP: #1576341 --- ...-systemd-remount-fs.service-in-containers.patch | 27 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 28 insertions(+) create mode 100644 debian/patches/debian/Skip-starting-systemd-remount-fs.service-in-containers.patch diff --git a/debian/patches/debian/Skip-starting-systemd-remount-fs.service-in-containers.patch b/debian/patches/debian/Skip-starting-systemd-remount-fs.service-in-containers.patch new file mode 100644 index 0000000..c7e6c71 --- /dev/null +++ b/debian/patches/debian/Skip-starting-systemd-remount-fs.service-in-containers.patch @@ -0,0 +1,27 @@ +From: Balint Reczey +Date: Mon, 8 May 2017 17:02:03 +0200 +Subject: Skip starting systemd-remount-fs.service in containers + +even when /etc/fstab is present. + +This allows entering fully running state even when /etc/fstab +lists / to be mounted from a device which is not present in the +container. + +LP: #1576341 +--- + units/systemd-remount-fs.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/systemd-remount-fs.service.in b/units/systemd-remount-fs.service.in +index 8d9daac..bc59aa4 100644 +--- a/units/systemd-remount-fs.service.in ++++ b/units/systemd-remount-fs.service.in +@@ -15,6 +15,7 @@ After=systemd-fsck-root.service + Before=local-fs-pre.target local-fs.target shutdown.target + Wants=local-fs-pre.target + ConditionPathExists=/etc/fstab ++ConditionVirtualization=!container + + [Service] + Type=oneshot diff --git a/debian/patches/series b/debian/patches/series index 9d71aec..4716847 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -34,3 +34,4 @@ debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch debian/Revert-core-enable-TasksMax-for-all-services-by-default-a.patch debian/Let-graphical-session-pre.target-be-manually-started.patch debian/Add-env-variable-for-machine-ID-path.patch +debian/Skip-starting-systemd-remount-fs.service-in-containers.patch -- 2.7.4