My /etc/fstab contains this:

# / was on /dev/sda1 during installation
UUID=77d8da74-a690-481a-86d5-9beab5a8e842 /               ext4    errors=remount-ro 0       1

There are several other disks on this system, and not all disks are being mounted to the correct location (For example, /dev/sda1 and /dev/sdb1 are sometimes reversed).

How can I see the UUIDs for all disks on my system? Can I see the UUID for the third disk on this system?

link|improve this question

feedback

2 Answers

up vote 8 down vote accepted

In /dev/disk/by-uuid there are symlinks mapping each drive's UUID to its entry in /dev (e.g. /dev/sda1)

link|improve this answer
It's not readable when LVM partitions. – Grzegorz Wierzowiecki Sep 18 '11 at 21:22
feedback

There's a tool called blkid,

$ blkid /dev/sda1
/dev/sda1: LABEL="/" UUID="ee7cf0a0-1922-401b-a1ae-6ec9261484c0" SEC_TYPE="ext2" TYPE="ext3"

you can check this link for more info

http://liquidat.wordpress.com/2007/10/15/short-tip-get-uuid-of-hard-disks/

link|improve this answer
I like blkid, especially when LVM2. – Grzegorz Wierzowiecki Sep 18 '11 at 21:23
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.