Ubiquity Advanced Partitioning - Converting/Using ext4 to ext2 without formating formats the partition without warning

Bug #684309 reported by komputes on 2010-12-02
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
High
James Hunt

Bug Description

Binary package hint: ubiquity

Ubiquity Advanced Partitioning - Converting ext4 to ext2 without formatting formats the partition without warning

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ubiquity 2.4.8
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
NonfreeKernelModules: wl
Architecture: i386
Date: Thu Dec 2 17:02:57 2010
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity

komputes (komputes) wrote :
summary: - Ubiquity Advanced Partitioning - Converting ext4 to ext2 without
+ Ubiquity Advanced Partitioning - Converting/Using ext4 to ext2 without
formating formats the partition without warning
Evan (ev) wrote :

Is the format box in the main window (not the dialog) checked when you switch filesystems?

Changed in ubiquity (Ubuntu):
status: New → Incomplete
komputes (komputes) wrote :

No, the format box in the "Advanced Partitioning" main window is not checked. It was simply assigned to use the partition as ext2, and use it as "/" .The installer formatted the partition anyhow, and without warning, causing loss of data.

Changed in ubiquity (Ubuntu):
status: Incomplete → New
tags: added: ubiquity-2.4.8
James Hunt (jamesodhunt) on 2012-03-21
Changed in ubiquity (Ubuntu):
assignee: nobody → James Hunt (jamesodhunt)
James Hunt (jamesodhunt) wrote :

I'm seeing this with ubuntu_precise-desktop-i386.iso from 20th March.

Changed in ubiquity (Ubuntu):
status: New → Incomplete
status: Incomplete → Confirmed
James Hunt (jamesodhunt) on 2012-03-21
Changed in ubiquity (Ubuntu):
importance: Undecided → High
James Hunt (jamesodhunt) wrote :

To be clear, I'm seeing the problem, but the checkbox *is* checked for me:

1) Select an ext4 partition
2) Click "Change..."
3) Set "use as" to ext2
4) Do not check the "Format the partition" checkbox
5) Specify a mount point.
6) Click OK

At this point, the "Format?" column now has a tick against the ext4 filesystem with type shown as "ext2".

The problem seems to manifest itself if you specify a partition to be mounted as a different type to how it was originally formatted. Examples:

- If you format a partition to ext4, and mount it as ext4 but select do not format, ubiquity will not reformat.
- If you format a partition to ext4, and mount it as ext2 but select do not format, ubiquity will silently reformat (as reported).
- If you format a partition to ext4, and mount it as ext3 but select do not format, ubiquity will silently reformat.
- If you format a partition to ext2, and mount it as ext3 but select do not format, ubiquity will silently reformat.

What is happening is that /lib/partman/choose_method/25filesystem/do_option is iterating through the list of valid filesystems.

Here, we have a scenario where the existing partition is ext4 and the user has selected ext2. Since the FS types do not match ($existing is 'no'), it decides that the partition needs to be formatted. Normally, this would be an entirely reasonable outcome but for the fact that:

- ext4 is backwards compatible with ext3 and ext2.
- ext3 is backwards compatible with ext2.

One solution therefore would be to add logic to /lib/partman/choose_method/25filesystem/do_option to special-case ext* filesystems and only reformat if attempting to mount say ext2 as ext4. However, clearly, ubiquity also needs to ask for user confirmation before reformatting.

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

Other bug subscribers