User avatar
Dis93
Posts: 132
Joined: Thu Apr 07, 2016 8:30 pm
Location: Wuthering, Yorkshire

How to is file system has errors.. and how to clean them

Fri May 13, 2016 8:01 pm

I noticed on boot my Zero had a dirty bit set (dirty..dirty..dirty bit)
I ran fsck -n which removed the dirty bit but but obviously didn't check or repair my sd card.
So how does one;

a - check to see if the filesystem needs repair
b - repair the system

I know you can't fully repair a live system so what do you do? In the case of a Pi, if you have another Pi can you use a USB sd card reader and scan the system? Can you scan and repair the sd card via an sd card reader on a *nix/Mac/Win box?

I did try and search the forum for this, but grief me if this question is obvious to a greybeard :P

User avatar
Dis93
Posts: 132
Joined: Thu Apr 07, 2016 8:30 pm
Location: Wuthering, Yorkshire

Re: How to is file system has errors.. and how to clean them

Fri May 13, 2016 8:02 pm

OMG.. title gore.. should have been How to see if the file system has errors.. and how to clean them.

User avatar
CarlRJ
Posts: 598
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: How to is file system has errors.. and how to clean them

Sat May 14, 2016 12:11 am

Do this:

Code: Select all

sudo touch /forcefsck
And the next time you reboot, the filesystem will get fsck'd before it gets mounted.

User avatar
Dis93
Posts: 132
Joined: Thu Apr 07, 2016 8:30 pm
Location: Wuthering, Yorkshire

Re: How to is file system has errors.. and how to clean them

Sat May 14, 2016 8:52 am

Thank you!
I knew it'd be something simple :)

Return to “Troubleshooting”