[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkisofs mastering sparse files - end result file full of zeros
From: |
Thomas Schmitt |
Subject: |
Re: mkisofs mastering sparse files - end result file full of zeros |
Date: |
Sun, 24 Nov 2024 16:33:04 +0100 |
Hi,
Graham Leggett wrote:
> Using mkisofs as packaged on Redhat Enterprise 9
They really should not simply call xorrisofs "mkisofs" ...
> It seems to be true that:
> - attempting to burn a sparse file doesn't work; and
> - no errors, no warnings; and
> - you just end up with a sparse file of the same virtual size as the
> original file containing purely zeros.
>
> Is this a known problem?
No. Usually a reading program should see no difference between a sparse
file and a file that contains really written 0-bytes instead of the holes.
I made a mini test on an ext4 filesystem:
$ echo hello | dd bs=1 seek=1G of=1gb_sparse
6+0 records in
6+0 records out
6 bytes (6 B) copied, 0.0372587 s, 0.2 kB/s
$ ls -l 1gb_sparse
-rw-r--r-- 1 ... ... 1073741830 Nov 24 15:57 1gb_sparse
$ du 1gb_sparse
4 1gb_sparse
So my test file ist very sparse.
$ xorriso-1.5.4 -as mkisofs -o test.iso --for_backup 1gb_sparse
GNU xorriso 1.5.4.pl02 : RockRidge filesystem manipulator, libburnia project.
...
ISO image produced: 524474 sectors
Written to medium : 524474 sectors at LBA 0
Writing to 'stdio:test.iso' completed successfully.
$ sudo mount test.iso /mnt/iso
mount: /dev/loop0 is write-protected, mounting read-only
$ diff /mnt/iso/1gb_sparse 1gb_sparse
$
No difference.
$ dd bs=1 skip=1G if=1gb_sparse
hello
$ dd bs=1 skip=1G if=/mnt/iso/1gb_sparse 1gb_sparse
hello
$
So the "hello" is in the ISO filesystem, too.
What happens if you try above program runs on your machine ?
--------------------------------------------------------------------
If you have doubts about version 1.5.4 versus 1.5.4.pl02:
GNU xorriso 1.5.4.pl02 is supposed to have the same source code and
functionality as dynamically linked xorriso-1.5.4 using libisofs-1.5.4,
libburn-1.5.4 and libisoburn-1.5.4.
It is available from
https://ftp.gnu.org/gnu/xorriso/xorriso-1.5.4.pl02.tar.gz
with GPG signature file
https://ftp.gnu.org/gnu/xorriso/xorriso-1.5.4.pl02.tar.gz.sig
which should yield with gpg --verify:
Primary key fingerprint: 44BC 9FD0 D688 EB00 7C4D D029 E9CB DFC0 ABC0 A854
The public key can be fetched by
gpg --keyserver keyserver.ubuntu.com --recv-keys ABC0A854
Compilation instructions are in its README. Essentially what is written in
https://www.gnu.org/software/xorriso/README_xorriso
with "1.5.4" instead of "1.5.6".
The reason for ".pl02" was a bug in libisofs which was discovered after
GNU xorriso-1.5.4 was uploaded but before libisofs-1.5.4 was published.
It has nothing to do with sparse files.
Have a nice day :)
Thomas