I just made a small mistake and reformatted my swap partition. It's still formatted as a swap partition - I was fortunate not to touch anything more important. However, I notice that the uuid has changed. Therefore, it no longer matches the uuid in /etc/fstab.
This doesn't cause me any immediate problems, presumably because swap is semi-redundant with modern RAM. Still, I would like to fix the problem.
First, is there a command that lets me verify my hypothesis - that my swap hasn't been detected by fstab after the uuid change? I looked at
on a separate computer to see whether swap normally gets displayed - it doesn't. So what command shows you which partition, if any, is being utilised as swap?
Second, I presume I can just manually edit the fstab and change the uuid it 'expects' to the new uuid. Is that the 'right' way to fix it? Perhaps there are tools for 'safe' editing of fstab entries (like for grub.cfg) which I should look at (even if, in my case, not much can go wrong editing manually).