shutdown missing -F (force fsck) option

Bug #74139 reported by Pierre Bauduin on 2006-12-02
40
This bug affects 3 people
Affects Status Importance Assigned to Milestone
upstart
Low
Unassigned
upstart (Ubuntu)
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

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
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.

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

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.

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

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

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

That isn't hard.

lets see if we can fix this thing.

Changed in upstart:
status: Invalid → Incomplete

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

Changed in upstart:
status: Incomplete → Invalid

Sorry. I will not do that again.

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

> 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.

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

Duplicates of this bug

Other bug subscribers