clear_partitions should have some kind of confirmation

Bug #196972 reported by Colin Watson
2
Affects Status Importance Assigned to Milestone
partman-target (Ubuntu)
Fix Released
High
Evan
Hardy
Fix Released
High
Evan

Bug Description

Binary package hint: partman-target

Ubiquity has a confirmation prompt for clear_partitions. However, if you're using d-i, then clear_partitions will still be run, but there will be no confirmation prompt beforehand. I have a vague memory that we discussed this, but on looking at the current state I think we must have come to the wrong decision. I think d-i should definitely have clear_partitions (the consequences of d-i running on unclean partitions are often about as bad as Ubiquity doing the same), but it seems bad not to have a confirmation prompt.

Perhaps we should move the check from Ubiquity to partman-target, and make sure that it is in sync with clear_partitions' behaviour (I think clear_partitions probably ought to operate only on the areas of the filesystem identified by ubiquity/partman/check.d/12system_partitions_formatted, to avoid disasters in case somebody created a user called 'usr' or 'var')?

Colin Watson (cjwatson)
Changed in partman-target:
assignee: nobody → evand
importance: Undecided → High
Revision history for this message
Evan (ev) wrote :

Agreed, though I'm confused by your parenthetical statement. Are you suggesting that it should only cover /usr/local /var/local / /boot /usr /var ? What effect would user creation, specifically a username that matches a mountpoint, have on this code?

Revision history for this message
Colin Watson (cjwatson) wrote :

A user called 'usr' will get a home directory /home/usr. Then, AFAICS, clear_partitions will come along and remove the 'usr' subdirectory of the file system mounted on /home - i.e. their precious home directory. Have I missed something?

Revision history for this message
Colin Watson (cjwatson) wrote :

I think I was confused in my parenthesis; I've now re-read clear_partitions with clearer eyes and noticed that it will only remove files from partitions mounted on OS-reserved paths. That said, it does need to take care to avoid removing files from partitions mounted on /usr/local or /var/local.

Revision history for this message
Colin Watson (cjwatson) wrote :

partman-target (54ubuntu5) hardy; urgency=low

  * Backed out check.d/12partitions_formatted. Moved the ubiquity version
    into partman-target.

 -- Evan Dandrea <email address hidden> Mon, 14 Apr 2008 16:20:45 -0400

partman-target (54ubuntu4) hardy; urgency=low

  * Whitelist /usr/local in clear_partitions (LP: #200582).
  * Whitelist /var/local in clear_partitions.

 -- Evan Dandrea <email address hidden> Thu, 13 Mar 2008 09:43:28 -0400

Changed in partman-target:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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