skcasb
Posts: 18
Joined: Wed Jul 11, 2018 12:46 pm

How to check the filesystem to find errors

Wed Jun 12, 2019 9:43 am

Hi to all,

Do you know if there is a command to check the filesystem for errors without repair it ?

I try to use this command on my mounted filesystem (raspbian stretch on usb)

Code: Select all

 fsck.ext4 -c /dev/sda1
unfortunately I receive the below message that warns me that I can damage the filesystem if I continue

"WARNING!!! The filesystem is mounted. If you continue you ***WILL*** cause ***SEVERE*** filesystem damage."

User avatar
rpdom
Posts: 17720
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to check the filesystem to find errors

Wed Jun 12, 2019 9:49 am

Yes, fsck -n /dev/sda1

But it will probably detect errors as the filesystem is in use and will be changing during the check..
Unreadable squiggle

Andyroo

Re: How to check the filesystem to find errors

Wed Jun 12, 2019 10:21 am

Best to boot off a new SD card, mount the faulty one, take a copy of it and then fix the errors.

Return to “Troubleshooting”