Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel panic-not syncing: VFS: unable to mount root fs on unknown- block(179,2) running Raspbian on top of NOOBS #60

Open
PagesByZ opened this issue Jan 13, 2018 · 38 comments

Comments

@PagesByZ
Copy link

PagesByZ commented Jan 13, 2018

I already have Raspbian through NOOBS installed and whenever I install the LCD-show driver, i get the following error during reboot after installation:

 `Kernel panic-not syncing: VFS: unable to mount root fs on unknown- block(179,2)`

Any idea what is the issue and how I can fix it? I already have Raspbian OS 2017-11-29 version of NOOBS.

@lavolp3
Copy link

lavolp3 commented Jan 13, 2018 via email

@nikomaresco
Copy link

thanks @lavolp3, this fixed the issue for me!

@Dj-Ale-426
Copy link

Hi i am new to raspberry pi. I am wondering where do you find cmdline.txt in the files

@Dj-Ale-426
Copy link

@lavolp3 i just found the cmdline.txt but there is no rootfs and mmcblk0px

@lavolp3
Copy link

lavolp3 commented Feb 2, 2018

The cmdline.txt is in the boot directory and can also be editet in Windows (using notepad or notepad++)
What do you find in there. Can you paste it.

Another way around this issue would be to setup the system again from scratch and use my fork here.
I have included a NOOBS case creating the right cmdline.txt and avoiding the kernel panic

@Dj-Ale-426
Copy link

@lavolp3 thanks for helping me

@dotps1
Copy link

dotps1 commented Feb 3, 2018

@lavolp3 I see you have a lot of code commented out at the bottom of https://github.com/lavolp3/LCD-show/blob/master/LCD35-show, can it be used if I use your repo rather then this one?

@lavolp3
Copy link

lavolp3 commented Feb 3, 2018 via email

@lavolp3
Copy link

lavolp3 commented Feb 3, 2018

@dotps1 The code works on my Pis as it is.

@Dj-Ale-426
Copy link

@lavolop3 yes I can paste in code. If it is not a bother can you type how the cmdline.txt is supposed to look so I can paste it in.

@Dj-Ale-426
Copy link

@ lavolp3 yes I can paste in code. But if it is not bother can you type how the codling.txt is supposed to look like.

@lavolp3
Copy link

lavolp3 commented Feb 10, 2018

@Dj-Ale-426
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

Basically the same cmdline.txt as in this git but for noobs you need mmcblk0p7 to be the root partition instead of mmcblk0p2

@Dj-Ale-426
Copy link

@lavolp3 the thing is I tried your git but it just displayed kernel panic not syncing

@lavolp3
Copy link

lavolp3 commented Feb 28, 2018

@Dj-Ale-426 Sorry for the long silence.
Please, point out, what exactly you did:
Which Raspbian did you use (jessie, strech? lite or full?)?
What did you do to install the display? Step-by-step please.

@Dj-Ale-426
Copy link

Hi sorry I had noobs installed so I quickly fiqured ou the problem. Thanks for your concern. Also is it okay if I use the lite version of raspian

@Dj-Ale-426
Copy link

Also for noobs can you just adjust the cmdline.txt

@crashflow
Copy link

This fixed it for me. Try this first.

@dotps1
Copy link

dotps1 commented Mar 18, 2018

I feel like this needs to be posted:

dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

this fixes your noob install. and why is there 52 issues for a driver for a device I can buy on amazon. maybe fix this?

@Dj-Ale-426
Copy link

@dotps1 will this work for noobs lite too.

@antonisss
Copy link

Hello!!! I am new to raspberry. I have the same problem Kernel Panic: VFS : Unable to mount root fs on unknown-block 179,2 but when i open the cmdline.txt didnt find any mmcblk0p7 in there. Please help !!!

@lavolp3
Copy link

lavolp3 commented May 9, 2019

can you post your cmdline.txt here?

@NedAckland
Copy link

i have a very similar problem;
cmdline.txt - dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=43c1e3bb-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles

version - April 2019 -Raspbian Stretch with desktop and recommended software
kenel version - 4.14

first time using a raspberry pi, using b3+, didn't want to get noobs because of the size.

@lavolp3
Copy link

lavolp3 commented May 9, 2019 via email

@antonisss
Copy link

no i am not booting from external device

@NedAckland
Copy link

booting from the pi

@lavolp3
Copy link

lavolp3 commented May 9, 2019

Well I don't know where it is from but the root=PARTUUID hints to a boot from an external partition.
For sure it is the reason why the pi won't boot. Google it. My suggestion : overwrite the /boot /cmdline.txt with the one from this repository /usr/cmdline.txt.
Make a backup of the original one first. Boot and see what happens. If it boots consider running the LCD-show script again.

@NedAckland
Copy link

thank you, will try this

@antonisss
Copy link

will try

@DUANBEN
Copy link

DUANBEN commented May 19, 2019

@NedAckland hi, i have the same problem as you, have you sovled this trouble?

@NedAckland
Copy link

NedAckland commented May 19, 2019 via email

@DUANBEN
Copy link

DUANBEN commented May 20, 2019

i tried it this way, but it didn't work for me....

thank you anyway :)

@rprior04938
Copy link

I had the same problem and managed to fix it. I want to explain the situation and the fix. The situation occurs because of the interaction of Noobs and The LCD-show scripts. The problem is the SD card partitions which are set up by Noobs versus those set up if you put Raspbian onto an SD card without Noobs. The basic setup of operating systems disks (SD card or other) on the Raspberry Pi is to have 2 partitions - a boot partition and a root partition. If Raspbian is alone, the boot partition is partition 1 and the root partition is partition 2. With Noobs, the boot partition of the first-loaded operation system is #6 and the root partition is #7. The LCD-show scripts hard-code the root partition to be 2.
The fix to this problem is mostly explained above. You will need an operating computer OS and an SD card reader-writer. You can use the Pi itself if you have a 2nd SD card with a working Linux or Raspbian OS and a USB SD card reader. If you use OSX (for the Mac) or Linux, you can use it without extra software. If you use Windows, you'll need Cygwin or other software to read and write the non-Windows filesystem ext4.
You need to understand the partitioning scheme of the SD card. Typically, Noobs sets up 2 partitions per OS starting with partition6, and installs Raspbian onto partitions #6 (boot) and #7 (root). You will need to "mount" Raspbian boot partition using the CLI of Mac/Linux "mount" command and to use an editor such as nano to edit the single line of cmdline.txt, changing the "root=/dev/mmcblk0p2" to "root=/dev/mmcblk0p7", or other "mmcblk0px" where x is 1 more than the Raspbian boot partition.
Then umount the SD card, put it into the Pi, and reboot.

@varshan97
Copy link

hey i'm trying to install Kali in rasp pi Zero w, it's showing "end kernal panic not sync: VFS: unable to mount root fs on unknown-block(179,2)

@irfan12345678
Copy link

can you post your cmdline.txt here?

Hello sir I am new to raspberry. I have the same problem Kernel Panic: VFS : Unable to mount root fs on unknown-block 179,2 but when i open the cmdline.txt didnt find any mmcblk0p7 in there. Please help !!! please help me

@rprior04938
Copy link

rprior04938 commented May 18, 2020 via email

@jn7779
Copy link

jn7779 commented May 17, 2021

Kernel panic-not syncing: VFS: unable to mount root fs on unknown- block(179,2)
how can i fixed this error with my cmdline.txt?
console=serial0,115200 console=tty1 root=PARTUUID=566d1a16-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

@ChrBlad
Copy link

ChrBlad commented Dec 20, 2021

Kernel panic-not syncing: VFS: unable to mount root fs on unknown- block(179,2) how can i fixed this error with my cmdline.txt? console=serial0,115200 console=tty1 root=PARTUUID=566d1a16-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Did you find a solution?

@jn7779
Copy link

jn7779 commented Dec 20, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests