[Debburn-devel] mkisofs
Thomas Schmitt
scdbackup at gmx.net
Thu Nov 25 08:16:17 UTC 2010
Hi,
> mkisofs -r -J -C `cdrecord dev=0,3,0 -msinfo` -M /dev/cdrw -o immagine3.iso
> path3 ---------> ERROR : genisoimage: Invalid argument. Seek error on old
> image
>
> If i eject the cd then insert it again the comand mkisofs -r -J -C `cdrecord
> dev=0,3,0 -msinfo` -M /dev/cdrw -o immagine3.iso path3 don't get the error.
This is a well known problem at least on Linux kernels.
The reason is that a burn program has to use the SG_IO driver for
writing data onto media, whereas mkisofs uses the POSIX functions
of the block device driver for reading the old directory tree.
Both are not coordinated. The block device driver does not watch
the activities of the burn program and has no indication that the
read capacity of the media was enlarged.
In growisofs.c there are traces of ioctl(CDROM_MEDIA_CHANGED) and
ioctl(BLKFLSBUF) which obviously are supposed to tell the driver
that something changed. But for me they never did work.
So unload-reload is the only reliable means to force the block
device driver into re-assessing the media's readable capacity.
(You may use cdrecord option -eject to get the unload and
shell command eject -t to get the media loaded again.
Best with a short sleep inbetween.)
My own solution in xorriso is to use libburn for writing, reading and
drive inquiry. libburn does optical drive operations via SG_IO.
So in xorriso's native mode there is no driver mix, no trouble with
multi-session, and no need to ask a burn program for -msinfo.
In xorriso's mkisofs emulation there are of course the same problems
as with mkisofs or genisoimage.
Have a nice day :)
Thomas
More information about the Debburn-devel
mailing list