1

I'm using raspberry pi model B.i have write the raspberry-stretch 2017 image to sd card. but when i put it on my pi, pi show the following error

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

I did not find any solution to this problem and im stuck on that. what are the root causes of this problem

1

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

This indicates that the kernel hasn't found a viable root filesystem on the second partition.

You could have a look at what is on the card, but you need a system that can read the linux native ext4 filesystem, which e.g. MS Windows does not.

The implication is that the card was not created correctly. There are various complicated ways recommended to do it; the most foolproof is probably via dd if you have a linux system:

sudo dd if=raspbian-stretch.img of=/dev/sdb bs=4M status=progress

This has never failed for me and I have created a lot of SD cards for all models of Pi. The most significant pitfall here is the difference between /dev/sdb and /dev/sdb1. Obviously this may not be the same base device (sdb) for you, but it's the partition number (1) that trips some people up. You don't want that, you want just sdb.

You can do a rough check via:

sudo fdisk -l /dev/sdb

Again, no number on the end. This should show the two partitions, the first one of which is type WIN95 FAT32 (LBA) and the second Linux. This doesn't guarantee the card is okay, but it is a good sign. You can also use sudo fdisk -l if you aren't sure if sdb or sdc or whatever is the card, since regardless of what filesystems are or aren't on it, the first line will tell you how big the device is in GB. Unless you have a lot of USB drives sticking out of your machine, the card is probably the only thing that is ~8 or 16 GB or whatever size it is.

  • when I imaged the card, system created two partitions of it one named as boot which is in 40-50 MB and other partition which does not open on the windows or Ubuntu. Does it imaged correctly or it might have the sd card issue? – Awais Ahmed Nov 15 '17 at 20:24
  • If it doesn't open in Ubuntu something is wrong with it, which sort of confirms that the card wasn't created properly. Since you have a linux box, I've added some stuff above about how to create it properly. – goldilocks Nov 15 '17 at 20:42
  • it worked by replacing the SD card . my card was corrupted :) thanks – Awais Ahmed Nov 15 '17 at 22:09
0

The second partition has a different data type after the imaging process. Windows will try to format it to fat32 in order to write on it and zuse it as an usual storage device. You need to cancel that, as the data type is necessary, so the sd card can be used as a booting device.

Sry for my English, not native speaker.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.