Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72806 - [mkinitcpio] Potential root fs corruption on every boot for non-ext{2,3,4}

Attached to Project: Arch Linux
Opened by Alexey Rychkov (nightfog) - Sunday, 21 November 2021, 15:57 GMT
Last edited by Jonas Witschel (diabonas) - Monday, 22 November 2021, 09:27 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

At every boot non-ext root filesystem is checked with `fsck.ext2 -a ...` (yes, some automatic repair!). This could damage it permanently.

The proposed solution is at https://github.com/archlinux/mkinitcpio/pull/72.

Mkinitcpio version: 30-2.
This task depends upon

Comment by Giancarlo Razzolini (grazzolini) - Monday, 22 November 2021, 16:34 GMT
You actually have an example of a FS that was damaged by this? The main problem I see with your PR is that rootfstype is not an option that is passed by all boot loaders, if any.
Comment by Alexey Rychkov (nightfog) - Monday, 22 November 2021, 17:40 GMT
No, at the moment I conclude, that my fs corruption is not related to this issue, because fsck.ext2 is not copied to initcpio in my case.
But it still may arise for someone else. fsck is definitely trying to call fsck.ext2.
Another drawback is that fsck.realrootfstype is not called at all.
For bootloaders, I use GRUB and can simply pass rootfstype as a kernel parameter. Yes, I've done this manually. See no problem there.
Comment by Alexey Rychkov (nightfog) - Saturday, 27 November 2021, 16:23 GMT
We can copy the rootfstype parameter provided by the autodetect hook into initramfs as a fallback option. fsck then will check both and give up if none declared.
I've updated a PR. Do you think that's a reasonable way?

Loading...