1

I am getting an error with my Raspberry Pi on boot:

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

I have been trying to follow this answer: Kernel panic-not syncing: VFS: unable to mount root fs on unknown- block(179,6) running Raspbian on top of NOOBS

But I cannot get my Raspberry Pi into recovery mode - I have tried holding shift down the whole time, holding it down after the RGB splash screen, repeatedly pressing shift, etc and nothing works.

I then tried to follow these instructions on the NOOBS GitHub page: https://github.com/raspberrypi/noobs/blob/master/README.md#how-to-force-recovery-mode-being-entered-on-boot-overrides-gpio-or-keyboard-input

This says to append forcetrigger to the recovery.cmdline file.

I have put my SD card into my Mac and can access a small number of files in what I believe is the boot volume. There is no recovery.cmdline but there is a cmdline.txt - however, any changes to this file are lost when I remove the SD card.

I then followed the instructions on https://www.jeffgeerling.com/blog/2017/mount-raspberry-pi-sd-card-on-mac-read-only-osxfuse-and-ext4fuse to properly mount the SD card but I cannot find any file called recovery.cmdline.

The boot directory is empty and the root directory only had some .cache and .profile files.

Please help. I don't know how to fix this issue and I really do not want to have to reformat my SD card and start over again.

user2397282
  • 119
  • 1
  • 2
  • "I really do not want to have to reformat my SD card" I understand if you have a lot of work that you don't want to lose, but otherwise why not, as you could correct the issue of having NOOBS on it. – Glen Yates Nov 20 '19 at 21:18

3 Answers3

1

any changes to this file are lost when I remove the SD card

This may be a sign of your SD card reaching end of life. Well-behaved cards become read-only when this happens, so that you can recover the data that's already on them, instead of trashing that data with failed write operations.

If you are absolutely positive you can't write to the SD card any more, it's time to get a new one.

Dmitry Grigoryev
  • 26,688
  • 4
  • 44
  • 133
0

Most of the experienced users on this side DO NOT USE NOOBS

I have used PINN (which is similar, but more efficient and flexible).

Holding shift down will do nothing PINN/NOOBS only looks for the shift key during a narrow window (after the on screen message is displayed). Repeatedly pressing it often works.

HOWEVER this appears unlikely to work in your case. Partition 2 is either an extended partition or the NOOBS recovery partition, and if this can't be mounted recovery won't work.

Incidentally you can see the structure of the SD Card on macOS with diskutil list.

NOTE most of the instructions you have read DO NOT APPLY to NOOBS - they are for Raspbian. The NOOBS boot partition does not even have a cmdline.txt

recovery.cmdline should be in the FAT partition of the SD Card - which is visible, by default, on macOS - no software required.

I suggest you do a fresh install of Raspbian on a new SD Card, and you can then mount the old card on your Pi and recover your files.

Milliways
  • 54,718
  • 26
  • 92
  • 182
  • (179,2) means it's plain Raspbian not NOOBS. So the OP clearly doesn't know what's been installed. – Dougie Nov 21 '19 at 06:16
  • I believe I have Raspbian installed but all the answers I could find on my error included NOOBS so i just assumed that was what I was looking for – user2397282 Nov 21 '19 at 07:51
0

This has been confusing and difficult, but I found a solution for mine..

I have a logitech keyboard and mouse, and I found if i moved the mouse while holding the shift key got me in. Hope this helps someone else.

thphoenix
  • 101
  • 1