[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Request for advise with mounting particular ISO 9660 sessions



Hi,

looking over the system dependencies in our
project i come to the xorriso mount helper.

It reads the table-of-content of multi-session
media or files and produces a mount command
for mounting a particular session.
Typically used to retrieve older states from
multi-session backups.

I read from the porting instructions that i
shall assume userland to be like Linux.
But this line is a bit obscure to me:

  Example of uname check: Linux|GNU|GNU/*)

I could need an example of the string which
  uname(&uts);
returns as
  uts.sysname

Currently recognized: "FreeBSD" and "Linux".


Another question is the mount command option
by which one can address a non-default superblock
in an ISO 9660 image.
On Linux:    mount -t iso9660 -o sbsector=...
On FreeBSD:  mount_cd9660 -s ...

Given we have an ISO 9660 image with several
sessions of which one starts at block number
122880, would this Linux shell command work for
the superuser ?
 
  mount -t iso9660 \
        -o nodev,noexec,nosuid,ro,sbsector=122880 \
       /dev/cd0 /mnt

On FreeBSD xorriso would issue this line

  mount_cd9660 -o noexec,nosuid -s 122880 \
               /dev/cd0 /mnt


PS:
I am subscribed now. No need to Cc me any more.


------------------------------------------------

The following are test proposals for the case
that my question cannot be answered flatly.


The mount commands mount the last session on CD
by default. The first session has block address
0.  So at least this one is easy to find on any
multi-session CD.
Linux:     -o sbsector=0
FreeBSD:   -s 0

Typically you will see more files in the last
session than in the first session.


A multi-session CD-RW is traditionally produced
by interaction of mkisofs and cdrecord.
First session:

  mkisofs -graft-points \
          /tree1=prepared_for_iso/tree1 | \
  cdrecord -v dev=/dev/cd0 blank=fast -multi -eject -

Follow-up session:

  m=$(cdrecord dev=/dev/cd0 -msinfo)
  mkisofs -graft-points -M /dev/cd0 -C $m \
          /tree2=prepared_for_iso/tree2 | \
  cdrecord -v dev=/dev/cd0 -waiti -multi -eject -

"mkisofs" and "cdrecord" stand for the originals
or for compatible programs like genisoimage, wodim,
xorriso -as mkisofs, cdrskin.


The Debian xorriso package can produce
multi-session ISO images in disk files.
For mount, this should make no difference.

First session:

  xorriso -dev /tmp/image.iso -blank as_needed \
          -map prepared_for_iso/tree1 /tree1

Follow-up session:

  xorriso -dev /tmp/image.iso \
          -map prepared_for_iso/tree2 /tree2

Here the first session begins at block 32.
At block 0 there is a superblock copy of the
last session. ("superblock" means System Area
plus Volume Descriptors. Usually 18 blocks.)


When mounting sbsector=0 on CD resp. sbsector=32
in disk file you should only see /mnt/tree1.
When mounting with no sbsector option you should
see both, /mnt/tree1 and /mnt/tree2.


------------------------------------------------


Have a nice day :)

Thomas


Reply to: