I recently started getting this error during bootup on an SD Card with Raspbian Stretch-Lite:

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

I looked around online for similar errors and two methods were suggested to try and fix this -

  1. Plug in the SD card as an external into another linux computer and run fsck on it: When I do this, it tells me there's a dirty bit, and I go through the prompts to fix the dirty bit. But the problem persists when I boot and every time I reboot and do fsck, the dirty bit reappears.

  2. Change cmdline.txt to set root=/dev/mmcblk0p6. When I do this, the unknown block simply changes to (179,6). For now, I've set root=/dev/mmcblk0p2.

Does anyone have any further ideas that I could try? I have data on this SD card and I can't seem to see the data partition whenever I mount the card - I can only see the boot partition.

Thank you for your help.

  • Do you have another SDCard that you can boot your RPi with? Or do you have another Linux system? Your /dev/mmcblk0p2 filesystem is broken and needs sudo fsck -f -y /dev/xxxx run against it. Easiest is to do that with the SDCard in a USB reader on your Raspberry (booted from another working SDCard).
    – Dougie
    Commented Jul 27, 2019 at 13:45

2 Answers 2


unknown-block(179,2) means the error is on block device 179 on partition 2.

Randomly changing partitions is futile; for normal Raspbian the root is on partition 2.

If you insert the SD Card in a Linux computer you should be able to mount the partition (in Read Only mode) and read your files. The computer can actually be a Pi with a working SD Card.

If it is unreadable and cannot be fixed by fsck your only option is to restore from your backup.

The SD Card is probably faulty or worn out.

  • Thanks. Yeah I've tried mounting it on another linux computer (both a laptop and a Raspberry Pi with a working SD card), I only see the boot partition get mounted but not the one with the data on it. Commented Jul 27, 2019 at 6:26
  • @SiddharthKrishnamoorthy Partitions on the SD Card, attached with a card reader to a Linux computer, will not be mounted automatically. Look with lsblk what block devices do you have. You should find the SD Card, attached to a RasPi usually as /dev/sda with partitions /dev/sda1 (boot) and /dev/sda2 (root). Mount the root partition with sudo mount /dev/sda2 /mnt and copy from /mnt/.
    – Ingo
    Commented Jul 27, 2019 at 11:34

Thank you all. Update on this - I had been running fsck on /dev/sda1 and I'd constantly get the dirty bit error. When I put the card on an ubuntu computer and ran fsck on /dev/sda2 I got a few more errors (I didn't record the errors) but it ended up mounting the data partition in read only mode. I copied out all the data, some files were corrupted, as expected, but I got back most of the data. Following that i just formatted the card and put in a fresh install of Raspbian.

  • And now it's working? B.t.w. the dirty bit is always set if you write to a file system (means first write to buffers, not the SD Card) and reset if it is synced (means writing buffers to the SD Card). So every time you get the error message "not syncing" the dirty bit ins't reset.
    – Ingo
    Commented Jul 30, 2019 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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