genisoimage creates bad iso images if joliet is used - error: "Unexpected joliet directory length" appears

Bug #187459 reported by Mantas Kriaučiūnas
8
Affects Status Importance Assigned to Milestone
Feisty Backports
Invalid
Undecided
Unassigned
cdrkit (Baltix)
Fix Released
Medium
Unassigned
cdrkit (Debian)
Fix Released
Unknown
cdrkit (Ubuntu)
Fix Released
High
Unassigned
Nominated for Gutsy by Mantas Kriaučiūnas

Bug Description

Since Ubuntu 7.04 (Feisty, genisoimage version 1.1.6) CD burning causes a lots of problems for me and my friends - in lots of cases genisoimage creates bad iso images if joliet is used - error: "Unexpected joliet directory length" appears:

ubuntu@baltix:/mnt/SVARBU-Manto$ sudo genisoimage -r -V "Baltix-Linux-3.1bm 2008-01" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o Baltix.iso Baltix-3-CD/CD/
I: -input-charset not specified, using utf-8 (detected in locale settings)
Using MANO_NUMERIS_LOGO000.GIF;1 for Baltix-3-CD/CD/pics/remejai/mano_numeris-logo.gif (mano_numeris_logo.gif)
Using MANO_NUMERIS_LOGO000.GIF;1 for Baltix-3-CD/CD/pics/remejai/thumbs/mano_numeris-logo.gif (mano_numeris_logo.gif)
Using UBUNTU_LT_INSTALLATION_S000.PNG;1 for Baltix-3-CD/CD/doc/Baltix-Ubuntu-Linux-diegimas_failai/Ubuntu_LT_installation_step_6_-_sukurti-naudotoja.png (Ubuntu_LT_installation_step_7_-_santrauka-patvirtinimas.png)
Using UBUNTU_LT_INSTALLATION_S001.PNG;1 for Baltix-3-CD/CD/doc/Baltix-Ubuntu-Linux-diegimas_failai/Ubuntu_LT_installation_step_7_-_santrauka-patvirtinimas.png (Ubuntu_LT_installation_step_1_-_pasirinkti-kalba.png)
Using UBUNTU_LT_INSTALLATION_S002.PNG;1 for Baltix-3-CD/CD/doc/Baltix-Ubuntu-Linux-diegimas_failai/Ubuntu_LT_installation_step_1_-_pasirinkti-kalba.png (Ubuntu_LT_installation_step_3_-_klaviaturos-isdestymas.png)
Using UBUNTU_LT_INSTALLATION_S003.PNG;1 for Baltix-3-CD/CD/doc/Baltix-Ubuntu-Linux-diegimas_failai/Ubuntu_LT_installation_step_3_-_klaviaturos-isdestymas.png (Ubuntu_LT_installation_step_4_-_paruosti-vieta-diske.png)
Using UBUNTU_LT_INSTALLATION_S004.PNG;1 for Baltix-3-CD/CD/doc/Baltix-Ubuntu-Linux-diegimas_failai/Ubuntu_LT_installation_step_4_-_paruosti-vieta-diske.png (Ubuntu_LT_installation_step_5_-_importuoti-esamus-naudotojus.png)
Using LINUX_WINDOWS_NAUDOJIMAS000.PNG;1 for Baltix-3-CD/CD/doc/Linux-Windows-naudojimas-tinkle/Linux_Windows_naudojimas_tinkle-SAMBA_html_m74e24fb4.png (Linux_Windows_naudojimas_tinkle-SAMBA_html_64b2cbe6.png)
Using LINUX_WINDOWS_NAUDOJIMAS001.PNG;1 for Baltix-3-CD/CD/doc/Linux-Windows-naudojimas-tinkle/Linux_Windows_naudojimas_tinkle-SAMBA_html_64b2cbe6.png (Linux_Windows_naudojimas_tinkle-SAMBA_html_m397604df.png)
Size of boot image is 4 sectors -> No emulation
genisoimage: Unexpected joliet directory length 1112 expected: 1116 ''
  1.40% done, estimate finish Thu Jan 31 03:34:32 2008
  2.78% done, estimate finish Thu Jan 31 03:34:32 2008
[..]

This bug is not 100% reproducible, but it appears very often for me and others - it seems Joerg Schilling (original author of cdrecord software) is right - "the debian/ubuntu program (genisoimage) is a bad hack on a 2 year old version of mkisofs":

From: <email address hidden> (Joerg Schilling)
> To: <email address hidden>
> Subject: invalid Joliet table (was: genisoimage creates invalid iso images)
> Date: Sat, 14 Jul 2007 22:13:49 +0200
>
> do not expect to get any useful answer/help for your Debian bugreport. The projct is dead.
>
> BTW: I cannot see any problems with your data using a recent original software:
>
> http://cdrecord.berlios.de/
> ftp://ftp.berlios.de/pub/cdrecord/alpha/
>
> The debian program is a bad hack on a 2 year old version of mkisofs.

When I downgraded to genisoimage 1.1.2-1 then this problem dissapears, like in other cases, described in debian bugs.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430558 :

Subject: genisoimage: Unexpected joliet directory length - this important bug is a duplicate of bug #429244

I also several times meet with the same problem in Ubuntu 7.04 and 7.10,
which uses the same version of genisoimage package - 1.1.6. The same error
message during genisoimage run:
"Unexpected joliet directory length" and the same problems, like
described in Debian bugs #429244 and #430558 :

From: Julian Andres Klode <email address hidden>
>To: <email address hidden>
>Subject: invalid Joliet table (was: genisoimage creates invalid iso images)
>Date: Sun, 08 Jul 2007 15:03:43 +0200
>
> It seems to me that the Joliet table is invalid.
>
> $ isoinfo -Jf -debug -i image.iso
> Joliet escape sequence 0: '%' 1: '/' 2: 'E' 3: ''
> /..
> /
> isoinfo: Short read on old image
>
> But "$ isoinfo -Rf -debug -i image.iso" works (Rock Ridge)
>
> $ isoinfo -J -d -debug -i image.iso
> CD-ROM is in ISO 9660 format
> System id: LINUX
> Volume id: Debian unstable i386
> [..]
> Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993
> E.YOUNGDALE (C) 1997-2006
> J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM
> [..]
> Volume set size is: 1
> Volume set sequence number is: 1
> Logical block size is: 2048
> Volume size is: 376104
> Root directory extent: 57 size: 2048
> Path table size is: 11702
> L Path table start: 21
> L Path opt table start: 0
> M Path table start: 27
> M Path opt table start: 0
> Creation Date: 2007 07 07 20:51:50.00
> Modification Date: 2007 07 07 20:51:50.00
> Expiration Date: 0000 00 00 00:00:00.00
> Effective Date: 2007 07 07 20:51:50.00
> File structure version: 1
> El Torito VD version 1 found, boot catalog is in sector 1671
> Joliet escape sequence 0: '%' 1: '/' 2: 'E' 3: ''
> Joliet escape sequence 0: '%' 1: '/' 2: 'E' 3: ''
> Joliet with UCS level 3 found
> Rock Ridge signatures version 1 found
> Eltorito validation header:
> Hid 1
> Arch 0 (x86)
> ID ''
> Key 55 AA
> Eltorito defaultboot header:
> Bootid 88 (bootable)
> Boot media 0 (No Emulation Boot)
> Load segment 0
> Sys type 0
> Nsect 4
> Bootoff 688 1672

When I downgraded to version 1.1.2-1 then this problem dissapears, like in other cases, described in debian bugs.

Btw, it seems this important bug is a duplicate of bug #429244 :

From: Richard Kralovic <email address hidden> wrote:
>To: <email address hidden>
>Subject: genisoimage: Unexpected joliet directory length
>Date: Tue, 18 Sep 2007 14:04:09 +0200
>
> I can confirm this bug [..] (I was able to reproduce it only on one
> machine out of several almost identical ones).
>
> I was able to track down the bug to the diff between svn revisions
> 743 and 744 (The svn diff is attached). Indeed, after reverting this
> change, everything works.

I think it would be wise to stop creating bad and unmaintained forks of cdrecord and work together with Joerg Schilling (original author of cdrecord software) - it seems cdrecord is really free and really working, OSI approved software and there are no restrictions for patching and improving it - look here for more info:

http://cdrecord.berlios.de/private/cdr-faq.html

Related branches

Changed in cdrkit:
status: Unknown → New
Revision history for this message
Mario Đanić (mario-danic) wrote :

There is a patch available at http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=cdrpatch;att=1;bug=430558, but it is really annoying to patch unmaintained software.

Changed in cdrkit:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Mario Đanić (mario-danic) wrote :
Changed in cdrkit:
status: New → Fix Committed
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : CD/DVD creation bug can be fixed with a simple, one line patch. Fixed packages for Ubuntu 7.10 are available !

So, this important CD/DVD creation bug can be fixed with simple, one line patch (by moving "return (0)" outside the if () statement) !
I and some Debian people (see related Debian bugreports) have tested genisoimage-dlength.patch and we all confirm, that this simple (one line really) patch fixes this important bug.
You can download fixed packages for Ubuntu 7.10 from here:
ftp.akl.lt/baltix-linux/Baltix-Ubuntu-packages/gutsy/cdrkit/

Ubuntu developers, please, apply this patch and fix CD/DVD writing regression in Ubuntu 7.10 updates !

Revision history for this message
Mario Limonciello (superm1) wrote :

Attached is a debdiff for a core-dev to nicely apply. This has indeed already been fixed in cdrkit svn, so it is really no extra work to add a patch for us.

Revision history for this message
Mario Limonciello (superm1) wrote :
Revision history for this message
Mario Limonciello (superm1) wrote :

As indicated in #ubuntu-devel, the diff.gz already has changes outside the debian directory. No need to introduce dpatch.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cdrkit - 9:1.1.6-1ubuntu6

---------------
cdrkit (9:1.1.6-1ubuntu6) hardy; urgency=low

  * genisoimage/tree.c:
    - Add patch to fix Joliet filesystem creation. This patch has
      been commited to cdrkit svn revno 782 already (LP: #187459)

 -- Mario Limonciello <email address hidden> Fri, 29 Feb 2008 22:47:13 -0600

Changed in cdrkit:
status: Confirmed → Fix Released
Changed in cdrkit:
status: Fix Committed → Fix Released
Revision history for this message
Rashkae (rashkae) wrote :

Should this patch not be added to Gutsy and Feisty? I just found out the hard way that most the backups I've burned to DVD since updating to Gutsy have corrupt Joliet filesystems and cannot even be read by a Windows computer. This is not a pleasant turn.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Fixed genisoimage package for Ubuntu 7.10 "Gutsy" are available at official Baltix distro repository - this bug was fixed in Baltix 3.2rc (3.1.1):
deb http://ftp.akl.lt/Linux/Baltix/Baltix-Ubuntu-packages gutsy main
(you can download single package directly from ftp.akl.lt/Linux/Baltix/Baltix-Ubuntu-packages/gutsy/cdrkit/ )

Changed in cdrkit:
importance: Undecided → Medium
status: New → Fix Released
Changed in feisty-backports:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.