FS#28947 - [initscripts] / fsck fails with invalid command line arguments in forcefsck mode

Attached to Project: Arch Linux
Opened by Lucjan B (lucck) - Friday, 16 March 2012, 20:56 GMT
Last edited by Tom Gundersen (tomegun) - Saturday, 17 March 2012, 13:23 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When i tried to force drive check in the next reboot by command shutdown -Fr now, after the reboot fsck failed because invalid commandline is passed to the fsck.

Additional info:
* versions:
core/initscripts 2012.02.1-1 (base)

* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Tom Gundersen (tomegun)
Saturday, 17 March 2012, 13:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  in git
Comment by Lucjan B (lucck) - Friday, 16 March 2012, 21:04 GMT
the fsck version is e2fsck 1.42.1 (17-Feb-2012). My computer has two drives, and the fstab is listed bellow:

UUID=def3b417-0241-4747-ad96-ccfcb9d94317 / ext4 defaults,noatime,discard 0 1
UUID=3daa59d8-d59d-4ca7-8be0-c6aec349d67e /home ext4 defaults 0 2
UUID=45e91c3a-21fd-46b4-b35c-d39d7a94802e swap swap defaults 0 0

The commanline passed to the fsck:

fsck -A -T -C -a -t nofs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,noshfs,nofuse,nofuseblk,noglusterfs,nodavfs,nofuse.glusterfs,noopts=_netdev -- -f -M


Step to reproduce:

shutdown -Fr now
and after ther reboot fsck fails immediately, with error invalid commandline passed to the fsck


Comment by Dave Reisner (falconindy) - Friday, 16 March 2012, 23:16 GMT
This only happens if you're using fsck in mkinitcpio, I believe. Patch sent to the ML:

http://mailman.archlinux.org/pipermail/arch-projects/2012-March/002613.html
Comment by Tom Gundersen (tomegun) - Friday, 16 March 2012, 23:24 GMT
Thanks for the report!

As far as I can tell this is triggered by the combination of the "fsck" hook in the initramfs and using forcefsck. Could you try editing /etc/rc.d/functions and swapping the last two arguments (${FORCEFSCK} ${IGNORE_MOUNTED}) to fsck in the function fsck_all.

If you can confirm that this fixes it I'll queue this for the next release (which should be very soon).
Comment by Tom Gundersen (tomegun) - Friday, 16 March 2012, 23:25 GMT
@falconindy: didn't see your comment before posting. /me checks the ml to see if the patch is the same as what I have here...
Comment by Lucjan B (lucck) - Saturday, 17 March 2012, 08:53 GMT
After applying the @falconindy patch cmdline args for fsck are correct and initscripts correctly run fsck. But I don't know why fsck checks second drive (sdb) only. First root drive (sda) is not forced to check

Comment by Tom Gundersen (tomegun) - Saturday, 17 March 2012, 09:21 GMT
@lucck: that's probably because the root is being checked by your initramfs and the rest is done by initscripts.
@falconindy: does mkinitcpio support forcefsck/fastboot?
Comment by Ch Iossif (chiossif) - Saturday, 17 March 2012, 13:19 GMT
Hi. I met this bug today and YES tomegun's swap suggestion at /etc/rc.d/functions fixes the problem.

Loading...