0

I got a RPi4 with an external hard drive, it had a kernel panic

---[ end Kernel panic - not syncing: Attempted to kill init!

I pulled the plug on it and on restart I'm getting a bunch of filesystem errors:

EXT4-fs error (device sda1) in ext4_free_inode:363: Corrupt filesystem

I tried to force an fsck on reboot by:

  • sudo touch /forcefsck
  • add fsck.mode=force to /boot/cmdline.txt
  • reboot --reboot

But the check completed and the error appeared again.

  • Is SMART happy with the disk? – roaima 2 days ago
  • I didn't have smartctl in my path, chose not to install new things while trying to figure this out. – givanse yesterday
0

After forcing a fsck on boot, I found in /var/log/syslog this message:

EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended

So I unmounted the drive and executed:

e2fsck -y /dev/sda1
reboot --reboot

That was enough to fix it.

| improve this answer | |
  • Good to hear you cracked it, but doesn't your question say that you'd already executed a filesystem check and it didn't fix it? Curious. – roaima yesterday
  • The initial filesystem check forced a fsck run and later I did an e2fsck, those two do different things I assume. – givanse 19 hours ago
  • 1
    Same thing. fsck is the generic interface and it will call e2fsck for an extN filesystem – roaima 19 hours ago

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.