Kernel destroyed by e4defrag/fsck

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Acetone
Level 1
Level 1
Posts: 18
Joined: Tue Mar 18, 2014 11:42 am

Kernel destroyed by e4defrag/fsck

Post by Acetone »

Hi,
not sure where to post bugs and not even sure the title is correct since I have no clue what's going on.

I'm using Mint 16 with the latests stable updates. From there, I checked another partition (the boot partition of a LMDE deployment).
Both Mint 16 and LMDE are on the same LVM2. LMDE uses distro/lmde_boot, distro/lmde_root, and distro/lmde_home, all being ext4 filesystems.

What I did:

Code: Select all

fsck.ext4 -Dft -C 0 /dev/distro/lmde_boot
mount /dev/distro/lmde_boot /mnt
e4defrag -c /dev/distro/lmde_boot
e4defrag /dev/distro/lmde_boot
Everything was ok. I then tried rebooting to LMDE but it failed. Failure at loading the initramfs. I have 2 kernels on that LMDE boot partition: one from the distro and a custom one I made. They both fail to load.
I compared the files with a backup just to realize the kernel files have been altered.
Actually, the original LMDE's kernel, initrd, and System.map have been modified. For my own kernel, only its initramfs and System.map have been modified (the kernel itself is still the same).
So out of 6 files, 5 have been modified to death. Unfortunately, I can't check the other files on that lmde_boot partition. Its grub.cfg seems intact.

After that, I tried to fsck that partition again but everything looks normal.
I have no idea what broke those files. Is it e4defrag or fsck.ext4? Or maybe something else happened?
LMDE booted perfectly right before that bug occurred. I was using LMDE when I rebooted to Mint in order to check the filesystems. Then I immediately rebooted to LMDE. So basically, appart from issuing those e4defrag and fsck commands, I haven't done anything. I made sure I never ran fsck on a mounted filesystem.
As far as I remember, e4defrag shown fragmentation on the kernel files. I can't remember if my own kernel (the one that has not been altered) was fragmented. My guess is that the fragmented files got corrupted by e4defrag but I can't verify it.

I'm not worried about those corrupted files, I do have a backup. I'm a bit more worried about the other partitions (I hope lmde_root didn't suffer from the same issue).
Should I fill in a bug report and how to do it?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mute Ant

Re: Kernel destroyed by e4defrag/fsck

Post by Mute Ant »

You mounted the file system on /mnt then snuck in round the back and did a defrag on the file holding the file system not the files in the file system. I suspect you meant...

mount /dev/distro/lmde_boot /mnt
e4defrag /mnt
umount /mnt

An extreme example :shock: ...

mount /dev/sdxx /mnt
shred /dev/sdxx
umount /mnt
Locked

Return to “Other topics”