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
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: all All
: - Unknown - Crash
Assignee: Peter Müller
QA Contact:
URL:
Keywords: Blocker
Depends on:
Blocks:
 
Reported: 2022-04-08 22:48 UTC by Nick Eads
Modified: 2022-04-27 18:15 UTC (History)
3 users (show)

See Also:


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

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
Addendum:
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
1. 
On the startup screen there is an additional information:

e2fsck: invalid option -- ' '

https://community.ipfire.org/uploads/default/original/2X/7/758e3454129982e0fa941dff92dbf31b14cef796.png

2. 
According to the e2fsck manual:
The exit code returned by e2fsck is the sum of the following
       conditions:
            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
https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=7e6efc89ea167535caa29e921be0d39a9e076920

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