Swap partition UUID changed. What do I do?
Someone (not me) recently installed some new distros on my HD. It seems that during the installation my swap partition was reformatted and a new UUID was assigned to it. I have the following questions:
1. I know that I have to change the swap partition UUID in /etc/fstab and /boot/grub/menu.lst of the affected distros. Is there anything else that needs to be changed? 2. I presume a similar change has to be made to the Grub 2 configuration, for those distros that use Grub 2. I have no experience using Grub 2 so how do I make the change or where can I find instructions to do it? Any help would be greatly appreciated. Many thanks. |
You let others screw around with your system(s) ?. Hmmm ...
This is one of the reasons I avoid UUID. 1) no - but you could revert to device nomenclature and save future heart-burn. 2) read this. |
Hi, I found this just the other day. It eventually talks about resetting the uuid/'s with a script.
http://www.linuxquestions.org/questi...4/#post3971949 which leads to this script, which I have not tried yet. http://barjac.pastebin.com/raw.php?i=f2d0a3e3a Cheers, Glenn |
run blkid as root and make sure the fstab entries match what it outputs.
|
Guys, thanks for the replies. You have been most helpful.
@syg00, Quote:
@Glenn, I think those links refer to Legacy Grub, since they make reference to menu.lst. I tried the script of the first link in Mint and it didn't work. I did run the script on those distros that use Legacy Grub and they show "Root and swap UUIDs as expected by initrd". Thanks for the tip. @craigevil, Thanks for letting me know about blkid. I ran it and matched the fstab entries. Once again, a very big thank you for all the help. It looks you have helped me solve my problem. |
The blkid will give you the device (/dev/sda?) - just stick that in place of UUID=<blah>
|
syg00, thanks. That's what I did.
|
The /dev of the Linux list out the device names as well as the UUID codes.
Therefore you can just do a "fdisk -l" to find which partition is a swap (Type 82) and select either the /dev/sda? or uuid code. Here is what it looks like in directory /dev/disk/by-uuid Code:
[root@localhost saikee]# ls -l /dev/disk/by-uuid |
saikee,
Thank you for the reply. My HD is nowhere as complicated as yours! I know my swap is in /dev/sda2. This is the relevant part of my fstab for my Mint partition: Quote:
|
All you need is to change the swap line from
Code:
UUID=1a33c0d8-d83e-47ad-a4ac-d8c5e95f2544 none swap Code:
/dev/sda2 none swap |
saikee,
Thanks ever so much! I'll get down to changing the fstab on all my distros asap. Do I make the change in the menu.lst in the same way? |
Most distros do not have an entry in the menu.lst for the swap but a few use it for the resume purpose. Yes by all mean change back to the traditional Linux device names.
|
saikee, I just edited the fstab and menu.lst on my PCLinuxOS, rebooted...and it works!!! You really are great! Thanks ever so much. With the confidence you have given me, I'll do the same for the other distros on my HD, at least the ones I installed. Once again, thank you.
|
All times are GMT -5. The time now is 09:03 PM. |