Forum

Full Version: sd corruption
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
(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
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.
(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
(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.
i tried and got no emergency console... the keyboard is working in xbmc, so i suppose it's recognized by the system.
it's beta1 feature. or get initramfs package from git and install before.
Can I update to beta 1? Is there an how to?
Thanks.
what is size of your SD and how much you have free ?
the sd is 8 gb and it has nearly 7 gb free
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?
(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.
Reference URL's