[Pkg-libburnia-devel] Bug#1010098: xorriso: please allow -cut-out directly from block devices
Ivan Shmakov
ivan at siamics.net
Sun Apr 24 11:45:27 BST 2022
Package: xorriso
Version: 1.5.0-1
Severity: wishlist
Control: found -1 1.5.2-1
[Please do not Cc: me, for I’m “on the list,” so to say, and
I try to reserve my inbox for private communication only.
I’d have set up Mail-Followup-To:, but there doesn’t seem to
be a way to make it point to the report being filed.]
I’m filing this bug against versions from oldstable and
stable, for that’s so far the only Debian packages’ versions
I’ve tested for this issue. Regardless, given that the
behavior is the same for a recent Git revision, and that
there doesn’t seem to be any relevant Debian-specific
patches under [1], it stands to reason that the requested
feature is not available in Debian testing and Sid, either.
[1] http://sources.debian.org/src/libisoburn/1.5.4-2/debian/patches/
It would be handy to be able to use xorriso(1) to backup
(portions) of block devices to optical media; yet it doesn’t
seem to be supported. E. g., on Buster:
bash$ xorriso -dev stdio:/tmp/cd"$RANDOM".image -follow link \
-cut-out /dev/vgjubca-bk-i/lvepeci-x626512db 37M 13M lvxxx_37m+13m \
-find / -exec lsdl -- -commit
xorriso 1.5.0 : RockRidge filesystem manipulator, libburnia project.
Drive current: -dev 'stdio:/tmp/cd4973.image'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, XXXm free
xorriso : FAILURE : -cut_out: Unsupported file type (block_device) with '/dev/vgjubca-bk-i/lvepeci-x626512db' : No such file or directory
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'
bash$
On Bullseye:
bash$ xorriso -dev stdio:/tmp/cd"$RANDOM".image -follow link \
-cut-out /dev/vgjubca-bk-i/lvepeci-x626512db 37M 13M lvxxx_37m+13m \
-find / -exec lsdl -- -commit
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
Drive current: -dev 'stdio:/tmp/cd1415.image'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, XXXm free
xorriso : FAILURE : -cut_out: Unsupported file type (block_device) with '/dev/vgjubca-bk-i/lvepeci-x626512db' : No such file or directory
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'
bash$
The problem is due to /both/ libisoburn (to a lesser degree)
and libisofs relying on struct stat .st_size field (and the
respective S_ISREG check.)
I’ve made a very crude patch (MIMEd) that replaces the
st_size checks for non-regular files with checks against the
size reported by lseek (, 0, SEEK_END), if available; and in
some cases forgoes the check for non-regular files altogether.
Consider, e. g.:
bash$ xorriso -dev stdio:/tmp/cd"$RANDOM".image -follow link \
-cut-out /dev/vgjubca-bk-i/lvepeci-x626512db 37M 13M lvxxx_37m+13m -find / -exec lsdl -- -commit
xorriso 1.5.5 : RockRidge filesystem manipulator, libburnia project.
Drive current: -dev 'stdio:/tmp/cd14597.image'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, XXXm free
drwxr-xr-x 1 0 0 0 Apr 24 10:16 '/'
-rw-rw---- 1 0 6 13631488 Apr 10 10:58 '/lvxxx_37m+13m'
xorriso : UPDATE : Writing: 3985s 58.2% fifo 0% buf 50%
ISO image produced: 6679 sectors
Written to medium : 6848 sectors at LBA 32
Writing to 'stdio:/tmp/cd14597.image' completed successfully.
xorriso : NOTE : Re-assessing -outdev 'stdio:/tmp/cd14597.image'
xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 1 nodes read in 1 seconds
Drive current: -dev 'stdio:/tmp/cd14597.image'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Media summary: 1 session, 6679 data blocks, 13.0m data, XXXm free
Volume id : 'ISOIMAGE'
bash$
Checking if the intended data was indeed written to the image
with icat(1):
bash$ /usr/bin/time -- cmp -n 13M -i 37M:0 -- \
/dev/vgjubca-bk-i/lvepeci-x626512db \
<(icat /tmp/cd14597.image 1)
0.01user 0.04system 0:00.18elapsed 29%CPU (0avgtext+0avgdata 1088maxresident)k
27112inputs+0outputs (0major+95minor)pagefaults 0swaps
bash$
--
FSF associate member #7257 http://am-1.org/~ivan/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 114.xorriso-1.diff
Type: text/x-diff
Size: 7016 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libburnia-devel/attachments/20220424/fb749d4e/attachment.diff>
More information about the Pkg-libburnia-devel
mailing list