Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Guys, thanks for the replies. You have been most helpful.
@syg00,
Quote:
1) no - but you could revert to device nomenclature and save future heart-burn.
2) read this.
How to use device nomenclature? I could really do with this since other people are messing around with my computer. I looked at the Grub 2 files mentioned in the article but none of them refer to the swap partition. I therefore take it I don't need to make any changes in Grub 2, only in fstab.
@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.
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:
# / was on /dev/sda9 during installation
UUID=7b4679af-0485-4089-ad81-51aa44413c6d / ext4 errors=remount-ro 0 1
# swap was on /dev/sda2 during installation
UUID=1a33c0d8-d83e-47ad-a4ac-d8c5e95f2544 none swap
If I remove the # on the two lines and put the # before the two UUID=, will it work?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.