Bug 142872 - k3b can't write UDF DVD with files more than 4 Gb
Summary: k3b can't write UDF DVD with files more than 4 Gb
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
: 142873 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-12 15:06 UTC by Ben Aceler
Modified: 2009-09-19 22:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Aceler 2007-03-12 15:06:16 UTC
Version:            (using KDE KDE 3.5.6)

When trying to burn large (more than 4Gb) files on DVD, even using UDF, k3b says, that it can't do so. It is very interesting, because growisofs is able to create an iso files with files more than 4Gb, and k3b is able to burn these iso files.
Comment 1 Sebastian Trueg 2007-03-12 16:39:23 UTC
*** Bug 142873 has been marked as a duplicate of this bug. ***
Comment 2 Sebastian Trueg 2007-03-12 16:40:52 UTC
If you could point me to the mkisofs version that supports >4gb files I would be happy to lift the restriction. growisofs simply calls mkisofs to create images btw.
Comment 3 Ben Aceler 2007-03-12 17:14:42 UTC
> growisofs simply calls mkisofs to create images btw. 
 
That is strange! I'll try to investigate it.
Comment 4 Ben Aceler 2007-03-13 09:29:08 UTC
What about using mkudffs?
Comment 5 Sebastian Trueg 2007-03-13 09:35:01 UTC
> ------- Additional Comments From aceler gmail com  2007-03-13 09:29 -------
> What about using mkudffs?


AFAIK mkudffs can only create an empty filesystem on a device. Tricky to use 
from K3b.
Comment 6 Ben Aceler 2007-03-13 13:43:48 UTC
Yes. You can do such:

dd if=/dev/zero of=file.img count=[ISO size]
mkudffs file.img
mount -o loop file.img /media/tmp
Copy the files to /media/tmp and so on.
And then you can burn file.img.

It is not a direct way, but recently it works.
Comment 7 Sebastian Trueg 2007-03-13 13:47:52 UTC
> dd if=/dev/zero of=file.img count=[ISO size]
> mkudffs file.img
> mount -o loop file.img /media/tmp


This can only be done by root, right?

> Copy the files to /media/tmp and so on.
> And then you can burn file.img.
>
> It is not a direct way, but recently it works.

Comment 8 Ben Aceler 2007-03-13 13:55:55 UTC
> This can only be done by root, right? 

No. Only mount. But if you'll create some kind of direct file access, you will be able to place the files into UDF image without mounting it.

Or is it too complicated? I know, support form mkisofs is simplest way.
Comment 9 Sebastian Trueg 2007-03-13 14:36:50 UTC
> No. Only mount. But if you'll create some kind of direct file access, you
> will be able to place the files into UDF image without mounting it.
>
> Or is it too complicated? I know, support form mkisofs is simplest way.


I don't know. I don't have the time and the nerve ATM. But it has been on my 
TODO list for years. :(
Comment 10 Francois Marier 2007-04-21 11:11:06 UTC
CSights <csights@fastmail.fm> has reported this on the Debian bug tracker (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413994):

I have just verified that genisoimage (1.1.4) can create an .iso which contains a 
larger than 4.0GB file.  Probably k3b is checking for a restriction which no 
longer exists?

# genisoimage -allow-limited-size 4_3_fatty.bak > /fatty.iso  
# mount -o,loop /fatty.iso /mnt/tester/
# ls -alh /mnt/tester/
total 4.3G
dr-xr-xr-x 2 4294967295 4294967295   92 2007-04-17 11:29 .
drwxr-xr-x 8 root       root       4.0K 2007-03-14 15:32 ..
-r--r--r-- 1 4294967295 4294967295 4.3G 2007-04-16 19:59 4_3_fatty.bak

For reference, the full error message when using an older version of K3b is:

System
-----------------------
K3b Version: 0.12.17

KDE Version: 3.5.5
QT Version:  3.3.7
Kernel:      2.6.19.3
Devices
-----------------------
SONY DVD RW DRU-510A 1.1a (/dev/hdc, ) at /media/udf-disk [CD-R; CD-RW; 
CD-ROM; DVD-ROM; DVD-R; DVD-RW; DVD+R; DVD+RW] [DVD-ROM; DVD-R Sequential; 
DVD-RW Restricted Overwrite; DVD-RW Sequential; DVD+RW; DVD+R; CD-ROM; CD-R; 
CD-RW] [SAO; TAO; RAW; SAO/R96R; RAW/R96R; Restricted Overwrite]

CD-ROM Drive/F5D 2.42 (/dev/hdd, ) at /media/cdrom1 [CD-ROM] [Error] [None]
Used versions
-----------------------
growisofs: 7.0.1
mkisofs: 1.1.2

growisofs
-----------------------
WARNING: /dev/hdc already carries isofs!
I: -input-charset not specified, using iso-8859-1 (detected in locale 
settings)
/usr/bin/X11/genisoimage: Value too large for defined data type. 
File /home/csights/ddata/MultiMedia/WorldAtWar/TOS_S1D2.iso is too large - 
ignoring
:-( write failed: Input/output error

growisofs command:
-----------------------
/usr/bin/X11/growisofs -Z /dev/hdc -use-the-force-luke=notray -use-the-force-luke=tty -speed=4 -overburn -use-the-force-luke=bufsize:32m -gui -graft-points -volid 
TOS_S1D2 -volset  -appid K3B THE CD KREATOR (C) 1998-2005 SEBASTIAN TRUEG AND 
THE K3B TEAM -publisher  -preparer  -sysid LINUX -volset-size 1 -volset-seqno 
1 -sort /tmp/kde-csightsoxRYVO/k3bH6NWxb.tmp -rational-rock -hide-list /tmp/kde-csightsoxRYVO/k3b4CYkJa.tmp -joliet -hide-joliet-list /tmp/kde-csightsoxRYVO/k3bhqHUoa.tmp -udf -full-iso9660-filenames -iso-level 
2 -path-list /tmp/kde-csightsoxRYVO/k3bZeQWcc.tmp 
Comment 11 Sebastian Trueg 2007-04-24 10:20:24 UTC
SVN commit 657481 by trueg:

genisoimage >= 1.1.4 can finally write files bigger than 4 gb. :)

BUG: 142872


 M  +16 -13    libk3b/core/k3bdefaultexternalprograms.cpp  
 M  +17 -2     libk3b/projects/datacd/k3bisoimager.cpp  
 M  +30 -27    src/projects/k3bdataurladdingdialog.cpp  


--- trunk/extragear/multimedia/k3b/libk3b/core/k3bdefaultexternalprograms.cpp #657480:657481
@@ -1,4 +1,4 @@
-/* 
+/*
  *
  * $Id$
  * Copyright (C) 2003-2007 Sebastian Trueg <trueg@k3b.org>
@@ -69,7 +69,7 @@
                                      "vcdxminfo",
                                      "vcdxrip",
                                      0 };
-  
+
   for( int i = 0; vcdTools[i]; ++i )
     m->addProgram( new K3bVcdbuilderProgram( vcdTools[i] ) );
 }
@@ -89,7 +89,7 @@
 // For 2.0.x and 2.2.x kernels the shm version is used. In all
 // other cases it's the mmap version.
 //
-// But since it may be that someone manually installed cdrecord 
+// But since it may be that someone manually installed cdrecord
 // replacing the wrapper we check if cdrecord is a script.
 //
 static QString& debianWeirdnessHack( QString& path )
@@ -108,9 +108,9 @@
 	  ext = ".mmap";
 	else
 	  ext = ".shm";
-	
+
 	kdDebug() << "(K3bCdrecordProgram) Using cdrecord" << ext << endl;
-	
+
 	path += ext;
       }
     }
@@ -213,20 +213,20 @@
       bin->addFeature( "clone" );
     if( out.output().contains( "-tao" ) )
       bin->addFeature( "tao" );
-    if( out.output().contains( "cuefile=" ) && 
+    if( out.output().contains( "cuefile=" ) &&
 	( wodim || bin->version > K3bVersion( 2, 1, -1, "a14") ) ) // cuefile handling was still buggy in a14
       bin->addFeature( "cuefile" );
 
     // new mode 2 options since cdrecord 2.01a12
-    // we use both checks here since the help was not updated in 2.01a12 yet (well, I 
-    // just double-checked and the help page is proper but there is no harm in having 
+    // we use both checks here since the help was not updated in 2.01a12 yet (well, I
+    // just double-checked and the help page is proper but there is no harm in having
     // two checks)
     // and the version check does not handle versions like 2.01-dvd properly
     if( out.output().contains( "-xamix" ) ||
-	bin->version >= K3bVersion( 2, 1, -1, "a12" ) || 
+	bin->version >= K3bVersion( 2, 1, -1, "a12" ) ||
 	wodim )
       bin->addFeature( "xamix" );
-   
+
     // check if we run cdrecord as root
     struct stat s;
     if( !::stat( QFile::encodeName(path), &s ) ) {
@@ -367,6 +367,9 @@
   if( bin->version >= K3bVersion( 1, 15, -1, "a40" ) || genisoimage )
     bin->addFeature( "backslashed_filenames" );
 
+  if ( genisoimage && bin->version >= K3bVersion( 1, 1, 4 ) )
+      bin->addFeature( "no-4gb-limit" );
+
   addBin(bin);
   return true;
 }
@@ -557,7 +560,7 @@
 
   // SuSE 9.0 ships with a patched cdrdao 1.1.7 which contains an updated libschily
   // Gentoo ships with a patched cdrdao 1.1.7 which contains scglib support
-  if( bin->version > K3bVersion( 1, 1, 7 ) || 
+  if( bin->version > K3bVersion( 1, 1, 7 ) ||
       bin->version == K3bVersion( 1, 1, 7, "-gentoo" ) ||
       bin->version == K3bVersion( 1, 1, 7, "-suse" ) ) {
     //    bin->addFeature( "plain-atapi" );
@@ -890,7 +893,7 @@
     if( (s.st_mode & S_ISUID) && s.st_uid == 0 )
       bin->addFeature( "suidroot" );
   }
-  
+
   addBin( bin );
   return true;
 }
@@ -1017,7 +1020,7 @@
     if( (s.st_mode & S_ISUID) && s.st_uid == 0 )
       bin->addFeature( "suidroot" );
   }
- 
+
   addBin( bin );
   return true;
 }
--- trunk/extragear/multimedia/k3b/libk3b/projects/datacd/k3bisoimager.cpp #657480:657481
@@ -670,14 +670,29 @@
   // Check if we have files > 2 GB and enable udf in that case.
   //
   bool filesGreaterThan2Gb = false;
+  bool filesGreaterThan4Gb = false;
   K3bDataItem* item = m_doc->root();
   while( (item = item->nextSibling()) ) {
-    if( item->isFile() && item->size() > 2LL*1024LL*1024LL*1024LL ) {
+    if ( item->isFile() && item->size() >= 0xFFFFFFFFULL ) {
+        filesGreaterThan4Gb = filesGreaterThan2Gb = true;
+        break;
+    }
+    else if( item->isFile() && item->size() > 2LL*1024LL*1024LL*1024LL ) {
       filesGreaterThan2Gb = true;
-      break;
+      if ( filesGreaterThan4Gb )
+          break;
     }
   }
 
+  if ( filesGreaterThan4Gb ) {
+      if ( !d->mkisofsBin->hasFeature( "no-4gb-limit" ) ) {
+          emit infoMessage( i18n( "Found files bigger than 4 GB. K3b needs at least %1 to continue." )
+                            .arg( "genisoimage >= 1.1.4" ),
+                            ERROR );
+          return false;
+      }
+  }
+
   if( filesGreaterThan2Gb ) {
     emit infoMessage( i18n("Found files bigger than 2 GB. These files will only be fully accessible if mounted with UDF."),
 		      WARNING );
--- trunk/extragear/multimedia/k3b/src/projects/k3bdataurladdingdialog.cpp #657480:657481
@@ -1,4 +1,4 @@
-/* 
+/*
  *
  * $Id: sourceheader 380067 2005-01-19 13:03:46Z trueg $
  * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org>
@@ -39,6 +39,7 @@
 #include <k3binteractiondialog.h>
 #include <k3bthread.h>
 #include <k3bsignalwaiter.h>
+#include <k3bexternalbinmanager.h>
 
 #include <klocale.h>
 #include <kurl.h>
@@ -105,7 +106,7 @@
 }
 
 
-int K3bDataUrlAddingDialog::addUrls( const KURL::List& urls, 
+int K3bDataUrlAddingDialog::addUrls( const KURL::List& urls,
 				     K3bDirItem* dir,
 				     QWidget* parent )
 {
@@ -180,7 +181,7 @@
       .arg( m_unreadableFiles.join( "<br>" ) );
   if( !m_tooBigFiles.isEmpty() )
     message += QString("<p><b>%1:</b><br>%2")
-      .arg( i18n("It is not possible to add files bigger than %1").arg(KIO::convertSize(0xFFFFFFFF)) )
+      .arg( i18n("To burn files bigger than %1 please use %1").arg(KIO::convertSize(0xFFFFFFFF)).arg( "genisoimage >= 1.1.4" ) )
       .arg( m_tooBigFiles.join( "<br>" ) );
   if( !m_mkisofsLimitationRenamedFiles.isEmpty() )
     message += QString("<p><b>%1:</b><br>%2")
@@ -196,7 +197,7 @@
 }
 
 
-int K3bDataUrlAddingDialog::moveItems( const QValueList<K3bDataItem*>& items, 
+int K3bDataUrlAddingDialog::moveItems( const QValueList<K3bDataItem*>& items,
 				       K3bDirItem* dir,
 				       QWidget* parent )
 {
@@ -204,7 +205,7 @@
 }
 
 
-int K3bDataUrlAddingDialog::copyItems( const QValueList<K3bDataItem*>& items, 
+int K3bDataUrlAddingDialog::copyItems( const QValueList<K3bDataItem*>& items,
 				       K3bDirItem* dir,
 				       QWidget* parent )
 {
@@ -212,9 +213,9 @@
 }
 
 
-int K3bDataUrlAddingDialog::copyMoveItems( const QValueList<K3bDataItem*>& items, 
+int K3bDataUrlAddingDialog::copyMoveItems( const QValueList<K3bDataItem*>& items,
 					   K3bDirItem* dir,
-					   QWidget* parent, 
+					   QWidget* parent,
 					   bool copy )
 {
   if( items.isEmpty() )
@@ -239,7 +240,7 @@
     dlg.m_progressWidget->setTotalSteps( dlg.m_totalFiles );
     ret = dlg.exec();
   }
-  
+
   return ret;
 }
 
@@ -325,8 +326,10 @@
 	m_unreadableFiles.append( url.path() );
       }
       else if( isFile && (unsigned long long)statBuf.st_size >= 0xFFFFFFFFULL ) {
-	valid = false;
-	m_tooBigFiles.append( url.path() );
+          if ( !k3bcore->externalBinManager()->binObject( "mkisofs" )->hasFeature( "no-4gb-limit" ) ) {
+              valid = false;
+              m_tooBigFiles.append( url.path() );
+          }
       }
     }
 
@@ -338,16 +341,16 @@
     if( valid ) {
       if( info.isHidden() && !addHiddenFiles() )
 	valid = false;
-      if( S_ISCHR(statBuf.st_mode) || 
-	  S_ISBLK(statBuf.st_mode) || 
-	  S_ISFIFO(statBuf.st_mode) || 
+      if( S_ISCHR(statBuf.st_mode) ||
+	  S_ISBLK(statBuf.st_mode) ||
+	  S_ISFIFO(statBuf.st_mode) ||
 	  S_ISSOCK(statBuf.st_mode) )
 	if( !addSystemFiles() )
 	  valid = false;
       if( isSymLink )
-	if( S_ISCHR(resolvedStatBuf.st_mode) || 
-	    S_ISBLK(resolvedStatBuf.st_mode) || 
-	    S_ISFIFO(resolvedStatBuf.st_mode) || 
+	if( S_ISCHR(resolvedStatBuf.st_mode) ||
+	    S_ISBLK(resolvedStatBuf.st_mode) ||
+	    S_ISFIFO(resolvedStatBuf.st_mode) ||
 	    S_ISSOCK(resolvedStatBuf.st_mode) )
 	  if( !addSystemFiles() )
 	    valid = false;
@@ -369,7 +372,7 @@
   }
   if( bsAtEnd )
     m_mkisofsLimitationRenamedFiles.append( url.path() + " -> " + newName );
-  
+
   // backup dummy name
   if( newName.isEmpty() )
     newName = "1";
@@ -407,7 +410,7 @@
 	//
 	valid = false;
       }
-      
+
       else if( m_bExistingItemsReplaceAll ) {
 	// if we replace an item from an old session the K3bFileItem constructor takes care
 	// of replacing the item
@@ -428,7 +431,7 @@
 					      this,
 					      0,
 					      6,
-					      KGuiItem( i18n("Replace"), 
+					      KGuiItem( i18n("Replace"),
 							QString::null,
 							i18n("Replace the existing file") ),
 					      KGuiItem( i18n("Replace All"),
@@ -505,7 +508,7 @@
 	  m_bFolderLinksFollowAll = true;
 	case 1:
 	  followLink = true;
-	  break;	    
+	  break;
 	case 4:
 	  m_bFolderLinksAddAll = true;
 	case 3:
@@ -543,7 +546,7 @@
     // Set the volume id from the first added url
     // only if the doc was not changed yet
     //
-    if( m_urls.count() == 1 && 
+    if( m_urls.count() == 1 &&
 	!dir->doc()->isModified() &&
 	!dir->doc()->isSaved() ) {
       dir->doc()->setVolumeID( K3b::removeFilenameExtension( newName ) );
@@ -557,7 +560,7 @@
 
       QDir newDir( absFilePath );
       int dirFilter = QDir::All|QDir::Hidden|QDir::System;
-	
+
       QStringList dlist = newDir.entryList( dirFilter );
       const QString& dot = KGlobal::staticQString( "." );
       const QString& dotdot = KGlobal::staticQString( ".." );
@@ -664,7 +667,7 @@
 					      this,
 					      0,
 					      6,
-					      KGuiItem( i18n("Replace"), 
+					      KGuiItem( i18n("Replace"),
 							QString::null,
 							i18n("Replace the existing file") ),
 					      KGuiItem( i18n("Replace All"),
@@ -747,9 +750,9 @@
     newName = KInputDialog::getText( i18n("Enter New Filename"),
 				     i18n("A file with that name already exists. Please enter a new name:"),
 				     newName, &ok, this, "renamedialog", validator );
-    
+
   } while( ok && dir->find( newName ) );
-  
+
   delete validator;
 
   return ok;
@@ -767,7 +770,7 @@
     else
       m_iAddHiddenFiles = -1;
   }
-  
+
   return ( m_iAddHiddenFiles == 1 );
 }
 
@@ -783,7 +786,7 @@
     else
       m_iAddSystemFiles = -1;
   }
-  
+
   return ( m_iAddSystemFiles == 1 );
 }
 
Comment 12 Maciej Warnecki 2009-09-19 22:04:49 UTC
Still doesn't work for me. I use K3b 1.66alpha2, and when adding a file which is greater than 4.0GB, I am being told I should use mkisofs >=2.01.01a33 / genisoimage >=1.1.4.

K3b says my mkisofs is 2.1, and my genisoimage is 1.1.9.