gparted should offer option to change UUID when copying partition

Bug #737387 reported by Arto Jääskeläinen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GParted
Confirmed
Wishlist
gparted (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: gparted

A system with two physical disks (sda, sdb), each with valid UUID.

Problem:
Gparted overwrites a valid UUID on destination disk if partition is copied using Gparted. Result is two partitions with same UUID i.e. "Unique Identifier" is no more unique. That will result in some other problems which show up like described in bug report # 579703 for example.

Further details:
Gparted version is 0.7. Steps I did: Ubuntu 10.10 system partition (/) on disk "sda" was getting fulll and I added another physical disk "sdb" which was before used in another Ubuntu installation with valid partition. "sdb" was working ok after boot. Decided to copy Ubuntu system partition from "sda" to "sdb" and modify boot to use "sdb" for Ubuntu since there is enough space. Idea did not succeed since Gparted had overwritten original UUID on disk "sdb" i.e. there are now two partitions on different disks with same UUID. Please see this printout fron "sudo blkid":

/dev/sda1: LABEL="C_DRIVE" UUID="F614D11C14D0E0A3" TYPE="ntfs"
/dev/sda2: UUID="33111f1c-9438-4b9b-a61d-015ab998224c" TYPE="swap"
/dev/sda3: LABEL="10.10-root" UUID="144ec3ef-55a7-4ede-a2ef-3f284abbf680" TYPE="ext3"
/dev/sda4: LABEL="10.10-home" UUID="5589dba1-5f3b-4581-b24a-8ba4b3a86c50" TYPE="ext3"
/dev/sdb1: LABEL="10.10-root" UUID="144ec3ef-55a7-4ede-a2ef-3f284abbf680" TYPE="ext3"

Revision history for this message
Arto Jääskeläinen (ajaaskel) wrote :

FYI / temporary fix:

You can fix invalid UUID manually. Run "uuidgen", that will give you a new UUID. Use "tune2fs" to change that UUID for your partition.

For example, let's assume that uuidgen answered "fe05703f-87f5-44ef-8224-ff3eb501a98f", command

   sudo tune2fs -U /dev/sdb1 fe05703f-87f5-44ef-8224-ff3eb501a98f

will do it.

Revision history for this message
Jan Claeys (janc) wrote :

I guess it would be nice if GParted would be able to change the UUID after copying, but I also think changing it unconditionally is probably going to surprise people for some use cases?

Revision history for this message
Curtis Gedak (gedakc) wrote :

Thanks Arto for reporting this concern.

Since there are situations in which a person wishes an exact duplicate of the partition, I do not think it is wrong to leave the UUID the same.

Perhaps it would help if GParted displayed a message for copy operations that indicated to the user that if they wish to use the partition on the same computer at the same time as the original partition then they should change both the UUID and volume label.

A note to this effect is contained in the GParted documentation, but not directly in the application.
http://gparted.org/display-doc.php?name=help-manual&lang=C#gparted-copy-and-paste-partition

It would also be useful if GParted provided the ability to change the UUID on the partition too. Currently it does permit changing the volume label.

Revision history for this message
Arto Jääskeläinen (ajaaskel) wrote :

I agree some of the points you mentioned but that leads to problems. Situation actually depends on what user plans to do. No change of UUID is needed if the new partition will not be used in the same computer with the old one and no further editing of destination partition will now be done. The other effect of that situation is that Gparted will show destination mounted, does not allow to dismount "sdb" and as a result no further action for "sdb" is possible (unless you understand to change manually UUID for the destination disk). I regard that a confusing situation for users, too. Problem with further editing with Dparted could be avoided by generating new UUID for the new copy just to keep Unique = Unique i.e. what that UUID stands for. Some users could be surpised but I can not see any technical problem resulting from that approach.

I prefer giving users a choice (tickbox, menu, what ever) to select "Keep oroginal UUID" with some short warning about results but just to avoid problems the default should be "Unique = Unique" i.e. old UUID kept intact if it exists on destination or a new one generated otherwise.

Phillip Susi (psusi)
summary: - Gparted: "Copy" creates duplicate UUID to another disk
+ gparted should offer option to change UUID when copying partition
Changed in gparted (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Changed in gparted:
importance: Unknown → Wishlist
status: Unknown → New
Changed in gparted:
status: New → Confirmed
Revision history for this message
Martin Stjernholm (msub) wrote :

Note also that it could be just as valid to change the uuid of the original as of the copy, if the user intends to let the copy take the place of the original. One case could be when migrating to new a hd, and for some reason wanting to leave the partitions intact on the old one.

Revision history for this message
Curtis Gedak (gedakc) wrote :

The ability to set a new UUID has been added to GParted 0.12.0 released upstream on Feb 21, 2012.

Revision history for this message
André Pirard (a.pirard) wrote :

As changing the UUID of a partition also implies to change the references to it, for example in fstab, I opened Bug #996443 suggesting that UUID=0 meant "the UUID of the partition this reference is in", "this partition, "myself", solving 90%+ of such cases.

I think that the effects of not changing the UUID during a copy are just to obscure, that changing it should be the default, changeable option but that the user should be warned by a dialog that can be easily disabled.

Vishnu NJ (vishnunjhere)
Changed in gparted (Ubuntu):
status: Triaged → 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.