Subject: Change of UUID?

From: Hans <[email-masked]>
Date: Fri, 23 Sep 2016 17:20:30 +0200

Hello list,

I need some help for understanding things.

On my EEEPC I am usiing encrypted partitions, also swap is encrypted (all 
luks), too.
When I ssuspend to disk, the memory is written to the encrypted swap 
partition, which is /dev/mapper/swap.

In /etc/uswsusp.conf the UUID is identically to the output of "blkid /dev/
mapper/swap".

BUT - Now the problem: From time to time the UUID of /dev/mapper/swap changes 
and is then of course different to the entry in /etc/uswsusp.conf. 

This means, the system sometimes inhibits to boot (after resume), as it does 
not find the resume device. It can then be started by adding "noresume" to the 
kernel commands.

So, what might change the UUID? I did not format swap or similar. The only 
thing I do from time to time is starting a livefile on this computer, buit this 
should not change the UUID, shouldn't it?

But maybe, I have misunderstood, how UUID's are created. The other 
partiitions, which are also encrypted, do NOT change.

Or is it a bug? 

Thanks for any help to enlightening me.

Best regards

Hans

---

From: Felix Miata <[email-masked]>
Date: Fri, 23 Sep 2016 12:52:41 -0400

> BUT - Now the problem: From time to time

Can you give an example of such time?

The Debian installer reformats an existing swap, which means it gets a new 
UUID, unless you go out of your way to prevent it from doing so.

> the UUID of /dev/mapper/swap changes

> should not change the UUID, shouldn't it?

What do you mean by "starting a livefile"?

-- 
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

  Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

---

From: Hans <[email-masked]>
Date: Fri, 23 Sep 2016 19:10:25 +0200

Hi Felix, 
> Can you give an example of such time?

Sure, from time-to-time means 2-3 times a week, but randomly.

> UUID, unless you go out of your way to prevent it from doing so.

No, I did not install Debian, I am running this now for several years.
> What do you mean by "starting a livefile"?
I mean something like this: 

blkid /dev/mapper/swap
/dev/maoper/swap  UUID="ba1b8eXXX-and-sop-on" TYPE="swap" PTTYPE="dos" 
PARTUUID="0007a381-05"

# /etc/uswsusp.conf(5) -- Configuration file for s2disk/s2both
resume device = /dev/disk/by-uuid/fd45123cf-and-so-on"
compress = y
early writeout = y
image size = 1908094484
RSA key file = /etc/uswsusp.key
shutdown method = platform

UUID's (anonymized by me) are different! 

Best

Hans

---

From: Felix Miata <[email-masked]>
Date: Fri, 23 Sep 2016 13:31:42 -0400

> UUID's (anonymized by me) are different!

Possible workaround:

1-recreate swap using -L to give swap a volume label
2-adjust Grub config to direct resume to LABEL instead of UUID
3-adjust fstab to mount swap by LABEL instead of UUID

If this succeeds, file a bug, maybe against device-mapper or multipath-tools.
-- 
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)