#38 -o lastblock= needed to mount bootable ISO/UDF

Pat LaVarre

With a bootable ISO/UDF disc ...

Auto mount fails.

Explicit mount -t iso9660 works, but explicit mount -t
udf fails.

Explicit mount -t -o lastblock= works, but making
lastblock= always automagic in user land precludes
mounting other filesystems e.g. FAT.


is a (perhaps completely bogus hack of a) patch that
fixes this, by calling udf_get_last_block(sb) before
udf_find_anchor(sb) in super.udf_fill_super.

Is that legit? Should we fold that patch into the
kernel.org fs/udf? Or should we fix the official
fs/udf/ in some other way?

The particular bootable ISO/UDF disc I tried was a UDF
Iomega REV disc from Windows with a Knoppix Linux ISO.
The phgfsck seemed to like it. Its two AVDP were at
the end of the disc, placed relative to the lastblock
(a.k.a. the max LBA).

Low priority because as yet no developer has expressed

Also low priority because only automagic plug 'n play
breaks. The few people on Earth who understand this
issue can get by with such obvious user-level
workarounds as:

lb="`dc -e \"\`sudo blockdev --getsize /dev/scd$n\` 4 /
1 - p\"`"
sudo mount -r -t udf -o lastblock="$lb" /dev/scd$n


  • Pat LaVarre

    Pat LaVarre - 2004-08-13

    Logged In: YES

    Maybe when attached as a comment, those example lines stay
    complete, rather than being line broken:

    sudo blockdev --getsize /dev/scd$n
    lb="`dc -e \"\`sudo blockdev --getsize /dev/scd$n\` 4 / 1 -
    sudo mount -r -t udf -o lastblock="$lb" /dev/scd$n /mnt/scd$n

    I think blockdev --getsize is not completely reliable, it
    may need an open attempt, such as a failed mount, to get it
    to report correctly.

  • Pat LaVarre

    Pat LaVarre - 2004-08-17

    Logged In: YES

    I guess what we found here was a UDF host that in fact fails to see UDF
    AVDP near the end of the disc when an ISO VRS appears near the front
    of the disc. We could work harder to prove that theory by trying Linux
    mount and mount -t udf before and after we erase those ISO VRS, as
    well as repeating/ completing our past experiments with mount and
    mount -t udf before and after we erase various UDF AVDP.


Log in to post a comment.