A filesystem corruption bug breaks loose
A filesystem corruption bug breaks loose
Posted Dec 11, 2018 19:30 UTC (Tue) by zblaxell (subscriber, #26385)In reply to: A filesystem corruption bug breaks loose by ken
Parent article: A filesystem corruption bug breaks loose
I copied e2fsck into initramfs years ago. Also dropbear (to diagnose and repair the root filesystem remotely), mkfs and rsync (in case the diagnosis and repair does not end well, and a restore from backups over the network is required).
The old Unix way of running fsck on a live root filesystem so that it will be potentially modifying its own program text (or block maps thereof) was, at best, a workaround for not having a usable initramfs subsystem to run fsck from. That era ended 15 years ago on Linux, and even earlier on Solaris and other commercial Unixes.
I'm surprised Linux distros that boot with initramfs today still try to fsck after / is mounted.