On Sun, 21 Mar 2021 01:07:09 -0400 David T-G <davidtg-robot@justpickone.org> wrote:
Felix, et al --
...and then Felix Miata said... % % David T-G composed on 2021-03-21 00:48 (UTC-0400): % % > How does a swap partition (swap volume?) have a volume label, though?!? % % mkswap -L swapperlabel /dev/sd....
Well. Um. That was simple :-) Thanks!
Now ... How can I *change* a swap label? <poke> Ahhhh... Thank you, man(1) with the -k flag!
diskfarm:~ # swaplabel -L diskfarm-swap /dev/sda1 diskfarm:~ # swaplabel /dev/sda1 LABEL: diskfarm-swap UUID: 3982f3a2-3e59-4658-b18d-5a036572c6c7
Ta-daaaaa!
Indeed, and for those curious about spaces in names: # swaplabel /dev/sda7 UUID: 964c2f38-5789-4fe6-b6e5-65c0b486ee7c # swaplabel -L 'swap partition' /dev/sda7 # swaplabel /dev/sda7 LABEL: swap partition UUID: 964c2f38-5789-4fe6-b6e5-65c0b486ee7c # ls -goh /dev/disk/by-label/ | grep swap lrwxrwxrwx 1 10 Mar 21 09:11 swap\x20partition -> ../../sda7 # So I think it is possible to have spaces in volume labels and the /dev/disk/by-label/ hierarchy encodes them.
We'll probably need another grub2-mkconfig run, but we'll have a look at the next boot.
Thanks again & HANN (for real this time; the alarm goes off in five hours!)
:-D