Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

sd corruption
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
sd corruption
30th May, 2013, 05:37 AM
Post: #1
effemmeffe Offline
Registered
Posts: 127
Joined: Jan 2013
Reputation: 1
sd corruption
I recently bought a new sd 8G class 10 and installed on it the last xbian 5.
Today I checked dmesg and saw this:
Code:
[    2.285942] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
[    2.290153] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[   11.021491] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

How do I correct that?
I can't run fsck on mmcblk0p2 because there's / mounted on that.
I tried shutdown -rF now, but still got those message.
Find all posts by this user
Quote this message in a reply
30th May, 2013, 05:54 AM
Post: #2
Uncle_Tubbie Offline
Thankful
Posts: 46
Joined: Dec 2012
Reputation: 4
RE: sd corruption
This might help.

http://forum.xbian.org/thread-421.html?highlight=corruption
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 04:52 AM
Post: #3
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: sd corruption
(30th May, 2013 05:37 AM)effemmeffe Wrote:  How do I correct that?
I can't run fsck on mmcblk0p2 because there's / mounted on that.
I tried shutdown -rF now, but still got those message.

for ext4 active fsck partition needs to be unmounted.
in /boot/cmdline.txt change root=/dev/mmcblk0p2 to nonexistent device (root=/dev/mmcblk0p10). console=tty2 change to =tty1, remove "splash" and "quiet".

reboot.

during starting, rpi will complain about nonexistent root device and will drop you to shell.

in the shell do e2fsck -f /dev/mmcblk0p2.

when finished mount /dev/mmcblk0p1 /tmp. edit cmdline.txt and restore previous parameters (you can use "vi /tmp/cmdline.txt").

then umount /tmp, sync, reboot -f ...

mk

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 06:29 AM
Post: #4
effemmeffe Offline
Registered
Posts: 127
Joined: Jan 2013
Reputation: 1
RE: sd corruption
thanks.
two more questions:
can i ssh in the rpi after the non existent root device error?
and there is no way to have it done right after a reboot using shutdown -rF and having the troot partition enabled to fsck in fstab?

I'll answer myself to the first question: no, ssh is not running after reboot.
the rest worked as expected and i could correct some fs errors.
thanks.
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 07:15 AM
Post: #5
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: sd corruption
(2nd Jun, 2013 06:29 AM)effemmeffe Wrote:  and there is no way to have it done right after a reboot using shutdown -rF and having the troot partition enabled to fsck in fstab?

not for rootfs without initramfs taking care.

as soon as you run into init (starting runlevels and services) the rootfs is busy, unmountable and therefore unable to fsck with repair. this can work for non-rootfs partitions though.

it is indeed too much hassle with the sd card manipulation and cmdconfig.txt editing - that's why we added hot-key emergency drop down to initramfs console in beta1 (if you attach keyboard and holds left shift during startup, you get emergency console. after you do what's needed, you simply type exit and booting continues).

mk

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 07:20 AM
Post: #6
effemmeffe Offline
Registered
Posts: 127
Joined: Jan 2013
Reputation: 1
RE: sd corruption
(2nd Jun, 2013 07:15 AM)mk01 Wrote:  that's why we added hot-key emergency drop down to initramfs console in beta1 (if you attach keyboard and holds left shift during startup, you get emergency console. after you do what's needed, you simply type exit and booting continues).

well, that's new to me. and i think it's really great, i'll use it next time i'll have some fs problems.
thanks.
Find all posts by this user
Quote this message in a reply
5th Jun, 2013, 05:27 AM
Post: #7
effemmeffe Offline
Registered
Posts: 127
Joined: Jan 2013
Reputation: 1
RE: sd corruption
i tried and got no emergency console... the keyboard is working in xbmc, so i suppose it's recognized by the system.
Find all posts by this user
Quote this message in a reply
5th Jun, 2013, 07:09 AM
Post: #8
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: sd corruption
it's beta1 feature. or get initramfs package from git and install before.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
5th Jun, 2013, 06:11 PM
Post: #9
effemmeffe Offline
Registered
Posts: 127
Joined: Jan 2013
Reputation: 1
RE: sd corruption
Can I update to beta 1? Is there an how to?
Thanks.
Find all posts by this user
Quote this message in a reply
6th Jun, 2013, 03:05 AM
Post: #10
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: sd corruption
what is size of your SD and how much you have free ?

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
6th Jun, 2013, 06:03 PM
Post: #11
effemmeffe Offline
Registered
Posts: 127
Joined: Jan 2013
Reputation: 1
RE: sd corruption
the sd is 8 gb and it has nearly 7 gb free
Find all posts by this user
Quote this message in a reply
7th Jun, 2013, 04:19 AM
Post: #12
raspberry_pd Offline
Registered
Posts: 97
Joined: Dec 2012
Reputation: 6
RE: sd corruption
I'm also very interested in this option. Since the Raspi has no power button, and XBMC crashes too often, file system corruption can't be a surprise, can it?

So all I need to do is plug a keyboard in, reboot with the left shift key down, then?
Find all posts by this user
Quote this message in a reply
8th Jun, 2013, 11:34 PM
Post: #13
effemmeffe Offline
Registered
Posts: 127
Joined: Jan 2013
Reputation: 1
RE: sd corruption
(7th Jun, 2013 04:19 AM)raspberry_pd Wrote:  So all I need to do is plug a keyboard in, reboot with the left shift key down, then?

at the moment you can't, it's a feature in the future version of xbian.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 12th May, 2025, 09:48 PM Powered By MyBB, © 2002-2025 MyBB Group.