Bug 12842 - Core 167: Forced filesystem check on reboot fails due to apparent syntax error
Summary: Core 167: Forced filesystem check on reboot fails due to apparent syntax error
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: all All
: - Unknown - Crash
Assignee: Peter Müller
QA Contact:
Keywords: Blocker
Depends on:
Reported: 2022-04-08 22:48 UTC by Nick Eads
Modified: 2022-04-27 18:15 UTC (History)
3 users (show)

See Also:

Bootlog after adding rd.debug to Linux command line (106.24 KB, text/plain)
2022-04-11 21:31 UTC, Nick Eads

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Eads 2022-04-08 22:48:02 UTC
Overview: After successfully upgrading from Core 166 to 167 with no apparent errors, I used the GUI option to reboot with a forced filesystem check. The system restarted, but failed during the reboot due to an apparent syntax error in the e2fsck command. The error was reported as an unknown option ’ ', and there did appear to be an extra space immediately after the -p and before the filesystem was specified. I executed the command manually and was able to continue the boot successfully.

Steps to reproduce:

1. Run Core 167.
2. From within GUI, select reboot with option for force filesystem check.

Actual Results: Reboot stops with e2fsck error (see forum thread mentioned below for screenshots) and leaves user in debug shell.

Expected Results: Successful reboot.

Build Date & Hardware: IPFire 2.27 (x86_64) - Core Update 167

Forum Thread: See community forum where this bug was reproduced by another user with screenshots: https://community.ipfire.org/t/possible-issue-with-forced-filesystem-check-on-167-upgrade/7681
Comment 1 iptom 2022-04-08 23:18:54 UTC
Similar effect after using the command "shutdown -rF now"
Comment 2 Michael Tremer 2022-04-11 08:00:38 UTC
This is a bug in dracut which has been updated in c167.

Could you please add rd.debug to the kernel command line, boot again with the file system check and post the output?
Comment 3 Nick Eads 2022-04-11 21:31:29 UTC
Created attachment 1033 [details]
Bootlog after adding rd.debug to Linux command line
Comment 4 Nick Eads 2022-04-11 21:32:38 UTC
I've attached the requested log. Please let me know if there is anything else that I can provide.
Comment 5 Michael Tremer 2022-04-12 10:50:21 UTC
(In reply to Nick Eads from comment #4)
> I've attached the requested log. Please let me know if there is anything
> else that I can provide.

Thank you. This is an interesting problem:

> [    3.360177] dracut: Checking ext4: /dev/disk/by-uuid/eb1942a7-4ac1-48d1-b2a7-48471635e7cc
> [    3.360787] dracut: issuing e2fsck -a -f  /dev/disk/by-uuid/eb1942a7-4ac1-48d1-b2a7-48471635e7cc
> [    3.363908] dracut Warning: e2fsck returned with 16

It looks like there is an extra "" in the command line. However, I do not know where that is coming from. In the code, the command is being constructed in a  pretty straight-forward way:

> https://git.ipfire.org/?p=thirdparty/dracut.git;a=blob;f=modules.d/99fs-lib/fs-lib.sh;h=36cd731a1aef46e75e5610865e3e4981b35a1dcb;hb=82d9fbf193b0d8bd810c6cbee726a1f851e5ee75#l108

We are already on the latest version. So this must be a new problem being introduced into dracut.

I was hoping for a little bit more debug output from the command line option.
Comment 6 iptom 2022-04-18 10:54:48 UTC
On the startup screen there is an additional information:

e2fsck: invalid option -- ' '


According to the e2fsck manual:
The exit code returned by e2fsck is the sum of the following
            0    - No errors
            1    - File system errors corrected
            2    - File system errors corrected, system should
                   be rebooted
            4    - File system errors left uncorrected
            8    - Operational error
            16   - Usage or syntax error
            32   - E2fsck canceled by user request
            128  - Shared library error
Comment 7 Peter Müller 2022-04-23 14:21:45 UTC

@Michael: Please merge "next" into "master", C167 should be ready to go now.