Skip to content

Commit

Permalink
work around annoying mount messages
Browse files Browse the repository at this point in the history
Recent versions of "mount" print a warning message when /etc/fstab is newer
than /run/systemd/systemd-units-load.
Since the latter is created during early boot when the system time
hasn't been set yet, the warning is printed pretty much always, at least
on Raspberry Pi which doesn't have an RTC.
Suppress the message by setting the modification date of /etc/fstab to
Jan 1 1970, so that it always appears older than systemd-units-load.
  • Loading branch information
marcone committed Dec 17, 2024
1 parent 572eb7d commit 7f8877e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup/pi/make-root-fs-readonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,8 @@ then
echo "tmpfs /var/lib/ntp tmpfs nodev,nosuid 0 0" >> /etc/fstab
fi

# work around 'mount' warning that's printed when /etc/fstab is
# newer than /run/systemd/systemd-units-load
touch -t 197001010000 /etc/fstab

log_progress "done"

0 comments on commit 7f8877e

Please sign in to comment.