Kernel panic - VFS Unable to mount root fs on unknown block (179,2)

Hi folks,

after a lot of research and of trying a lot of things, I come here for help as I get the following.

My raspberry pi 2 with OSMC alpha 4 was working great (along with owncloud) but I had a power cut and from now on, it won’t boot anymore.

Here’s my config

arm_freq=850
core_freq=375
gpu_mem_256=112
gpu_mem_512=144
hdmi_ignore_cec_init=1
disable_overscan=1
start_x=1

And my cmdline.txt

root=/dev/mmcblk0p2 rootfstype=ext4 quiet rootwait osmcdev=rbp splash=/sbin/splash_early

I tried to change mmcblk0p2 by mmcblk0p6 and to add sincle or init at the en of the cmdline.txt but nothing worked.

Hope someone here can help me get out of this mess without having to reinstall everything !

Thanks

And by the way I enabled airplay through the media center interface yesterday, don’t know it it helps

Seems like your filesystem is corrupted. Try plugging it in to a Linux computer and running fsck.ext4 /dev/sdb (assuming sdb is your device letter)

Sam

I and thanks,

I’m on a mac, is there any way to do it from there ?

I think I ran into the same issue.

I was trying to install some software when it “Failed to execute operation”:

After that the Raspi was no longer responding. So I decided to switch it off and on when it paniced:

I followed @sam_nazarko advise and did a filesystem check which said the following:

root@kali:~# fsck.ext4 /dev/sdc
e2fsck 1.42.5 (29-Jul-2012)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks…
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdc

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193

So, is there any option to repair the filesystem or is the sd card simply broken (which would be interessing, I’ve flashed the card only 3-4 times in total and didnt do much operations)?

PS:

I’m on a mac, is there any way to do it from there ?

I dont think so, Windows and Macs do not support ext-filesystems.

@martinratinaud I think I’ve got it back to work using this HowTo: HOWTO: Repair a broken Ext4 Superblock in Ubuntu | Linux Expresso

And, maybe you can follow this guide until step 5. to use a Ubuntu LiveCd for this: How to install Ubuntu on MacBook using live CD - Community Help Wiki

Thanks @sonstwas for the help.

Running on a Mac, I recommend creating an Ubuntu VM in virtualbox. I used a Vagrant Box :laughing: to speed up the process.

Then follow the instructions in Mount SD card in VirtualBox from Mac OS X Host | Geeky Tidbits to mount the SDcard in the VM.

After that, identify the SDcard with the command sudo fdisk -l(probably it will be /dev/sdb).

And finally:
sudo fsck.ext4 /dev/sdb or sudo fsck.ext4 /dev/sdb2.

I had to run the sudo fsck.ext4 /dev/sdb2 two or three times to fix all the SD errors.

Poweroff the VM, unmount the disk in the MacOS and you’re good to go.

I worked for me.