XBMC Live Drives Mounted as Odd IDs

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 /dev/disk/by-uuid/a411b98b-90c0-4f0c-bbbc-abfbdd767af0               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.


Posted

in

by

Comments

5 responses to “XBMC Live Drives Mounted as Odd IDs”

  1. josh Avatar
    josh

    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:
    [code]UUID=4AD4F3FBD4F3E6DB /media/3TBSG ntfs-3g defaults,umask=002,gid=users 0 0[/code]

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

  2. josh Avatar
    josh

    You may also be interested in my post about automounting drives ([url]http://boshdirect.com/blogs/tech/set-xbmc-to-automount-drives.html[/url]).

  3. Alex Chong Avatar
    Alex Chong

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

  4. josh Avatar
    josh

    Thanks for the comment, Alex. I’ve updated the blog post to add the ‘s’ per your comment. (eg. default[b]s[/b])

  5. josh Avatar
    josh

    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:
    [code]e2label: Bad magic number in super-block while trying to open /dev/sdb1
    Couldn’t find valid filesystem superblock.[/code]

    You will need to first unmount the drive:
    [code]sudo umount /dev/sdb1/[/code]
    Then use the ntfslabel utility from ntfsprogs:
    [code]sudo ntfslabel /dev/sdb1/ YourNewLabel[/code]

Leave a Reply

Your email address will not be published. Required fields are marked *