Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236219

How can I force "fsck -y" of a removable usb drive before mounting it?

From Ottavio Caruso <ottavio2006-usenet2012@yahoo.com>
Newsgroups linux.debian.user
Subject How can I force "fsck -y" of a removable usb drive before mounting it?
Date 2021-06-20 11:10 +0200
Message-ID <Cs1CN-6bK-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

How can I force "fsck -y" of a removable usb drive before mounting  it? Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> - 2021-06-20 11:10 +0200
  Re: How can I force "fsck -y" of a removable usb drive before  mounting it? Anders Andersson <pipatron@gmail.com> - 2021-06-20 12:40 +0200

csiph-web