Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Reload NOOBS if screen freezes/ kernel panic /5"LCD[SOLVED?]

Fri Oct 16, 2015 2:56 pm

So I'm totally a beginner - You have been warned.

I just received my pi. Trying to install the OS and have done so several times with no problems. My next feat has been to get this 5 inch touch screen to work. I can make the changes in config.txt to display correctly but once I go through the last step of making the touch work, it reboots and freezes at something saying [ 2.869223] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) and I can't do anything but power off. I get the same thing once powered on and holding down shift doesn't do anything at boot.

My questions is: Is there any better way to do some kind of recover from here? The only thing I know to do is reformat (completely), reload noobs and reinstall the OS. Like I said, I've done this many times and it's very time consuming so I was curious if there was any shortcut.

Thanks a ton!
Last edited by Brybrew on Tue Oct 20, 2015 4:09 pm, edited 2 times in total.

User avatar
DougieLawson
Posts: 30430
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 3:11 pm

What screen are you trying to use?
Does the RPi boot NOOBS/Raspbian normally if you remove the screen and connect it up to a HDMI TV?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 3:29 pm

DougieLawson wrote:What screen are you trying to use?
Does the RPi boot NOOBS/Raspbian normally if you remove the screen and connect it up to a HDMI TV?
Trying to use the Waveshare 5 inch HDMI LCD.

It works fine once I adjust the resolution in the config-txt. The problem is the touch doesn't work and when I try to install that component something goes awry. Once this happens it doesn't boot to the GUI of any interface at all and just freezes. Doesn't matter what screen I'm using.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 3:55 pm

I can't figure out how to upload pictures of the screen but here are the last few lines:

[ 2.859097] [<80014a74>] (secondary_start_kernel) from [<000086a4>] (ox86a4)
[ 2.869223] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
_



And it goes no further...

User avatar
DougieLawson
Posts: 30430
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 4:10 pm

That kernel panic means you need to fsck your root filesystem on /dev/mmcblk0p2 before your system will restart normally.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 4:32 pm

DougieLawson wrote:That kernel panic means you need to fsck your root filesystem on /dev/mmcblk0p2 before your system will restart normally.
Oh man, I really don't know what that means? Any further direction would be much appreciated. fsck? Sounds close to what I was thinking.

User avatar
DougieLawson
Posts: 30430
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 7:23 pm

You've either got to pull the card and FileSystem ChecK (fsck) it using another Linux system or you've got to use "single user mode" on your RPi by remounting the borked file system as read-only (mount / -o remount,ro) then fsck -f -y /dev/mmcblk0p2.

The first method is easier but needs another SDCard and a USB SDCard reader.
The second method may not work if the filesystem is 100% FUBAR'd.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 8:38 pm

I have another SD card and reader. Would I have to download some Linux emulator for my Mac to do this?

User avatar
fruitoftheloom
Posts: 15047
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 8:49 pm

Brybrew wrote:I have another SD card and reader. Would I have to download some Linux emulator for my Mac to do this?
fsck is included in OSX
My only "PC" is an Asus ChromeBit running ChromeOS, cloudcentric at its best !
Rockchip Quad-Core RK3288C SoC as used in ASUS Chromebook C201 & Chromebook Flip C100PA as well as the Tinker SBC.
3 Mobile Huawei E5330 Mobile Mi-Fi

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 8:58 pm

fruitoftheloom wrote:
Brybrew wrote:I have another SD card and reader. Would I have to download some Linux emulator for my Mac to do this?
fsck is included in OSX
I'm terribly sorry but if you could walk me through it I'd be so grateful. I have Terminal on my mac. I can run diskutil list and see where the SD card is but from there I am lost. I bought a new SD card and new power supply and tried everything again and am stuck at the same spot so now I have the card out of the RPi and stuck in my computer.

User avatar
DougieLawson
Posts: 30430
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 9:23 pm

Get a new SDCard, build a copy of Raspbian on it and you have a Linux system that can be used to rescue the borked system.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Fri Oct 16, 2015 9:50 pm

DougieLawson wrote:Get a new SDCard, build a copy of Raspbian on it and you have a Linux system that can be used to rescue the borked system.
You're saying just put Raspbian on a new SD card and insert that into the RPi and run the OS.
Then add my messed up OS/SD card into a usb adapter and put into the RPi and access it that way?
Do you do that through the terminal?

I'm sure this is quite annoying for you to have to type out a cookbook-style instructions for me to try and fix my problem so if there is another resource you can point me to if you don't have the time I'd appreciate it.

Currently both of my SD cards won't boot so I erased one of them and reinstalled NOOBS and will boot that one up and reinstall. From there I assume I just enter the USB/SD of messed up OS. Then go to terminal thing and...

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Sat Oct 17, 2015 1:49 am

Currently I have Raspian running on my RPi from newly formated SD card. I also have the SD card that supposedly has errors on it in a USB adapter plugged into the RPi. I changed the directory to the 'media' USB and now not sure what to do.

I tried sudo fsck /dev/mmcblk0p2 and it said "could this be a zero-length partition" and didn't really do much.

?

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Sat Oct 17, 2015 2:39 am

OSX may have fsck (it does), but I doubt it has a handler for ext4 (Linux) filesystem(s) (it doesn't).
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Sat Oct 17, 2015 2:49 am

Joe Schmoe wrote:OSX may have fsck (it does), but I doubt it has a handler for ext4 (Linux) filesystem(s) (it doesn't).
Haha! Yup. Figured that out.

User avatar
DougieLawson
Posts: 30430
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Reload NOOBS if screen freezes? Shorcut?

Sat Oct 17, 2015 7:51 am

Using one Raspbian system to recover another system on a borked SDCard is trivial. You can do it through the GUI but doing I find doing stuff is easier from a root command line (sudo -i) without any stinking GUI in my way.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 2:10 am

Hello,

I've been at it for a bit and still haven't had much luck. I'm finally tied in via Terminal/SSH and have the RPi working good.

I'm trying to repair whatever error is causing my other card to hangup on the startup with the "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)" error. The bummed SD card is plugged into the RPi via USB adapter. Below is what I have tried.

pi@raspberrypi /media $ fsck -f -y /dev/mmcblk0p2 (I changed location via cd /media since that is the USB location)
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext2: Permission denied while trying to open /dev/mmcblk0p2
You must have r/w access to the filesystem or be root

pi@raspberrypi ~ $ fsck -f -y /dev/mmcblk0p2 (tried it without the cd /media, figure that isn't looking in correct area?)
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext2: Permission denied while trying to open /dev/mmcblk0p2
You must have r/w access to the filesystem or be root

pi@raspberrypi ~ $ sudo fsck -f -y /dev/mmcblk0p2
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/mmcblk0p2
Could this be a zero-length partition?

pi@raspberrypi ~ $ cd /media
pi@raspberrypi /media $ sudo fsck /dev/mmcblk0p2
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/mmcblk0p2
Could this be a zero-length partition?

So, as you can see, I don't know what I'm doing really and can't get the fsck to run on my messed up SD card. I do think that through all these hours of beating my head on the computer I have learned a few things. I actually have the other card running everything really good and the screen looks great but the touch isn't working and I'd really like to try to get that going and learn something in the process. Any more advice you can provide on trying to get this other card to load?

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 2:12 am

and then I tried this.

root@raspberrypi:~# fsck -f -y /dev/mmcblk0p2
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/mmcblk0p2
Could this be a zero-length partition?

User avatar
DougieLawson
Posts: 30430
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 7:53 am

Try this
sudo fsck -f -y /dev/sda2
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 2:46 pm

I did that and this was the response.

pi@raspberrypi ~ $ sudo fsck -f -y /dev/sda2
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Could this be a zero-length partition?

Do I need to change directory to the 'media' location to work with the SD card?

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 2:48 pm

I actually tried this too.

pi@raspberrypi /media $ sudo fsck -f -y /dev/sda2
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Could this be a zero-length partition?

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 4:32 pm

Even a Blind Pig Finds a Truffle Once in a While... Think this will work or did I just start a bunch of other problems? So far it appears its all working.

I just copied the cmdline.txt file from the good SD card and replaced the cmdline.txt file on the bad card and it booted up fine. So far I can't find any problems but will report back if I do. I am skeptical that this worked without messing something else up but holy cow, the touch screen is working now too.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 5:51 pm

You need to run a "diff" between the old and new files (i.e., the one that was there before and didn't work vs. the one that is there now which works) and post the results here.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Mon Oct 19, 2015 7:12 pm

I screwed the pooch on this one. I accidentally deleted the one that wasn't working. I feel confident I can repeat the error though and post the results. The cmdline.txt that works is as follows:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait


I'll clear another card and repeat the steps that created the error and post the cmdline.txt from that card as soon as I can.

Brybrew
Posts: 21
Joined: Thu Oct 15, 2015 10:48 pm

Re: Reload NOOBS if screen freezes? Shorcut?

Tue Oct 20, 2015 4:06 pm

Okay, here is the "fix" that I came across. To recap, it was a new RPi. Newly installed OS via NOOBS download. Everything worked fine. Tried to install a Waveshare 5inch touch LCD. Followed the instructions online, from the included CD and from Youtube Video. After I installed the software to activate the touch it would no longer boot. Got stuck at a cursor giving the kernel panic error (Kernel panic-not syncing: VFS: unable to mount root from unknown-block(179,2)). I reloaded NOOBS on to another SD card and reinstalled on the RPi and left it working. I then ejected the working SD card and put it into my mac. Under the "boot" folder, I located the cmdline.txt file and copied its contents. I then entered the non-working SD card and located its cmdline.txt file and replaced its info with that of the working cmdline.txt. Reinserted the originally-non-working SD card and it fired up without problems and the touch screen now works. Not smart enough to explain why this worked. It was literally just hours of trying things.

Here is the NON-WORKING cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

I replaced it with the originally working cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait

If anyone can explain this I (and I'm sure others) would be grateful. I've seen numerous posts about people struggling with getting this screen installed correctly.

THANKS ALL

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 56 guests