mkfs.ext4 [Utopic+] needs a safer option for non-interactive use when existing filesystem is present

Bug #1379902 reported by Jason Gerard DeRose on 2014-10-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
e2fsprogs (Ubuntu)

Bug Description

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

This behavior change caused problems for the System76 imaging system. I imagine it could likewise cause problems for Ubiquity, assuming it doesn't already have a work-around.

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)

Jason Gerard DeRose (jderose) wrote :
description: updated
description: updated
description: updated
summary: - mkfs.ext4 and friends need a safer option for non-interactive use when
+ mkfs.ext4 [Utopic+] needs a safer option for non-interactive use when
existing filesystem is present
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers