2

I'm using a RPi3 with Raspbian Stretch and I have problems with corrupt file system. I use the Raspberry in a system where a "clean shutdown" is not possible. So I want to run fsck on boot. I have added the following in the /boot/cmdline.txt (I'm surprised that the file is empty after new Raspbian installation, so only the following parameters are added)

fsck.mode=force fsck.repair=yes

But when I restart the following error appears:

kernel panic-not syncing: VFS: unable to mount root fs on  unknown block(0,0)

How can I solve this problem? Or is there another way to automatically repair the file system when booting?

I used the Raspberry Pi 2 for a long time. Here I never had a problem with a corrupt file system. Is that a specialty of the Raspberry Pi 3?

Raspi User
  • 21
  • 1
  • 3

1 Answers1

4

Raspbian is a derivate of Debian and this isn't designed to work without a clean shutdown by default. May work with journaling on the root partition with ext4 file system but it is only designed for disaster recovery one time. The boot partition has a simple vfat file system and do not have disaster recovery so it may be easy corrupted. Using it for years is your risk. We cannot help you to harden Raspbian for unclean shutdown. It isn't for this.

In a Raspbian image, e.g. Raspbian Stretch Lite 2018-03-13 the cmdline.txt has this contents:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=a8fe70f4-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh

Don't know why yours is empty. Maybe it is corrupted by unclean shutdown?

Ingo
  • 42,961
  • 20
  • 87
  • 207