Linux EXT-4 File System Corruption & Attempted Recovery There’s a file system corruption bug related to EXT-4 in Linux, and it happened to me a few times in Ubuntu 18.04. You are using your computer normally, then suddenly you can’t write anything to the drive, as the root partition has switched to read-only. Why? Here are some error messages:
1 2 3 4 |
[15882.773747] EXT4-fs (dm-4): re-mounted. Opts: (null) [15898.557605] EXT4-fs error (device dm-4): ext4_iget:4831: inode #2113041: comm rm: bad extra_isize 20100 (inode size 256) [15898.568305] EXT4-fs error (device dm-4): ext4_iget:4831: inode #2113042: comm rm: bad extra_isize 35148 (inode size 256) [15898.569774] EXT4-fs error (device dm-4): ext4_lookup:1577: inode #2557277: comm rm: deleted inode referenced: 2113043 |
What then happens is that you restart your PC, and get to the command where you are asked to run:
1 |
esfsck /dev/sda2 |
Change /dev/sda2 to whatever your drive is, and manually review errors. You can take note of the file modified, as you’ll likely have to fix your Ubuntu installation later on. Usually the fix consists of various package re-installations:
1 |
sudo apt install --resintall <package-name> |
It happened to me two or three times in the past, and it’s a pain, but I eventually recovered. But this time, I was not so lucky. The system would […]