Yesterday evening I was surprised to discover that my Astroberry Pi4 wouldn’t connect to the wifi or wired network anymore. This morning I finally managed to connect it to a monitor and the wonderful message Kernel Panic: VFS : Unable to mount root fs on unknown-block (179,2) appeared while booting. It appears a corrupt filesystem causes this and the boot partition (/dev/sdb1) cannot access partition 2 (data – found in /dev/sdb2). In my case, the cause could be the frequent power outages we experience here. After a few hours of searching for solutions that did not involve formatting and losing my data, I came across this simple trick that requires access to a Linux machine. On my Windows machine, I have an Oracle VM Virtual Box running an older Ubuntu on it. Then I used fsck and e2fsck to fix by sdb1 (boot) and sdb2 (data) partitions on the microSD. Here are my details and steps:
microSD card: SanDisk Extreme 256GB
OS: Astroberry 2.0.4.
Steps to fix the error and proceed to normal boot:
- Start Linux (I started a VM running Ubuntu on Virtual Box).
- Insert microSD (directly or through an SD adapter) into the PC running Linux.
- Run
sudo fdisk -l
to list all mounted disks. - You should see /dev/sdb1 appear. This is the boot partition on your microSD card. If /dev/sdb2 does not show up mount it using
mount /dev/sdb2
. - Running again
sudo fdisk -l
will display all mounted drives now:

- Both partitions (sdb1 and sdb2) must be fixed. For this first unmount the partitions using
sudo umount /dev/sdb1
followed bysudo umount /dev/sdb2
. /dev/sdb1 is fixed using fsck while sdb2 is fixed using e2fsck (as it is ext4). Run the following commands in order and answer yes to all questions:sudo fsck -f -v /dev/sdb1
followed bysudo e2fsck -f -v /dev/sdb2
. In my case, the issues were with the sdb2 partition as it contained lost inodes as well as free inods count wrong for certain groups. - Finally, take out the microSD card from the Linux machine and plug it back into the Pi4. Boot the device and the Astroberry will start without any issues.
Some posts suggested updating the cmdline.txt file on the boot partition. You can access it once Windows detects the microSD card and opens its contents in explorer. In my case this was unnecessary. The above steps solved the issue.