I'm using a Raspberry with an external hard disk formatted in HFS+ and sometimes, for example after a power failure, the external hd is mounted only in read-only mode. In this case I run manually the following commands to remount in read-write:
sudo umount /dev/sda2
sudo fsck.hfsplus /dev/sda2
sudo mount -a
I'd like to run fsck.hfsplus every time at boot before /dev/sda2 is mounted automatically.
Currently in my /etc/fstab I have this configuration:
/dev/sda2 /media hfsplus force,rw,uid=osmc,gid=osmc 0 0
Which is the best way tu run fsck.hfsplus before mounting an external disk (HFS+)?