Updated libisoburn doc/*.wiki files by current publicly shown files

This commit is contained in:
2017-09-06 14:42:21 +02:00
parent 047b8db7ac
commit 650c015c5b
3 changed files with 596 additions and 585 deletions

View File

@ -7,12 +7,12 @@ The options follow proposals of Paolo Bonzini on qemu-devel mailing list.
My compliments for his patient guidance.
Basic knowledge about Debian and qemu was learned from
[http://www.gnu.org/s/hurd/hurd/running/qemu.html GNU Hurd qemu page].
[GNU Hurd qemu page](http://www.gnu.org/s/hurd/hurd/running/qemu.html GNU Hurd qemu page).
----------------------------------------------------------------------
This start command works with qemu-1.0-rc3:
This start command works with `qemu-1.0-rc3`:
{{{
```
$ qemu \
-enable-kvm \
-nographic \
@ -23,11 +23,11 @@ This start command works with qemu-1.0-rc3:
-drive file=/dev/sr0,if=none,id=scsicd,format=raw \
-device virtio-blk-pci,drive=scsicd,logical_block_size=2048,physical_block_size=2048 \
-cdrom .../some_image.iso
}}}
```
This start command works with qemu-2.1.2:
This start command works with `qemu-2.1.2`:
{{{
```
$ qemu \
-enable-kvm \
-nographic \
@ -37,23 +37,23 @@ This start command works with qemu-2.1.2:
-hda /dvdbuffer/i386-install.qemu \
-cdrom .../some_image.iso \
-drive file=/dev/sr0,index=2,if=virtio
}}}
```
With these setups of -drive and -device it is necessary to have a
With these setups of `-drive` and `-device` it is necessary to have a
medium in the drive, when qemu gets started. Else it will refuse.
The guest system is accessible via ssh and scp at port 5557 of the
host system.
'''/dev/sr0''' is the address of the DVD drive which is handed over to the
`/dev/sr0` is the address of the DVD drive which is handed over to the
guest system.
'''.../some_image.iso''' may be any readable file which shall serve as
`.../some_image.iso` may be any readable file which shall serve as
virtual DVD-ROM. qemu is not happy without such a thing.
'''/dvdbuffer/i386-install.qemu''' is the disk image, where the guest operating
`/dvdbuffer/i386-install.qemu` is the disk image, where the guest operating
system was installed by:
{{{
```
$ qemu-img create /dvdbuffer/i386-install.qemu 8G
$ qemu \
-enable-kvm \
@ -62,92 +62,92 @@ system was installed by:
-hda /dvdbuffer/i386-install.qemu \
-cdrom debian-6.0.3-i386-netinst.iso \
-boot d
}}}
```
Host system of my qemu-1.0-rc3 test is Debian GNU/Linux 6.0.2 amd64.
With qemu-2.1.2 it is Debian 8.1 amd64.
Host system of my `qemu-1.0-rc3` test is Debian GNU/Linux 6.0.2 amd64.
With `qemu-2.1.2` it is Debian 8.1 amd64.
Both had access to the Internet when the guest was installed.
----------------------------------------------------------------------
Preparations on guest system Debian GNU/Linux 6.0.3 i386
There appears no /dev/sr for the passthrough drive. Thus libburn will not
There appears no `/dev/sr` for the passthrough drive. Thus libburn will not
list it by its drive search function. One may use it nevertheless. But
xorriso will only do so if prefix "mmc:" is used with the address:
{{{
```
-dev mmc:/dev/vda
}}}
The drive will be listed by libburn if there is a symbolic link /dev/sr*
```
The drive will be listed by libburn if there is a symbolic link `/dev/sr*`
pointing to it. On Debian 6, this link persists only if it is created
by an udev rule.
In /lib/udev/rules.d/50-udev-default.rules:
{{{
In `/lib/udev/rules.d/50-udev-default.rules`:
```
KERNEL=="vda", SYMLINK+="sr1"
}}}
```
libburn on Linux needs rw-permission for the drive's device node.
The virtual device /dev/vda is in group "disk". Usual for CD drives is
The virtual device `/dev/vda` is in group "disk". Usual for CD drives is
group "cdrom", to which i (or the Debian installer ?) have added my
normal user when i installed the guest system.
Like with the symbolic link, such a change persists on Debian 6 only as
udev rule.
In /lib/udev/rules.d/91-permissions.rules:
{{{
In `/lib/udev/rules.d/91-permissions.rules`:
```
KERNEL=="vda", GROUP="cdrom"
}}}
```
This should yield
{{{
```
lrwxrwxrwx 1 root root 3 Nov 8 11:19 /dev/sr1 -> vda
brw-rw---- 1 root cdrom 254, 0 Nov 8 11:19 /dev/vda
}}}
```
xorriso version must be >= 1.1.8
{{{
```
$ xorriso -version
}}}
```
tells the versions of its components on stdout:
{{{
```
...
xorriso version : 1.1.8
...
}}}
```
If your distro's xorriso is too old, consider to get and build GNU xorriso.
{{{
```
http://ftpmirror.gnu.org/xorriso/xorriso-1.1.8.tar.gz
}}}
```
Do
{{{
```
$ tar xzf xorriso-1.1.8.tar.gz
$ cd xorriso-1.1.8
$ ./configure && make
}}}
```
Either do as superuser
{{{
```
# make install
}}}
```
or execute it where it was built as
{{{
```
$ ./xorriso/xorriso ...arguments...
}}}
```
After compilation, this binary does not depend on files in the build
directory. You may move it to any other location.
For details about the following xorriso commands, read
{{{
```
man xorriso
man ./xorriso/xorriso.1
}}}
```
or with the same content
{{{
```
info xorriso
info ./xorriso/xorriso.info
}}}
Or read the [http://scdbackup.sourceforge.net/man_1_xorriso_devel.html online man page of xorriso].
```
Or read the [online man page of xorriso](http://scdbackup.sourceforge.net/man_1_xorriso_devel.html).
Note that the sequence of xorriso arguments matters. They are commands
@ -158,20 +158,20 @@ sequence.
Writing happens automatically if ISO filetree changes are pending
at the end of the program run. This is like with other burn tools.
(There is a command -commit for intermediate writing e.g. in dialog
(There is a command `-commit` for intermediate writing e.g. in dialog
mode.)
----------------------------------------------------------------------
Listing accessible drives:
{{{
```
$ xorriso -devices
}}}
```
shows on stdout:
{{{
```
0 -dev '/dev/sr0' rwrw-- : 'QEMU ' 'QEMU DVD-ROM'
1 -dev '/dev/sr1' rwrw-- : 'Optiarc ' 'BD RW BD-5300S'
}}}
```
----------------------------------------------------------------------
@ -182,11 +182,11 @@ See "Other applicable media types:" further below.
----------------------------------------------------------------------
Inspecting drive and medium:
{{{
```
$ xorriso -outdev /dev/sr1 -toc
}}}
```
should show on stdout something like
{{{
```
Drive current: -dev '/dev/sr1'
Drive type : vendor 'Optiarc' product 'BD RW BD-5300S' revision '1.04'
Media current: DVD-RW sequential recording
@ -198,7 +198,7 @@ should show on stdout something like
ISO session : 2 , 135536 , 108385s , ISOIMAGE
ISO session : 3 , 250240 , 56202s , ISOIMAGE
Media summary: 3 sessions, 271744 data blocks, 531m data, 0 free
}}}
```
----------------------------------------------------------------------
@ -207,11 +207,11 @@ Blanking to single session capability:
This medium has to be blanked before further writing. For the DAO
test, one can save time by fast blanking, which xorriso normally
dislikes because the result is not capable of multi-session:
{{{
```
$ xorriso -outdev /dev/sr1 -blank deformat_quickest
}}}
```
should report on stderr
{{{
```
...
xorriso : UPDATE : Blanking ( 1.0% done in 2 seconds )
...
@ -221,7 +221,7 @@ should report on stderr
Media current: DVD-RW sequential recording
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 4489m free
}}}
```
Do not worry if the pacifier messages show no neat percentage progress.
Some drives report "1.0%" until they are done. Some report "1.0%"
after "99%".
@ -230,14 +230,14 @@ after "99%".
Writing a DAO session:
Use one or more moderately sized directories as input. Here: /usr/bin.
Terminate the list of -add arguments by argument "--".
It is important to have command -close "on" among the arguments.
{{{
Use one or more moderately sized directories as input. Here: `/usr/bin`.
Terminate the list of `-add` arguments by argument `--`.
It is important to have command `-close on` among the arguments.
```
$ xorriso -md5 on -outdev /dev/sr1 -close on -add /usr/bin --
}}}
```
should report on stderr
{{{
```
...
xorriso : UPDATE : 594 files added in 1 seconds
...
@ -252,7 +252,7 @@ should report on stderr
ISO image produced: 52735 sectors
Written to media : 52885 sectors at LBA 0
Writing to '/dev/sr1' completed successfully.
}}}
```
Do not worry if there is no progress to see for a few dozen seconds
at the beginning.
The run will last at least as long as writing of 1 GB would need.
@ -262,14 +262,14 @@ messages at the end of writing.
----------------------------------------------------------------------
Checkreading the result:
{{{
```
$ xorriso -md5 on -indev /dev/sr1 -check_md5_r sorry / --
}}}
```
The word "sorry" sets the severity class of the event message, which is
emitted in case of MD5 mismatch. (See man xorriso, "Exception processing".)
This should report on stderr
{{{
```
...
Drive current: -indev '/dev/sr1'
Media current: DVD-RW sequential recording
@ -281,11 +281,11 @@ This should report on stderr
...
xorriso : UPDATE : 103.7m content bytes read in 35 seconds
File contents and their MD5 checksums match.
}}}
```
and the exit value should be 0, if no mismatch was reported.
A mismatch message would look like
{{{
```
...
MD5 MISMATCH: '/usr/bin/ncursesw5-config'
...
@ -293,22 +293,22 @@ A mismatch message would look like
xorriso : SORRY : Event triggered by MD5 comparison mismatch
xorriso : NOTE : Tolerated problem event of severity 'SORRY'
xorriso : NOTE : -return_with SORRY 32 triggered by problem severity SORRY
}}}
```
and the exit value would be non-zero.
----------------------------------------------------------------------
Blanking to multi-session capability:
{{{
```
$ xorriso -outdev /dev/sr1 -blank as_needed
}}}
```
This will need as long as writing the DVD-RW up to its end.
Blanking option "as_needed" lets xorriso decide what to do in order
Blanking option `as_needed` lets xorriso decide what to do in order
to make the medium writable from scratch. With DVD-RW it will decide for
-blank "all".
`-blank all`.
The report on stderr should end by
{{{
```
...
xorriso : UPDATE : Blanking ( 98.9% done in 902 seconds )
xorriso : UPDATE : Blanking ( 99.0% done in 903 seconds )
@ -319,15 +319,15 @@ The report on stderr should end by
Media current: DVD-RW sequential recording
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 4489m free
}}}
```
----------------------------------------------------------------------
Writing multiple sessions (DVD-RW write type Incremental):
This time do not perform command -close "on", so that the medium
This time do not perform command `-close on`, so that the medium
stays writable:
{{{
```
$ xorriso -md5 on -dev /dev/sr1 -add /usr/lib --
...
xorriso : UPDATE : Writing: 105280s 98.6% fifo 0% buf 77% 3.5xD
@ -338,40 +338,40 @@ stays writable:
ISO image produced: 106646 sectors
Written to media : 106800 sectors at LBA 0
Writing to '/dev/sr1' completed successfully.
}}}
```
Checkread like after the DAO test:
{{{
```
$ xorriso -md5 on -indev /dev/sr1 -check_md5_r sorry / --
...
xorriso : UPDATE : 204.0m content bytes read in 63 seconds
File contents and their MD5 checksums match.
}}}
```
Writing the second session looks like the first one. Just use another
set of input files to get a visible change in the ISO 9660 file tree:
{{{
```
$ xorriso -md5 on -dev /dev/sr1 -add /usr/bin --
...
Written to media : 53408 sectors at LBA 135488
Writing to '/dev/sr1' completed successfully.
}}}
```
And checkread the whole tree of files (i.e. both sessions):
{{{
```
$ xorriso -md5 on -indev /dev/sr1 -check_md5_r sorry / --
...
xorriso : UPDATE : 307.8m content bytes read in 89 seconds
File contents and their MD5 checksums match.
}}}
```
At the end of writing a final session, the medium can be closed.
It will not take more writing unless it gets blanked or formatted.
So use command -close "on" to demand closing after writing.
{{{
So use command `-close on` to demand closing after writing.
```
$ xorriso -md5 on -dev /dev/sr1 -close on -add /usr/sbin --
...
Written to media : 16160 sectors at LBA 195056
Writing to '/dev/sr1' completed successfully.
}}}
```
Checkread
{{{
```
$ xorriso -md5 on -indev /dev/sr1 -check_md5_r sorry / --
...
Media current: DVD-RW sequential recording
@ -380,25 +380,25 @@ Checkread
...
xorriso : UPDATE : 337.7m content bytes read in 97 seconds
File contents and their MD5 checksums match.
}}}
```
-----------------------------------------------------------------------------
If the drive tray can move by itself, you may now eject the medium:
{{{
```
$ xorriso -outdev /dev/sr1 -eject all
}}}
```
-----------------------------------------------------------------------------
Other applicable media types:
These test runs for sequential DVD-RW may be performed on CD-RW with the
same xorriso arguments. Be aware that /usr/lib will hardly fit on a CD.
same xorriso arguments. Be aware that `/usr/lib` will hardly fit on a CD.
So choose smaller directories for CD.
-blank "deformat_quickest" addresses a peculiarity of DVD-RW.
It will work on other media like -blank "fast".
`-blank deformat_quickest` addresses a peculiarity of DVD-RW.
It will work on other media like `-blank fast`.
Except the blanking runs, the tests may also be performed on BD-R, DVD-R,
DVD+R, and CD-R. But you would waste two media by this.
@ -407,7 +407,7 @@ The first session on CD will always be written with write type SAO,
further sessions will be written with TAO.
CD-R and DVD-R have a simulation mode. It can be enabled by xorriso
command -dummy "on", but of course it will not produce readable results.
command `-dummy on`, but of course it will not produce readable results.
So this simulation is usable only for first sessions on blank media.
-----------------------------------------------------------------------------
@ -416,7 +416,7 @@ Now for formatted overwritable media:
All blank, write and check runs of above tests "Writing multiple sessions"
may also be performed with DVD+RW, DVD-RAM, formatted DVD-RW, and BD-RE.
There is no way to close formatted media. The command -close "on"
There is no way to close formatted media. The command `-close on`
gets silently ignored.
The write methods and states of formatted media differ from those of
@ -438,20 +438,20 @@ automatically. Just start a normal write run. DVD-RAM are sold formatted.
xorriso treats overwritable media with a valid ISO 9660 filesystem as
appendable media. To make then writable from scratch, apply
-blank "as_needed", which will actually write a few bytes into the PVD
`-blank as_needed`, which will actually write a few bytes into the PVD
(superblock) of the ISO filesystem to invalidate it.
De-formatting is only possible with DVD-RW. E.g. by -blank "deformat".
De-formatting is only possible with DVD-RW. E.g. by `-blank deformat`.
-----------------------------------------------------------------------------
Format DVD-RW for overwriting without intermediate blanking,
or format BD-R for Defect Management:
{{{
```
$ xorriso -outdev /dev/sr1 -format as_needed
}}}
```
should report on stderr
{{{
```
...
xorriso : UPDATE : Formatting ( 99.0% done in 912 seconds )
Formatting done
@ -460,15 +460,15 @@ should report on stderr
Media current: DVD-RW restricted overwrite
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 4488m free
}}}
```
As with blanking, one should not worry if the progress messages show
unplausible percentages. Some drives are more equal than others.
Formatting is said to be much stress to the medium. -format option
"as_needed" applies it only to yet unformatted media.
Formatting is said to be much stress to the medium. `-format` option
`as_needed` applies it only to yet unformatted media.
When performing above write tests, take care to use -blank "as_needed"
rather than -blank "deformat_quickest". Else you will get a sequential
When performing above write tests, take care to use `-blank as_needed`
rather than `-blank deformat_quickest`. Else you will get a sequential
unformatted DVD-RW rather than a formatted DVD-RW which xorriso is
willing to write from scratch.
There is no use in a separate "DAO" test on overwritable media anyway.
@ -478,12 +478,12 @@ There is no use in a separate "DAO" test on overwritable media anyway.
Change the formatted size of a BD-RE:
First learn about formatted size and proposals of other sizes.
(One can issue own wishes, too. See in man xorriso, command -format.)
{{{
(One can issue own wishes, too. See in man xorriso, command `-format`.)
```
$ xorriso -outdev /dev/sr1 -list_formats
}}}
```
should tell on stdout
{{{
```
...
Format status: formatted, with 23610.0 MiB
BD Spare Area: 0 blocks consumed, 131072 blocks available
@ -493,26 +493,26 @@ should tell on stdout
Format idx 3 : 30h , 11564032s , 22586.0 MiB
Format idx 4 : 30h , 12088320s , 23610.0 MiB
Format idx 5 : 31h , 12219392s , 23866.0 MiB
}}}
```
So lets go back from 23610.0 MiB to the default size of 23098.0 MiB
{{{
```
$ xorriso -outdev /dev/sr1 -format by_index_2 -blank as_needed
...
Media summary: 2 sessions, 105470 data blocks, 206m data, 22.4g free
}}}
```
Although the heads of the old sessions might remain readable after
-format, better do not rely on this and a append -blank "as_needed" to
`-format`, better do not rely on this and a append `-blank as_needed` to
avoid any data corruption.
If you want to keep the data, then make at least a checkread run.
Check whether the size has changed:
{{{
```
$ xorriso -outdev /dev/sr1 -list_formats
}}}
```
should tell on stdout
{{{
```
...
Format status: formatted, with 23098.0 MiB
BD Spare Area: 0 blocks consumed, 393216 blocks available
...
}}}
```