Drives Mounted as Odd IDs? (UUID)

If your drives are showing up as long IDs that look similar to "5f3d2340-b3c7-4c47-ba9a-ceaa9e699a4f" (from df -T command), there are a number of things that may have caused this. I've found that if my partitions are all labeled and the nodiskmount flag is still present in my grub configuration, then I no longer have this problem.

Using the following command we can get a better understanding of your drive/partition setup:

df -T

These are my results (when I had the nodiskmount flag removed from grub configuration):

Filesystem    Type   1K-blocks      Used Available Use% Mounted on
rootfs      rootfs    56872244   2022772  51960512   4% /
none      devtmpfs      894732       300    894432   1% /dev
              ext4    56872244   2022772  51960512   4% /
none         tmpfs      901168         0    901168   0% /dev/shm
none         tmpfs      901168       296    900872   1% /var/run
none         tmpfs      901168         0    901168   0% /var/lock
none         tmpfs      901168         0    901168   0% /lib/init/rw
/dev/sdb2  fuseblk    80273432  22947008  57326424  29% /media
/dev/sda1     ext3      252960    122460    130496  49% /media/5f3d2340-b3c7-4c47-ba9a-ceaa9e699a4f
/dev/sda3     ext3   1441394492 1385659152  55735336  97% /media/762f5413-c63e-4021-905d-d0ccf2b834a1
/dev/sdb5     ext4    56872244   2022772  51960512   4% /media/a411b98b-90c0-4f0c-bbbc-abfbdd767af0
/dev/sdc1  fuseblk   2930255996    390640 2929865356   1% /media/FreeAgent GoFlex Drive

If you want your partitions to show up as user friendly names, you may need to setup labels on your partitions. Using the results of the df -T command from above, you can use the e2label command to rename the partition. For example, if I want to change the label of the partition being mounted at "/media/5f3d2340-b3c7-4c47-ba9a-ceaa9e699a4f", I would run the following command:

sudo e2label /dev/sda1 newlabel

Reboot and if your system is setup to use labels for auto-mounting, you will now see friendly mount names. (Note: in 10.04 / grub2 I had to put the nodiskmount flag back into my grub configuration -- the reverse of this post)

FStab (usually not necessary unless you want to control the mount points manually)

If this doesn't work, you may need to manually setup the mount points using fstab. Open fstab for editing:

sudo nano /etc/fstab

Create a folder to mount to:

sudo mkdir /media/mountname

Create a new line that uses the following format.

UUID={deviceUUID} /media/{mountname} {fstype} defaults 0 0

You should be able to get the UUID and fstype from the df -T command we ran above. Alternatively, you can use the blkid command to get the UUID of the partitions:

sudo blkid

Produces these results:

/dev/sda1: LABEL="PopcornFS1" UUID="5f3d2340-b3c7-4c47-ba9a-ceaa9e699a4f" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda2: TYPE="swap"
/dev/sda3: LABEL="15TBWhiteCase" UUID="762f5413-c63e-4021-905d-d0ccf2b834a1" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb1: LABEL="PQSERVICE" UUID="A2AEC69CAEC667FD" TYPE="ntfs"
/dev/sdb2: UUID="FA5C84A15C845A71" TYPE="ntfs"
/dev/sdb5: LABEL="PopcornFS2" UUID="a411b98b-90c0-4f0c-bbbc-abfbdd767af0" TYPE="ext4"
/dev/sdb6: UUID="938bcf0e-bec1-4026-8256-d3f3184ad9a1" TYPE="swap"
/dev/sdc1: LABEL="FreeAgent GoFlex Drive" UUID="4AD4F3FBD4F3E6DB" TYPE="ntfs"

Example complete fstab entry:

UUID=762f5413-c63e-4021-905d-d0ccf2b834a1 /media/mydrive ext3 defaults 0 0

Reboot your machine and you should now see your devices being mounted in the locations you defined.

Update: Check out my Avoid the "S to Skip" message in Ubuntu article to see how to avoid the annoying wait message you'll see if your drive isn't present on boot up.

  • Additionally, I wanted to add that you can use the fstab method to manually give permission to USB drives with the NTFS filesystem. (they may show up as fuseblk) You can do this by adding the umask parameter. Additionally, you can specify a group of users to give access to. See below for an example fstab line:

    UUID=4AD4F3FBD4F3E6DB    /media/3TBSG    ntfs-3g    defaults,umask=002,gid=users    0 0

    ...more specifically, you may want to do this if you want to give permission to other service accounts like apache.

  • You may also be interested in my post about automounting drives ([url][/url]).

  • Alex Chong

    Thanks for this, spent ages trying to get it sorted. It appears that the flag 'default' should in fact be 'defaults'

  • Thanks for the comment, Alex. I've updated the blog post to add the 's' per your comment. (eg. defaults)

  • If you are trying to use the e2label method on an NTFS formatted drive (fuseblk), you will be presented with an error indicating something like:

    e2label: Bad magic number in super-block while trying to open /dev/sdb1
    Couldn't find valid filesystem superblock.

    You will need to first unmount the drive:
    sudo umount /dev/sdb1/

    Then use the ntfslabel utility from ntfsprogs:
    sudo ntfslabel /dev/sdb1/ YourNewLabel

Add comment

About Me

Josh Lyon Profile Picture

Name: Joshua Lyon
Birthday: August 8, 1985
Location: Valley Ranch (Irving), TX
E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
ProfilesGoogle, Twitter