User avatar
RDK
Posts: 296
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

How to detect corrupted file system

Thu Feb 04, 2016 1:32 pm

Is there a simple command which will tell me if any part of the SD's file system or my USB stick's (auto-mounted) has been corrupted by a "non-graceful" shutdown?

With Wheezy and attached to a monitor I could usually see the error or warning messages on the screen, but not so from PUTTY.

With Jessie the messages go by so fast that I can not read them and the final screen does not show any thing about the file system.

So, I'm looking for a command line command which I can use on either system to detail the state of the Pi's file system.

Thanks for you assistance.....RDK

jahboater
Posts: 5435
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: How to detect corrupted file system

Thu Feb 04, 2016 4:20 pm

You probably want fsck (man fsck for details).
For boot messages try dmesg
"We are in the beginning of a mass extinction, and all you can talk
about is money and fairy tales of eternal economic growth."
- Greta Thunberg

User avatar
RDK
Posts: 296
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

Re: How to detect corrupted file system

Thu Feb 04, 2016 5:59 pm

OK, I will read up on fsck, but as I recall it is only good for Linux file systems. I'm sure my USB memory stick is FAT or FAT32.

Thanks....RDK

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

Re: How to detect corrupted file system

Thu Feb 04, 2016 6:03 pm

There are fsck extensions for most file systems. fsck on a vfat file system will call fsck.vfat aka dosfsck from the dosfstools package.

User avatar
RDK
Posts: 296
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

Re: How to detect corrupted file system

Sat Feb 13, 2016 12:39 am

I guess I need to be a little more specific. First off I'm a novice when it comes to Linux. My Raspberry Pi's (a B+ and a V2) are running headless, so I do not get to see the information displayed on the console during boot-up. My Pi's are running Wheezy with a standard SD card (8 GB) and a 16 GB USB memory stick formatted FAT (or maybe FAT32?).

What I'm looking for is a command or a set of commands which will tell me if any part of the file system has been corrupted by a "non-graceful" shutdown or for any other reason. After that I think I have already researched the techniques to repair the corrupted elements.

Thanks....RDK

beta-tester
Posts: 1350
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: How to detect corrupted file system

Sat Feb 13, 2016 5:43 am

RDK wrote:I guess I need to be a little more specific. First off I'm a novice when it comes to Linux. My Raspberry Pi's (a B+ and a V2) are running headless, so I do not get to see the information displayed on the console during boot-up. My Pi's are running Wheezy with a standard SD card (8 GB) and a 16 GB USB memory stick formatted FAT (or maybe FAT32?).

What I'm looking for is a command or a set of commands which will tell me if any part of the file system has been corrupted by a "non-graceful" shutdown or for any other reason. After that I think I have already researched the techniques to repair the corrupted elements.

Thanks....RDK
??? :?: :?: :?:
as jahboater told you...
jahboater wrote:You probably want fsck (man fsck for details).
For boot messages try dmesg
use dmesg to see the boot message
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

Return to “Beginners”