LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-13-2013, 02:23 PM   #1
bomberb17
Member
 
Registered: Jul 2005
Posts: 38

Rep: Reputation: 0
Problem running fsck on SD card containing raspberry pi distro


Hello all,
I have Arch linux installed on a 4GB SD card for my raspberry pi. Strange things were happening lately so I took the SD out and ran fsck on my Ubuntu computer. By running fsck I was getting a lot of errors so I tried running fsck with the -a option. But I got:
Code:
panos@ubuntu:~$ sudo fsck -a /dev/sdf2
fsck from util-linux 2.20.1
/dev/sdf2 contains a file system with errors, check forced.
/dev/sdf2: Resize inode not valid.  

/dev/sdf2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
	(i.e., without -a or -p options)
so i run fsck without -a. After getting lots of errors (hitting enter accepting default choices) I start getting errors as follows:

Code:
Directory inode 45366 has an unallocated block #215970.  Allocate<y>? yes

Directory inode 45366 has an unallocated block #215971.  Allocate<y>? yes

Directory inode 45366 has an unallocated block #215972.  Allocate<y>? yes

Directory inode 45366 has an unallocated block #215973.  Allocate<y>? yes

Directory inode 45366 has an unallocated block #215974.  Allocate<y>? yes

Directory inode 45366 has an unallocated block #215975.  Allocate<y>? yes

Directory inode 45366 has an unallocated block #215976.  Allocate<y>?
The problem is that I have to keep the enter key pressed all the time, and these errors just never end. I am sitting with the enter key pressed for over an hour and the errors just keep on. How can I overcome this to fix my SD?
 
Old 12-14-2013, 05:26 AM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbang
Posts: 613
Blog Entries: 1

Rep: Reputation: 140Reputation: 140
The easiest way is to reformat and restore it from your backup. (You do have a backup I hope)
Depending on how much the card has been used, you may need to consider replacing it soon.

Can you still access the card to retrieve your data files?
 
Old 12-14-2013, 08:22 AM   #3
bomberb17
Member
 
Registered: Jul 2005
Posts: 38

Original Poster
Rep: Reputation: 0
I do have a backup but it is a little old.. The card is still accessible
 
Old 12-14-2013, 11:25 AM   #4
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbang
Posts: 613
Blog Entries: 1

Rep: Reputation: 140Reputation: 140
Then what I'd do is backup all data files from the home directory and 're-flash' with the latest disk image. These flash memory cards tend to go wonky from time to time and, since they're only a few GiB, it's generally easier to reformat than to try to solve file system errors on them.
I usually use dd to make a simple, uncompressed backup which I can just dd back to the card whenever I need to 'restore' it. Works even better than a Windows restore point.
 
Old 12-14-2013, 11:57 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,197

Rep: Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567
You can also try a "fsck -y" which answers yes to those questions...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux distro hosts web services on Raspberry Pi LXer Syndicated Linux News 0 11-14-2013 07:50 AM
LXer: Raspberry Pi Is Running Well On Wayland/Weston LXer Syndicated Linux News 0 09-18-2013 02:11 PM
Is it possible to make a Linux From Scratch distro on a raspberry pi Gu7g34r Linux From Scratch 9 12-13-2012 07:30 PM
LXer: Raspbian The best optimized distro for Raspberry Pi LXer Syndicated Linux News 0 07-20-2012 03:00 AM
Problem running fsck on LVM Magmagal Fedora 3 05-19-2008 04:21 AM


All times are GMT -5. The time now is 09:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration