[k3b] [Bug 367639] k3b fails to continue multisession (blue ray)

Thomas Schmitt via KDE Bugzilla bugzilla_noreply at kde.org
Sun Sep 18 13:48:39 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=367639

--- Comment #25 from Thomas Schmitt <scdbackup at gmx.net> ---
Hi,

i tested growisofs and separately running mkisofs/genisoimage/xorrisofs
on DVD+RW to show how i imagine this could be done in K3B:

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

# Create some input files
  echo file1 >file1
  echo file2_a_bit_larger >file2

# First session 

  genisoimage -R file1 | \
  growisofs -Z /dev/sr0=/dev/fd/0 

# This run reports:  176 extents written (0 MB)
# So i choose a deliberately high Next Writable Address:  1024

# mount(8) and ls(1) show one file in the ISO
#   -rw-r--r-- 1 thomas thomas 6 Sep 18 14:59 file1

# Second session (after unmounting /dev/sr0, of course)

  genisoimage -M /dev/sr0 -C 0,1024 -R file2 | \
  growisofs -use-the-force-luke=seek=1024 -C 0,1024 -Z /dev/sr0=/dev/fd/0 

# mount(8) and ls(1) show both files in the ISO
#   -rw-r--r-- 1 thomas thomas  6 Sep 18 14:59 file1
#   -rw-r--r-- 1 thomas thomas 19 Sep 18 14:59 file2

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

Both are needed: -use-the-force-luke=seek=1024 and -C 0,1024
Else mount(8) and ls(1) will show only file1 after the second session.
(I.e. without -C, growisofs does not update the superblock at offset 0.)

In the second run growisofs reports:
  About to execute 'builtin_dd if=/dev/fd/0 of=/dev/sr0 obs=32k seek=64'
  builtin_dd: 176*2KB out @ average 0.1x1352KBps
genisoimage reports:
  1200 extents written (2 MB)
We learn that genisoimage added 1024 and 176 in its message.
Suitable Next Writable Address would be any properly aligned value
not smaller than 1200.

So it would work with growisofs if K3B would compute its own Next Writable
Address and force it on genisoimage and growisofs.
For the sake of BD-RE performance and compatibility to my software i
sincerely advise to round up to full multiples of 32 blocks.
growisofs rounds to 16, which is not necessary aligned to a BD data
unit of 32 (aka "Cluster"). DVD has 16 blocks per "ECC Block".


Being selfish i show the cdrskin way:
-------------------------------------------------------------------

# Pseudo-blank the medium, so that cdrskin will not append its
# first session to the existing ISO filesystem.
# The same command blanks CD-RW and unformatted DVD-RW.
# It tolerates blank media and fails on non-blank non-blankable media.

  cdrskin --grow_overwriteable_iso dev=/dev/sr0 -v blank=as_needed

# First session. 
# Option --grow_overwriteable_iso lets cdrskin tolerate -multi on DVD+RW.
# (One cannot close a DVD+RW. So -multi is normally rejected.)

  genisoimage -R file1 | \
  cdrskin --grow_overwriteable_iso -multi dev=/dev/sr0 -v -eject -

# Inquire values for genisoimage -C.
# Option --grow_overwriteable_iso lets cdrskin inspect the ISO.
# Nevertheless this works too on sequential media:
#   CD-R[W], DVD-R[W], DVD+R, non-pseudo-overwritable BD-R.

  C_VALUES=$(cdrskin dev=/dev/sr0 --grow_overwriteable_iso -msinfo)

# Second session. Option --grow_overwriteable_iso lets cdrskin direct
# the burn run to the same address as predicted by the previous run
# and handed to genisoimage.

  genisoimage -M /dev/sr0 -C "$C_VALUES" -R file2 | \
  cdrskin --grow_overwriteable_iso -multi dev=/dev/sr0 -v -eject -

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

The advantage of this is that K3B does not have to inspect the ISO
and can operate any kind of media by the same cdrskin runs.


Have a nice day :)

Thomas

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the k3b mailing list