UDF – Using UDF and fstab Without UUID

filesystemsfstabudf

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)?

Best Answer

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.

Related Question