a UUID is a rather long identifier for a disk partition. Every disk partition has its own unique UUID. In Ubuntu, the UUID for partitions must be correctly specified in two files: /boot/grub/menu.lst and /etc/fstab. Sometimes errors occur during boot up eg after partition changes or formatting cause changes to the UUID. Correction is often simply a matter of editing files to reflect the correct UUID designations.
First... Files which may need to be edited include /boot/grub/menu.lst and /etc/fstab. It's a good idea to back up these important files first
sudo cp /etc/fstab /etc/fstab.bk1
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bk1
To find out the UUID for each partition, in a terminal type:
sudo blkid
This will show the current UUID and the device designation for each drive recognised by the BIOS. The partition does not need to be mounted - it will appear here in any case.
To list all partitions on all drives:
sudo fdisk -l
This will show the partition information for each drive, and each partition. You can recognise which partition is which on the basis of its size, format and the drive designation. Once again, the partition does not need to be mounted; all partitions will be listed irrespective. The 'fdisk' command does not show the UUID of partitions but we already have that from the 'sudo blkid' command.
To find out where partitions are mounted now:
mount
To show/edit default mount points:
cat /etc/fstab
sudo gedit /etc/fstab
This will show where partitions are mounted during boot. You may wish to use a text editor other than gedit of course (eg kate, mousepad, vi, nano, mcedit etc). The UUID or device name shown in the relevant line in fstab must correlate with the partition information given by 'fdisk' and 'blkid'.
To show/edit where Grub is directing the boot process:
cat /boot/grub/menu.lst
sudo gedit /boot/grub/menu.lst
Towards the end of the menu.lst file you will see entries correlating to those you see in Ubuntu's start up or boot menu, (which only appears if enabled). The UUID for the respective partition, which appears in /boot/grub/menu.lst, must be that shown by 'sudo blkid'.
Note: Drive and partition numbering in Grub language starts at 0, whereas the numbering for the Ubuntu operating system starts at "a" or 1. Thus "root (hd0,0)" would be Grub's reference to the first partition on the first drive, ie device "/dev/sda1". Likewise for example "root (hd1,2)" would refer to "/dev/sdb3".
Some examples from laptop:
Extract from output of 'sudo blkid':
/dev/sda1: UUID="73d8bfea-01e8-4f65-8efe-99265ce849db" TYPE="ext2"
/dev/mmcblk0p1: UUID="24672713-fb81-47f5-8190-f8f88529ac44" TYPE="ext2"
/dev/sdb1: LABEL="LaCie" UUID="6853-5BA9" TYPE="vfat"
/dev/sdb2: UUID="c85eeef7-1599-4be8-a5b8-9d3f673db526" TYPE="ext2"
Shows me the UUID and format type for the partitions on several disks on my laptop.
Extract from output of 'sudo fdisk -l':
Disk /dev/sda: 8069 MB, 8069677056 bytes
255 heads, 63 sectors/track, 981 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a34c8
Device Boot Start End Blocks Id System
/dev/sda1 * 1 981 7879851 83 Linux
(Other lines deleted for brevity)
Shows me the size and format information for my partitions .
Extract from output of 'mount':
/dev/sda1 on / type ext2 (rw,noatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-19-generic/volatile type tmpfs (rw)
/dev/mmcblk0p1 on /home type ext2 (rw,noatime)
/dev/sdb1 on /media/sdb1 type vfat (rw,noexec,nosuid,nodev,dmask=0000,fmask=1111,uid=1000,gid=1000)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
(Other lines deleted for brevity)
Shows (amongst other things) that my partition /dev/sda1 is mounted on the root file system "/" and that my /dev/mmcblk0p1is mounted on "/home".
Extract from output of 'cat /boot/grub/menu.lst':
(Lots of lines deleted for brevity)
title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=73d8bfea-01e8-4f65-8efe-99265ce849db ro quiet
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=73d8bfea-01e8-4f65-8efe-99265ce849db ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
(Other lines deleted for brevity)
Here:
* 'title' is the relevant line as displayed in the Grub menu
* 'root' is the partition where grub will look for the boot files (and remember (hd0,0) refers to /dev/sda1)
* 'kernel' is the path where grub will look for the kernel file
* 'initrd' is the path where grub will look for the file system image file
Feed