Comment 0 for bug 1379902

Revision history for this message
Jason Gerard DeRose (jderose) wrote : mkfs.ext4 and friends need a safer option for non-interactive use when existing filesystem is present

mkfs.ext4 (and friends) behave differently on Utopic vs Trusty when an existing filesystem is present on the partition you're formatting.

On Utopic, mkfs.ext4 will prompt you to confirm overwriting of the existing filesystem, which makes it difficult to use non-interactively compared to how it worked on Trusty.

You can work-around this using the -F option, but from the man page, this option seems rather too broad in terms of the "dangerous" behaviors it allows:

-F Force mke2fs to create a filesystem, even if the specified device is not a partition on a
              block special device, or if other parameters do not make sense. In order to force mke2fs
              to create a filesystem even if the filesystem appears to be in use or is mounted (a truly
              dangerous thing to do), this option must be specified twice.

To me it seems mkfs.ext4 (and friends) really needs something like the `apt-get -y` option: only allow for this specific scenario to be used non-interactively, without all the overly permissive possibilities triggered by -F.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: e2fsprogs 1.42.10-1.1ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-21.28-generic 3.16.4
Uname: Linux 3.16.0-21-generic x86_64
ApportVersion: 2.14.7-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Oct 10 12:51:00 2014
EcryptfsInUse: Yes
SourcePackage: e2fsprogs
UpgradeStatus: Upgraded to utopic on 2014-09-25 (14 days ago)