Mount boot partition sync (#1092) (#1101)

When we write the update to the boot partiton, there is nothing which
makes sure that data is written to disk. This leaves a rather large
window (probably around 30s) where a machine reset/poweroff can lead
to a corrupted boot partition. Use the sync mount option to minimize the
corruption window.

Note that sync is not ideal for flash drives normally. But since we
write very little and typically only on OS update to the boot partition,
this shouldn't be a problem.
This commit is contained in:
Stefan Agner 2020-12-17 14:09:43 +01:00 committed by GitHub
parent 4255425b93
commit 323f415fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ Wants=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2dboot.service
What=/dev/disk/by-label/hassos-boot
Where=/mnt/boot
Type=auto
Options=sync
[Install]
WantedBy=local-fs.target