Debian Changing Swap UUID

Help with issues regarding installation of Debian

Debian Changing Swap UUID

Postby TNKEG » 2018-03-08 15:05

I would like to mention that I noticed that when Debian installs alongside other Linux distro's the Debian installer is changing the /swap UUID and label.It caused timeouts in the boot of the others while looking for the old UUID of /swap for resume.This was correctable on my end with tweaks in the other OS but difficult if not impossible in the Mandriva based systems.Linux is known to work well alongside other operating systems and it was a surprise that it occurred.It would be nice if someone upstream would look into this issue?
TNKEG
 
Posts: 6
Joined: 2018-03-08 14:53

Re: Debian Changing Swap UUID

Postby bw123 » 2018-03-08 16:33

I think this has been written about on the forum quite a bit. Would be good item in a FAQ.
search.php?keywords=swap+uuid

I believe the partitioning section of the installer is pretty clear about what it does. If you choose to use an existing partition, and format it, then of course the UUID will change. I don't know why it would be good idea to use an existing partition without creating a new fs on it by default? One way I have gotten around this in the past is choose no swap, then add it to fstab later after installation. The mkswap command also has options for -U and label, so you could change them back to what the other linuxes are looking for.

Anyway, the forum isn't the right place to report issues, it's for helping users. This topic is probably better placed in "installation."
User avatar
bw123
 
Posts: 3078
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian Changing Swap UUID

Postby Head_on_a_Stick » 2018-03-08 19:53

It is possible to de-select the "format" option for the swap partition and this will retain the UUID.
"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher."
— Antoine de Saint Exupéry, Terre des Hommes (1939).
User avatar
Head_on_a_Stick
 
Posts: 7547
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian Changing Swap UUID

Postby ticojohn » 2018-03-08 19:57

Head_on_a_Stick wrote:It is possible to de-select the "format" option for the swap partition and this will retain the UUID.

+1
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 774
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Debian Changing Swap UUID

Postby p.H » 2018-03-08 22:06

bw123 wrote: why it would be good idea to use an existing partition without creating a new fs on it by default?

Because you want to keep the metadata or contents of the partition.
Note that swap is not a filesystem.

Head_on_a_Stick wrote:It is possible to de-select the "format" option for the swap partition

IME, it is not possible. The only option is to not use the swap partition.
p.H
 
Posts: 394
Joined: 2017-09-17 07:12

Re: Debian Changing Swap UUID

Postby TNKEG » 2018-03-08 23:07

Thank you for your quick replies.If I have to reinstall in the future I will keep in mind what you've said or just install Debian first.
TNKEG
 
Posts: 6
Joined: 2018-03-08 14:53

Re: Debian Changing Swap UUID

Postby Head_on_a_Stick » 2018-03-09 07:06

p.H wrote:
Head_on_a_Stick wrote:It is possible to de-select the "format" option for the swap partition

IME, it is not possible. The only option is to not use the swap partition.

Have you tried recently?

I used a 9.3 ISO image last weekend several times and I disabled formatting of the swap partition to avoid just this problem with the pre-existing Debian system, the swap partition's UUID was then not changed and the partition was indeed added to the new system's fstab.

EDIT: please don't make me load the Gtk installer to prove you wrong by scrot, I hate using that :P
"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher."
— Antoine de Saint Exupéry, Terre des Hommes (1939).
User avatar
Head_on_a_Stick
 
Posts: 7547
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian Changing Swap UUID

Postby p.H » 2018-03-09 19:51

I hadn't tried recently, so I booted the Debian 9.3 multiarch netinst ISOhybrid image from a USB drive and tried again, full of hope.
But still no joy : the only choice is to either not use the existing swap partition or use it as swap and format it (the default). I cannot find any option to use the partition as swap without formatting it. So I did not proceed further.
Did I miss something ? I really wish you were right !
p.H
 
Posts: 394
Joined: 2017-09-17 07:12

Re: Debian Changing Swap UUID

Postby Head_on_a_Stick » 2018-03-09 20:24

p.H wrote:Did I miss something ?

No, you didn't miss anything at all, I am talking out of my ass on this one (again).

You are right, I've just tried in QEMU and formatting the swap is the only option, thanks for correcting my nonsense.
"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher."
— Antoine de Saint Exupéry, Terre des Hommes (1939).
User avatar
Head_on_a_Stick
 
Posts: 7547
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian Changing Swap UUID

Postby p.H » 2018-03-09 21:26

Thanks for taking the time to double check.

Maybe you were mistaken because you set the swap as "do not use" in order not to change its UUID but observed that after booting the new system the swap was used anyway, and assumed that it had been added to its fstab. This happens with systemd and GPT : by defaults systemd uses swap partitions on a GPT system disk even if they are not declared in fstab.
p.H
 
Posts: 394
Joined: 2017-09-17 07:12


Return to Installation

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable