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.
17 lines
371 B
SYSTEMD
17 lines
371 B
SYSTEMD
[Unit]
|
|
Description=HassOS boot partition
|
|
DefaultDependencies=no
|
|
Before=umount.target local-fs.target
|
|
Conflicts=umount.target
|
|
After=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2dboot.service
|
|
Wants=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2dboot.service
|
|
|
|
[Mount]
|
|
What=/dev/disk/by-label/hassos-boot
|
|
Where=/mnt/boot
|
|
Type=auto
|
|
Options=sync
|
|
|
|
[Install]
|
|
WantedBy=local-fs.target
|