UUID -what is it and why is it a problem
From Linux Mint
This article is used so much used in support that it is locked from editing to avoid that it is destroyed.
Unfortunately we even had the entire howto section of the wiki destroyed once and parts of it several times.
If you want to contribute please do so in the discussion tab and if it is good I will include it in the main article /husse
Take a look at the "discussion" page where the method of using labels are described. Be aware that it may have some drawbacks - don't attempt to relable a partition, that may end in failure.
If you look through the forum you will see a plethora of posts where the suggested solution is to stop using UUID to identify hard disks and use the "oldfashioned" /dev/sdx instead (X of course the appropriate number for the partition
Contents |
What is it
It's a Universally Unique IDentifier, standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE). A UUID consists of 32 hexadecimal digits, displayed in 5 groups separated by hyphens, for a total of 36 characters. For example:
550e8400-e29b-41d4-a716-446655440000
To learn more visit the UUID wiki [1]
So far so well.
What is it good for?
If you boot from different disks you may get another /dev/_something_ than if you boot from one disk.
If you have SATA it seems that their logical order can change randomly (?) and then you get "another /dev/_something_" just like above
"another /dev/_something_" /dev/sda1 or /dev/sdb1 or...or...
Why does UUID create a problem?
The UUID for a hard disk or partition is calculated from it's properties, size, file system, it's place relative to other partitions and maybe more.
So if you change a partition and/or change other partitions the UUID changes too. Then when you try to boot it fails - your (root) partition has got a new name (new UUID) but neither /boot/grub/menu.lst or /etc/fstab has changed. In essence you try to use a non existent drive!
What can you do about it?
Unfortunately nothing - you can't stop this from happening and Ubuntu and other distributions seems to want to use it.
But luckily there is a workaround.
An entry in fstab looks like this (everything behind # is a comment):
# /dev/sda6 UUID=242a97c5-916c-4c76-b403-a390ef292e39 /home ext3 defaults 0 2
As you see the /dev/sdax number is put above the active entry. So you change it like this:
# /dev/sda6 #UUID=242a97c5-916c-4c76-b403-a390ef292e39 /dev/sda6 /home ext3 defaults 0 2
I prefer to keep the UUID as a comment, but you could just delete it. In menu.lst you make the same kind of change, like this:
title Linux Mint, kernel 2.6.20-16-generic root (hd0,1) kernel /boot/vmlinuz-2.6.20-16-generic root=/dev/sda2 ro quiet splash initrd /boot/initrd.img-2.6.20-16-generic quiet savedefault
Note the difference in the lines "root" and "kernel".
In the line "root" it's the way grub works. Grub starts from zero and always uses hd. So the one in (hd0,1) is sda2.
Here I've removed the UUID
This is the default in Mint from Celena
How can I change that if I can't boot
Boot from the live CD - it mounts disks automatically now. If not open gparted and right click on the disk then choose the mount option

