Comment 0 for bug 336992

Revision history for this message
Luke Plant (spookylukey) wrote : UUID of existing partitions are changed

Binary package hint: ubiquity

I installed Ubuntu Intrepid on a machine, and then made a second installation (the second time using a Hardy Live CD, I was not able to use Intrepid the second time due to bug 333584 https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/333584 ).

The second installation involved repartitioning, and when I returned to my first installation, the UUID of the swap partition had been changed, which meant that swap was no longer available, and hibernate no longer worked.

The original UUID was:

441b1300-b765-4600-813b-fd2c03e917e6

The new UUID is:

441b13b7-6546-813b-fd2c-03e917e617e6

The striking similarities between these number make me think something funny is going on, which is why I bothered to post them. Assuming the hexadecimal digits correspond to a simple array of bytes, it looks like you can generate the second UUID by this algorithm:

1) create a buffer containing the first UUID
2) set pointer1 and pointer2 to position 0
3) if byte at pointer1 == 0, increment pointer1, and go to step 3
4) copy byte at pointer1 to pointer2
5) increment pointer1 and pointer2
6) go to step 3.

The other UUID on my first installation system, i.e. for the root partition, was not changed, but it did not contain a '00' in it either, so by the above process you would not expect it to change. (Also the root partition didn't change its starting cyclinder, only the end cylinder, whereas the swap partition probably had to be created from scratch).

As mentioned above, this happened in Hardy, not Intrepid, and it looks like it could well be a libparted bug or something like that.