gparted wrongly reports partition "mounted" when uuid and label are duplicates

Bug #579703 reported by Dallman Ross
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gparted (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: yelp

Running GParted 0.5.1, I found that /dev/sde7 was reported as mounted although it was not mounted. Trying to ascertain why, I discovered that it was a clone of /dev/sda1; "clone" meaning the device label and uuid were also the same.

I changed the uuid of /dev/sde7 using tune2fs, refreshed the disk read in GParted, and saw that the erroneous report of a mounted device went away.

Here is a screen shot.

I am using Lucid (10.04), 64-bit.

I expect GParted not to report "mounted" when a device is not actually mounted.

Revision history for this message
Dallman Ross (spamless) wrote :
Revision history for this message
Monkey (monkey-libre) wrote :

I´ve reassigned this bug to the gparted package.

Thank You for making Ubuntu better.

affects: yelp (Ubuntu) → gparted (Ubuntu)
Changed in gparted (Ubuntu):
status: New → Confirmed
Revision history for this message
Curtis Gedak (gedakc) wrote :

For many file systems, GParted does a sector by sector copy. As such the copy of the partition has exactly the same UUID as the source.

In order for GParted to change the UUID, information is needed on how to alter the UUID for every file system that GParted supports.

To help with resolving this bug, would someone be able to research what free open source software utilities are available for changing UUID's on each file system? The exact command syntax for changing the UUID would also be appreciated.

Revision history for this message
Scott Talbert (swt-techie) wrote : Re: [Bug 579703] Re: gparted wrongly reports partition "mounted" when uuid and label are duplicates

On Sat, 7 Aug 2010, Curtis Gedak wrote:

> For many file systems, GParted does a sector by sector copy. As such
> the copy of the partition has exactly the same UUID as the source.
>
> In order for GParted to change the UUID, information is needed on how to
> alter the UUID for every file system that GParted supports.
>
> To help with resolving this bug, would someone be able to research what
> free open source software utilities are available for changing UUID's on
> each file system? The exact command syntax for changing the UUID would
> also be appreciated.

I don't think that's exactly what this bug reporter is looking for. What
is reported is that GParted mistakely reports that "cloned" partitions are
mounted when they are in fact not.

I can confirm this behavior and am looking into why it is occurring.

Revision history for this message
Dallman Ross (spamless) wrote :

Scott (Comment #4) is precisely right. I am not asking how to change UUIDs with GParted, though the feature would be a nice bonus. The bug is as I stated it and as Scott repeated it.

By the way, though, I did research changing UUIDs for NTFS and FAT32 partitions at that time. It can be done with dd, though it's not trivial to do. (JFGI. I did at the time of the original bug report.) ☺ It can also be done with free Windows software such as Partition Wizard 5 Home Edition, http://www.partitionwizard.com/, which I actually found via a Google search and installed on my 64-bit system and used successfully to solve the very issue I wrote the bug report about. And I've used it a number of times since and like it. The old Partition Magic also could do it, but it neither was freeware nor is in existence anyway these days. I'm sure there are other solutions.

But let's not sidetrack ourselves: the bug is that a device is being reported as mounted when it is not mounted. Thanks, guys.

Revision history for this message
Scott Talbert (swt-techie) wrote :

It looks like this may actually be an issue with how udev is creating links in /dev. Dallman, do you still have access to your setup where this bug occurs? If so, can you do "ls -l /dev/disk/by-uuid/" and post the results?

Revision history for this message
Scott Talbert (swt-techie) wrote :

OK, this is what is happening on my machine when I reproduce this:
1) I insert a USB Flash Drive that has a duplicate UUID as one of my hard drive's partitions.
2) udev changes the symlink /dev/disks/by-uuid/<duplicate UUID> to point to the Flash Drive's partition.
3) GParted checks /proc/mounts to determine which partitions are mounted. Since the original /dev/disks/by-uuid/<duplicate UUID> is actually mounted, GParted doesn't know any better and flags the USB Flash Drive partition as being mounted.

Unfortunately, I'm not sure if there is a way to really fix this. The udev developers believe that udev is behaving as expected - having multiple partitions with the same UUID can lead to unexpected behavior.

Dallman, you can probably work around this issue by changing how Ubuntu mounts your root partition. If you edit /boot/grub/menu.list, find the line that says kopt=root=UUID=<my UUID>. Replace the UUID=<my UUID> with /dev/<root partition>, e.g., /dev/sda7. Then run 'grub-update'. After rebooting, /proc/mounts will contain /dev/sdaX, rather than /dev/disks/by-uuid/<UUID>. GParted won't see the cloned partition as mounted anymore.

Revision history for this message
Phillip Susi (psusi) wrote :

I am unable to reproduce this on Oneiric, so it looks like this may have been fixed. Are you still experiencing this one Oneiric?

Changed in gparted (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Dallman Ross (spamless) wrote :

Thanks for checking, Phillip, and for bringing the change to my attention. I tested it last night and find that you are correct. The bugs is now fixed in Oneiric. Only took two years! :-)

I did find that Plymouth's splash screen screwed itself up when I duplicated my Oneiric boot partition and rebooted with the UUID still identical to the original version's. After I deleted the test clone partition, I had to run "update-initramfs -u" to get that back.

Dallman

Phillip Susi (psusi)
Changed in gparted (Ubuntu):
status: Incomplete → 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.