UDF v2.5 in head - for testing please

Waitman Gobble gobble.wa at gmail.com
Sat Jul 4 19:13:17 UTC 2015


Hi,

here's a patch against r285141

https://gist.github.com/waitman/07849a747d0d633a7009

It provides UDF v2.5 support to 'mount',

This driver could be useful in setting up a 'cold storage' system, or to
read a Blu-ray disc created for backup purposes.

UDF2.5 driver notes - FreeBSD-11.0-Current patch

This driver was originally ported over from NetBSD some years ago, as
a GSOC project, and updated by William Devries for FreeBSD 10.0 Current
about 2 years ago (i think work was on 10 then). I updated the source
to build on FreeBSD-11.0-Current. It's a cut down and simplified
version of the NetBSD driver, and is useful for mounting and reading
UDF v2.5 Blu-ray discs. The current NetBSD driver provides write support,
however it seems to me not necessary (see write examples below).

My goal wasn't to provide a way to 'play' encrypted Blu-ray discs, however
the driver has been tested successfully on non-encrypted commercial discs.
(I understand production runs less than 300 units are typically not encrypted,
at least that's my experience. I've been told by powers that be that if a person
produces over 300 units then they _must_ be encrypted due to patent licensing.
Perhaps that's true.)

You can mount an encrypted disc and look at the file system, however I believe
you must make use of aacs library and keys, to actually play an encrypted disc.

The software creates the 'mount_udf2' program, located in /sbin, and two
kernel modules, udf2.ko and udf2_icon.ko, located in /boot/kernel. There
are adjustments made to /sbin/mount to add udf2 switch. Also support added
to scsi.


1) Create an iso file of the "Music" directory

# mkisofs -R -J -joliet-long -udf -iso-level 3 -o Music.iso Music

the -joliet-long switch allows for filenames which do not conform to
the ancient 8.3 standard.


2) Burn Blu-ray disc (set speed to device/disc caps)

install ports/sysutils/dvd+rw-tools

# growisofs -speed=4 -dvd-compat -Z /dev/cd0=music.iso

Note: burning blu-ray disc on drive connected over SATA, writing 10GB
iso takes about 30 minutes. There appears to be some issue burning on
drive connected over USB 3.0, it is very slow and reportedly will take
1 to 7 days to complete. An issue that perhaps needs to be investigated,
however it's not really relevant to the UDF2 driver. Perhaps it's
missing firmware, or a faulty drive I'm using.

The -dvd-compat switch tells growisofs to close the session on the disc.


3) Mount disc

# mkdir /br
# mount_udf2 /dev/cd0 /br
(or)
# mount -t udf2 /dev/cd0 /br

4) Play video disc mounted on /br using mplayer (mplayer needs libbluray
support compiled in)

# mplayer br:////br -zoom -fs

Note: I'm mounting to /br because my recollection is that aacs library seems
to depend on that mount point, if trying to read/play encrypted blu-ray
disc. This may not be accurate, I haven't tested for some months.
The way to play an encrypted blu-ray disc is to use aacs library and
have access to the corresponding key files.

I only mention playing encrypted discs because I presume that will be
something a user wishes to accomplish, and be disappointed right off the bat,
however a few points -
it seems not a trivial task to access the necessary encryption keys,
and it's probably IMHO not worth the trouble to get it working. It's more
productive to play your movies in a $50 player, in my opinion.

I'm presuming it is trivial to make a backup of an encrypted blu-ray disc,
either by a sector dump or just simply mirroring the filesystem, however
I have not tried. It seems the video files on the disc are encrypted, not the
filesystem.

However, I think having UDFv2.5 read support is useful for file backups,
and developing cold storage systems using FreeBSD.


As a 'sanity' test, I used a BD disc created on FreeBSD, opened on an MS
Windows machine, seems like it works.

https://www.dropbox.com/s/5hoib3tzs819zb9/sshot-drive-bd.png?dl=0
https://www.dropbox.com/s/o7jngsqgg6dgb3k/sshot-drive-bd-play.png?dl=0




error reports/Comments/suggestions/improvements are appreciated.
Thanks,

-- 
Waitman Gobble
Los Altos California USA
650-999-0406


More information about the freebsd-fs mailing list