Raspbi
Posts: 11
Joined: Mon Oct 30, 2017 9:04 pm

Kernel panic: Unable to mount root fs on unknown-block(179,7)

Wed Sep 04, 2019 9:18 pm

Hello,
I have a minor problem with my Pi 3 Model B.
I have already written this in the German part, but unfortunately nobody can help me there. So now I'm hoping someone here has any solution for me.-
I wanted to update TeamViewer-Host to the latest version, because I got a message about an outdated version.
So I ran sudo apt-get update and sudo apt-get upgrade. Unfortunately TeamViewer was never updated because (as I found out later) TV 14 requires Debian 9. But on my Pi 3 Debian 8 is still installed. Apart from some sudo apt-get updates and sudo apt update/upgrade and dist-upgrade nothing else was actually done. Since then my mysql server didn't work anymore and the phpmyadmin web interface wasn't available anymore. The Pi was still controllable via TV and SSH accesses worked normally.
So I just restarted the Pi, hoping that the SQL Server would work again. Unfortunately the complete Pi doesn't work anymore. When booting I get a lot of fast running messages, which I unfortunately can't read, then it stops at

Code: Select all

--- [ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,7)
and it won't boot further.
I tried some internet solutions and plugged the micro sd card into my laptop running cinnamon.
Using the laptop, the SD card appears to contain three file systems/folders:
root,boot and SETTINGS.
boot and settings are easy to mount and data can be read.
root does not mount, however. Here I get the error message:

Code: Select all

Error mounting /dev/mmcblk0p7 [...] exited with non-zero exit status 32: mount: /dev/mmcblk0p7: can't read superblock
So I created a backup as .iso using dd. (Margin note: A first attempt to open the .iso with the archive management results in a fatal error)
Some suggest trying to mount the card using different superblocks. However, in my case, this leads to

Code: Select all

wrong fs type, bad option, bad superblock on /dev/mmcblk0p7, [...]
.
Trying to restore the superblock backup using

Code: Select all

sudo fsck.ext4 -v /dev/mmcblk0p7
results in

Code: Select all

The bit switch "needs_recovery" in the superblock is not set, but the journal contains data.
Start Journal anyway? y
and
fsck.ext4: Superblock flags could not be set to root
Right now, I just want to recover my data especially some of my python scripts for which I unfortunately do not have a backup.
Can please someone help me?

Andyroo

Re: Kernel panic: Unable to mount root fs on unknown-block(179,7)

Wed Sep 04, 2019 10:18 pm

Can you drop your copy onto a new SD card and run the check on that one?

This old post https://unix.stackexchange.com/question ... lock-flags infers that the card has gone into 'read only' mode and though its processing the journal it cannot update the flag to say its OK.

You may have to try a couple of cards - some SD cards are slightly smaller than others and this can break dd copies. Not sure what would happen if you tried a larger card size (e.g. 16Gb from 8Gb dd output) though.

Raspbi
Posts: 11
Joined: Mon Oct 30, 2017 9:04 pm

Re: Kernel panic: Unable to mount root fs on unknown-block(179,7)

Thu Sep 05, 2019 10:31 pm

Hi,
thanks for your reply. I created a new .img backup and copied this backup to my 32 gb SD card. So double the size of the original sd card. Worked nearly perfect. Pi boots normally and all seems fine except for my TeamViewer access. Somehow I cannot use Teamviewer to access my pi as i keep receiving an error "Reason unknown".
Trying to reinstall TV host 13 (and even 12) does not work as I keep receiving multiple errors saying tv depends on libqt5qml5 and so on.
sudo apt-get -f install just removes tv again.
Maybe you can help me with that?

Return to “Troubleshooting”