Identifying disks by UUID

To get a the UUID of a disk, do

$ sudo blkid /dev/sdb1
/dev/sdb1: UUID="a48cf280-fcc7-4283-ab31-5a23440bd2fa" TYPE="ext4" 

Now you can refer to the device as /dev/disk-by-uuid/xxx. Or you can mount by UUID from fstab as follows:

UUID=a48cf280-fcc7-4283-ab31-5a23440bd2fa /external     ext4    rw,user,noauto

Comentarios

Comments powered by Disqus