Source: partman-target Version: 115 Dear Installer Team,
please consider adding words informing users they should run "systemctl daemon-reload" after changing /etc/fstab. With stale mount units from an older /etc/fstab, users might observe "interesting surprises", f.e. systemd might umount newly mounted filesystems, if the in-memory mount units conflict with info in /etc/fstab. Please find a potential patch attached. Thanks, Chris
>From 0cae8e3d5e18fae9961894336f5cd9bd0fdcc7f2 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler <z...@debian.org> Date: Tue, 23 Jun 2020 23:24:33 +0200 Subject: [PATCH] create_fstab_header: add systemd hints systemd reads /etc/fstab to generate mount units. They become stale in-memory configuration after fstab is changed, and this can lead to nasty surprises. Example: systemd might unmount newly mounted filesystems, if /etc/fstab had conflicting info previously. Signed-off-by: Chris Hofstaedtler <z...@debian.org> --- finish.d/create_fstab_header | 3 +++ 1 file changed, 3 insertions(+) diff --git a/finish.d/create_fstab_header b/finish.d/create_fstab_header index e99fa5e..560087a 100755 --- a/finish.d/create_fstab_header +++ b/finish.d/create_fstab_header @@ -11,6 +11,9 @@ case `udpkg --print-os` in # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # +# systemd generates mount units based on this file, see systemd.mount(5). +# Please run 'systemctl daemon-reload' after making changes here. +# EOF printf "%-15s %-15s %-7s %-15s %-7s %s\n" '# <file system>' '<mount point>' '<type>' '<options>' '<dump>' '<pass>' >> /target/etc/fstab ;; -- 2.27.0