Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my search for the ideal filesystem to share files between a lot of computer with a lot of different OS'es I accepted this answer and installed a UDF filesystem on my USB stick.

First I blanked the disk, to make sure there are no leftovers to confuse a system that's reading the drive:

dd if=/dev/zero of=/dev/sdb bs=1M

Then I formatted the drive, using udftools from arch linux's AUR:

sudo mkudffs --media-type=hd --blocksize=512 /dev/sdb

Obviously, the drive was in /dev/sdb.

Now my question is, since the drive doesn't have any traditional partitions or even a partition table as far as I know, it does not have a UUID. Therefore, I can not add it to the fstab, which I find rather annoying.

What can I do to fix this (e.g. is there an alternative way to set default mount point and options, or an alternate partitioning option)?

share|improve this question
You object to using /dev/sdb in the first field? – Kyle Jones Apr 8 '12 at 0:31
@KyleJones, a USB stick is unlikely to have a consistent /dev/sdX name. – cjm Apr 8 '12 at 4:36
Are you sure it doesn't have a UUID? Try running blkid without any options – Jodie C Apr 8 '12 at 4:49
@cjm Most of the time it will. The few other times the mount will fail. – Kyle Jones Apr 8 '12 at 5:49
up vote 3 down vote accepted

Choose a blocksize of at least 2K (which is the default) and add --vid= to your mkudffs parameters. (The blkid from util-linux doesn't seem to cope with smaller blocksizes.)

$ mkudffs --media-type=hd --vid=my-drive /dev/sdj
$ blkid /dev/sdj
/dev/sdj: LABEL="my-drive" TYPE="udf"

Now you can use LABEL=my-drive in /etc/fstab.

share|improve this answer
although the other answers were correct too, this one gave me the most hands on approach, so I chose it. – romeovs Apr 8 '12 at 10:41
For those who, like me, don't know how to mount a drive by label, see here. – RolfBly May 29 '15 at 20:08

If you need blocksize=512 for Windows compatibility, there is a fix to util-linux that updates blkid to recognize vid as label on any block size. It has not gotten into a released version yet; it was committed on March 1, 2013. There is also a bug in the udf kernel module that prevents it from using a partition larger than 128G - the fix for that was committed to mainline in early February and has just been committed to the 3.0-stable, 3.4-stable, and 3.8-stable branches.

share|improve this answer

Alternatively, you can put on an FS label, and then mount using the LABEL= option. This definitely works, but it doesn't meet your UUID criteria.

share|improve this answer

Well, UUID is not a parition-only attribute, actually.

man mkudffs mentions:

  • --lvid=logical-volume-ident — Specify the logical volume identifier.
  • --vid=volume-ident — Specify the volume identifier.
  • --vsid=volume-set-ident — Specify the volume set identifier.

Have you tried using any of it?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.