How can I force "fsck -y" of a removable usb drive before mounting it?
Hi,
$ uname -a
Linux e130 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64
GNU/Linux
$ cat /etc/debian_version
10.2
I have a removable mp3 player that gets auto-magically mounted as:
$ mount |grep sdb
/dev/sdb1 on /media/oc/PHILIPS type vfat
(rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2
Every time I plug it in, I get this message in dmesg:
[47212.945001] FAT-fs (sdb1): Volume was not properly unmounted. Some
data may be corrupt. Please run fsck.
Whatever way I umount this drive (either manually via terminal or
right-clicking the icon on the desktop), I get the above message when I
re-mount it.
Is there a way to tell Debian to perform a "fsck -y"
on the drive before mounting it? For example, an entry in /etc/fstab or
some trickery somewhere in systemd?
Thanks
--
Ottavio Caruso
Reply to: