shutdown missing -F (force fsck) option

Bug #74139 reported by Pierre Bauduin
44
This bug affects 4 people
Affects Status Importance Assigned to Milestone
upstart
Won't Fix
Low
Unassigned
upstart (Ubuntu)
Invalid
Low
Scott James Remnant (Canonical)

Bug Description

Binary package hint: upstart

Hello,

The -F option of the /sbin/shutdown command is useful: it allows you to force the operating system to check all partitions (fsck) at the next reboot.

In Ubuntu 6.10, this option has disappeared !

The command "shutdown -rF now" reboots the system, but does not force the checking of the filesystems. Also, the -F option is no longer in the shutdown manpage.

It appears the -F option was still there in Ubuntu 6.06.

As an aside, since Ubuntu is supposed to be based on Debian GNU/Linux, shutdown does have the -F flag in both Debian 3.1 (sarge) and Debian 4.0 (etch).

So, where did -F go ?

Package information from apt:
Package: upstart
Section: base
Installed-Size: 300
Maintainer: Scott James Remnant <email address hidden>
Architecture: i386
Version: 0.2.7-7
Replaces: sysvinit

Revision history for this message
Andreas Simon (andreas-w-simon) wrote :

Ubuntu replaced sysvinit with upstart (see https://wiki.ubuntu.com/ReplacementInit ).

Upstart's shutdown doesn't (yet?) support the -F option.

Changed in upstart:
assignee: nobody → keybuk
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Kyle McMartin (kyle) wrote :

You can just touch /forcefsck before you issue your shutdown. This is all that sysvinit shutdown did. Maybe I'll see about sending Scott a patch since I had wondered this as well.

Revision history for this message
Pierre Bauduin (pierrebauduin) wrote : Re: [Bug 74139] Re: /sbin/shutdown on Ubuntu 6.10: where did -F go ?

Hi there and thanks for looking into my bug report.

So I just need to create a file named forcefsck on the root filesystem, and
it'll force fsck at boot ? That's cool :)

Thank you,
--
Pierre Bauduin
Linux enthusiast since 1996
Debian GNU/Linux user
Red Hat Certified Engineer
website: http://pierre.baudu.in/
mail/msn/gaim: <email address hidden>

2007/3/2, Kyle McMartin <email address hidden>:
>
> You can just touch /forcefsck before you issue your shutdown. This is
> all that sysvinit shutdown did. Maybe I'll see about sending Scott a
> patch since I had wondered this as well.
>
> --
> /sbin/shutdown on Ubuntu 6.10: where did -F go ?
> https://launchpad.net/bugs/74139
>

Changed in upstart:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This is a missing feature from the "compat" shutdown utility, it should be pretty trivial to add since it just seems to touch a file.

I wrote compat/sysv/shutdown by reading the documentation, so there are several "hidden" features like this that are missing.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Rejecting the Ubuntu portion of this bug since the missing -F feature is in the upstream code

Changed in upstart:
status: Confirmed → Rejected
Changed in upstart:
status: Confirmed → Triaged
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

For various reasons, the compat branch of shutdown and reboot are being dropped -- these will now be considered Upstart Native tools and may not behave 100% like their sysvinit equivalents

Changed in upstart:
status: Triaged → Won't Fix
Revision history for this message
i am not what i am (iamnotwhatiam-deactivatedaccount) wrote :

Surely its not too hard just to add the -f option that touches /forcefsck before you issue your shutdown.

That isn't hard.

Revision history for this message
i am not what i am (iamnotwhatiam-deactivatedaccount) wrote :

lets see if we can fix this thing.

Changed in upstart:
status: Invalid → Incomplete
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Please don't unmark bugs as Invalid or Won't Fix

Changed in upstart:
status: Incomplete → Invalid
Revision history for this message
i am not what i am (iamnotwhatiam-deactivatedaccount) wrote :

Sorry. I will not do that again.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Upstart upstream took a decision to abandon one of its goals of userland tools compatible with other init systems. In practice, it never got any further than implementing tools somewhat like the SysV tools that were in Debian (which were even different from those in RedHat), and these had plenty of obscure features like "-F", "shutdown.allow", etc.

Most of these obscure features are not something we would want to support in the future; fsck in particularly is slowly undergoing big changes that will mean you can do it on the fly, with no need to reboot, etc. so why support -F ? Likewise shutdown.allow is better handled nowadays through PolicyKit.

Thus the decision was taken for Upstart's userland tools to be native, and provide the minimum functionality that a user might expect from them, without bloating them.

Other functionality (like forced fsck) can be provided elsewhere. As Kyle says above, simply touch a file before calling shutdown - a GUI can do this.

Changed in upstart:
milestone: 0.5 → none
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

> fsck in particularly is slowly undergoing big changes that will mean you can do it on the fly, with no need to reboot, etc.

6 years later ext4 still does not support online fsck.

> so why support -F ?

Because with systemd it is even more cumbersome to force a fsck of the root FS.

Revision history for this message
Sajid Sajid (sajid626) wrote :

Hello

Revision history for this message
Sajid Sajid (sajid626) wrote :

Hello I am interested in the

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.