How to find the UUID of a device in Ubuntu

This is useful if changes are made to the partition table or a new hard drive is added to the computer. When the UUID(s) change an error will be caused during boot. Pressing <Ctrl>-D will allow the boot to continue but to fix the problem you’ll need the UUID of the device.

sudo nano /etc/fstab

In another terminal run this commmand:

ls -l /dev/disk/by-uuid/
Or you can type this to list all of your devices:

blkid

  • Compare the UUID’s and any that are different in fstab from the list must be changed. The easiest way is copy and paste.
  • Some other things may have to be edited as well like the mount point, type (ext2, ext3, ntfs, etc) , options, dump, pass, etc.

To list the UUID of a specific device: sudo vol_id -u device

  • Where device might be /dev/sdxy.

Example: sudo vol_id -u /dev/sda1


Related Posts

Tags: , ,

Leave a Reply

You must be logged in to post a comment.