Partition UUIDs in Linux

Tagged:  •    •  

In the latest version of Ubuntu I noticed that partitions in fstab are referred using UUIDs instead of device names. If you want to find out the UUID for an existing partition then you can use a couple of rather obscure commands: blkid and vol_id.

blkid can be run as a regular user and without arguments will list all partitions and the corresponding UUIDs and labels. It can also be used to search for a partition if you know the UUID.

vol_id has to be run as root and you have to specify a partition.

UPDATE: You can also use tune2fs -l, as root.

UPDATE2: You can also use udevinfo as described in this blog post:
http://www.joeblog.info/index.php?/archives/369-guid.html

Technorati Tags:

Reply

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options