xorriso - creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. |
xorriso [settings|actions] |
xorriso is a program which copies file objects
from POSIX compliant filesystems into Rock Ridge enhanced
ISO 9660 filesystems and allows session-wise manipulation of
such filesystems. It can load the management information of
existing ISO images and it writes the session results to
optical media or to filesystem objects. A special property of xorriso is that it needs neither an external ISO 9660 formatter program nor an external burn program for CD, DVD or BD but rather incorporates the libraries of libburnia-project.org . |
|
Operates on an existing ISO image or creates a new
one. |
|
Session model Maybe you first want to have a look at section EXAMPLES near the end of this text before reading the next few hundred lines of background information. |
|
Unlike other filesystems, ISO 9660 is not intended for
read-write operation but rather for being generated in a
single sweep and being written to media as a
session. The written image in its session can then be mounted by the operating system for being used read-only. GNU/Linux is able to mount ISO images from block devices, which may represent optical media, other media or via a loop device even from regular disk files. FreeBSD mounts ISO images from devices that represent arbitrary media or from regular disk files. This session usage model has been extended on CD media by
the concept of multi-session , which allows to add
information to the CD and gives the mount programs of the
operating systems the addresses of the entry points of each
session. The mount programs recognize block devices which
represent CD media and will by default mount the image in
the last session. xorriso provides growing as well as an own method named modifying which produces a completely new ISO image from the old one and the modifications. See paragraph Creating, Growing, Modifying, Blind Growing below. xorriso adopts the concept of multi-session by loading an
eventual image directory tree, allowing to manipulate it by
several actions, and to write the new image to the target
media. After -commit a new session begins with the freshly written one as input. A new input drive can only be chosen as long as the loaded ISO image was not altered. Pending alteration can be revoked by command -rollback. Writing a session to the target is supposed to be very expensive in terms of time and of consumed space on appendable or write-once media. Therefore all intended manipulations of a particular ISO image should be done in a single session. But in principle it is possible to store intermediate states and to continue with image manipulations. |
|
There are two families of media in the MMC
standard: These media can assume several states in which they offer
different capabilities. |
|
A new empty ISO image gets created if there is no
input drive with a valid ISO 9660 image when the first time
an output drive is defined. This is achieved by option -dev
on blank media or by option -outdev on media in any
state. If there is a input drive with a valid ISO image, then this image gets loaded as foundation for manipulations and extension. The constellation of input and output drive determines which write method will be used. They have quite different capabilities and constraints. The method of growing adds new data to the
existing media. These data comprise of eventual new file
content and they override the existing ISO 9660 + Rock Ridge
directory tree. It is possible to hide files from previous
sessions but they still exist on media and with many types
of optical media it is quite easy to recover them by
mounting older sessions. The write method of modifying produces compact
filesystem images with no outdated files or directory trees.
Modifying can write its images to target media which are
completely unsuitable for multi-session operations. E.g.
DVD-RW which were treated with -blank deformat_quickest,
DVD-R DL, named pipes, character devices, sockets. On the
other hand modified sessions cannot be written to appendable
media but to blank media only. If option -grow_blindly is set to a non-negative number
and if -indev and -outdev are both set to different drives,
then blind growing is performed. It produces an
add-on session which is ready for being written to the given
block address. This is the usage model of |
|
Input drive, i.e. source of an existing or empty ISO image, can be any random access readable libburn drive: optical media with readable data, blank optical media, regular files, block devices. Output drive, i.e. target for writing, can be any libburn
drive. Some drive types do not support the method of growing
but only the methods of modifying and blind growing. They
all are suitable for newly created images. MMC compliant (i.e. optical) drives on GNU/Linux usually
get addressed by the path of their block device or of their
generic character device. E.g. Filesystem objects of nearly any type can be addressed by
prefix "stdio:" and their path in the filesystem.
E.g.: A very special kind of pseudo drive are open file
descriptors. They are depicted by "stdio:/dev/fd/"
and descriptor number (see man 2 open). Be aware that especially the superuser can write into any
accessible file or device by using its path with the
"stdio:" prefix. By default any address in the
/dev tree without prefix "stdio:" will work only
if it leads to a MMC drive. |
|
Rock Ridge is the name of a set of additional
information which enhance an ISO 9660 filesystem so that it
can represent a POSIX compliant filesystem with ownership,
access permissions, symbolic links, and other
attributes. xorriso is not named "porriso" because POSIX only guarantees 14 characters of filename length. It is the X/Open System Interface standard XSI which demands a file name length of up to 255 characters and paths of up to 1024 characters. Rock Ridge fulfills this demand. An El Torito boot record connects one or more boot
images, which are binary program files stored in the ISO
image, with the bootstrapping facility of contemporary
computers. The content of the boot image files is not in the
scope of El Torito. ACL are an advanced way of controlling access
permissions to file objects. Neither ISO 9660 nor Rock Ridge
specify a way to record ACLs. So libisofs has introduced a
standard conformant extension named AAIP for that purpose.
It uses this extension if enabled by option
−acl. xattr (aka EA) are pairs of name and value which
can be attached to file objects. AAIP is able to represent
them and xorriso allows to record and restore pairs which
have names out of the user namespace. I.e. those which begin
with "user.", like "user.x" or
"user.whatever". Name has to be a 0 terminated
string. Value may be any array of bytes which does not
exceed the size of 4095 bytes. xattr processing happens only
if it is enabled by option −xattr. |
|
Commands are either actions which happen immediately or
settings which influence following actions. So their
sequence does matter. At program start the list delimiter is the word
"--". This may be changed by option
-list_delimiter in order to allow "--" as argument
in a list of variable length. It is advised to reset the
delimiter to "--" immediately afterwards. Pattern expansion converts a list of pattern words
into a list of existing file addresses. Eventual unmatched
pattern words appear themselves in that result list,
though. Command and parameter words are either read from program
arguments, where one argument is one word, or from quoted
input lines where words are recognized similar to the
quotation rules of a shell parser. Quoted input converts whitespace separated text
pieces into words. The double quotation mark " and the
single quotation mark ’ can be used to enclose
whitespace and make it part of words (e.g. of file names).
Each mark type can enclose the marks of the other type. A
trailing backslash \ outside quotations or an open quotation
cause the next input line to be appended. When the program begins then it first looks for argument -no_rc. If this is not present then it looks for its startup files and eventually reads their content as command input lines. Then it interprets the program arguments as commands and parameters and finally it enters dialog mode if command -dialog "on" was executed up to then. The program ends either by command -end, or by the end of program arguments if not dialog was enabled up to that moment, or by a problem event which triggers the threshold of command -abort_on. |
|
Dialog mode prompts for a quoted input line, parses it into words, and performs them as commands with their parameters. It provides assisting services to make dialog more comfortable. Readline is an enhancement for the input line. You may
know it already from the bash shell. Whether it is available
in xorriso depends on the availability of package
readline-dev at the time when xorriso was built from its
sourcecode. Option -page activates a built-in result text pager which
may be convenient in dialog. After an action has put out the
given number of terminal lines, the pager prompts the user
for a line of input. Some actions apply paging to their info output, too. |
All command words are shown with a leading dash although
this dash is not mandatory for the option to be recognized.
Nevertheless within option -as the dashes of the emulated
options are mandatory. |
|
Before aquiring a drive one will eventually enable options which influence the behavior of image loading. See next option group. |
−dev address |
Set input and output drive to the same address and load
an eventual ISO image. If there is no ISO image then create
a blank one. Set the image expansion method to growing. |
−indev address |
Set input drive and load an eventual ISO image. If the new input drive differs from -outdev then switch from growing to modifying or to blind growing. It depends on the setting of -grow_blindly which of both gets activated. The same rules and restrictions apply as with -dev. |
−outdev address |
Set output drive and if it differs from the input drive
then switch from growing to modifying or to blind growing.
Unlike -dev and -indev this action does not load a new ISO
image. So it can be performed even if there are pending
changes. |
−grow_blindly "off"|predicted_nwa |
If predicted_nwa is a non-negative number then perform
blind growing rather than modifying if -indev and -outdev
are set to different drives. "off" or
"-1" switch to modifying, which is the
default. |
|
The following options should normally be performed before loading an image by aquiring an input drive. In rare cases it is desirable to activate them only after image loading. |
−load entity id |
Load a particular (possibly outdated) ISO session from
-dev or -indev. Usually all available sessions are shown
with option -toc. |
−drive_class "harmless"|"banned"|"caution"|"clear_list" disk_pattern |
Add a drive path pattern to one of the safety lists or
make those lists empty. There are three lists defined which
get tested in the following sequence: |
−assert_volid pattern severity |
Refuse to load ISO images with volume ids which do not
match the given search pattern. When refusing an image, give
up the input drive and issue an event of the given severity
(like FAILURE, see -abort_on). An empty search pattern
accepts any image. |
−in_charset character_set_name |
Set the character set from which to convert file names when loading an image. This has eventually to be done before specifying -dev , -indev or -rollback. See paragraph "Character sets" for more explanations. When loading the written image after -commit the setting of -out_charset will be copied to -in_charset. |
−auto_charset "on"|"off" |
Enable or disable recording and interpretation of the
output character set name in an xattr attribute of the image
root directory. If enabled then an eventual recorded
character set name gets used as input character set when
reading an image. |
−hardlinks mode[:mode...] |
Enable or disable loading and recording of hardlink
relations. |
−acl "on"|"off" |
Enable or disable processing of ACLs. If enabled, then xorriso will obtain ACLs from disk file objects, store ACLs in the ISO image using the libisofs specific AAIP format, load AAIP data from ISO images, test ACL during file comparison, and restore ACLs to disk files when extracting them from ISO images. See also options -getfacl, -setfacl. |
−xattr "on"|"off" |
Enable or disable processing of xattr attributes in user namespace. If enabled, then xorriso will handle xattr similar to ACL. See also options -getfattr, -setfattr and above paragraph about xattr. |
−md5 "on"|"all"|"off" |
Enable or disable processing of MD5 checksums for the
overall session and for each single data file. If enabled
then images get loaded only if eventual checksums tags of
superblock and directory tree match properly. The MD5
checksums of data files and whole session get loaded from
the image if there are any. |
−for_backup |
Enable all extra features which help to produce or to restore backups with highest fidelity of file properties. Currently this is a shortcut for: -hardlinks on -acl on -xattr on -md5 on. |
−disk_dev_ino "on"|"ino_only"|"off" |
Enable or disable processing of recorded file
identification numbers (dev_t and ino_t). They are
eventually stored as xattr and allow to substantially
accelerate file comparison. The root node gets a global
start timestamp. If during comparison a file with younger
timestamps is found in the ISO image, then it is suspected
to have inconsistent content. |
−rom_toc_scan "on"|"force"|"off"[:"emul_on"|"emul_off"] |
Read-only drives do not tell the actual media type but
show any media as ROM (e.g. as DVD-ROM). The session history
of MMC multi-session media might be truncated to first and
last session or even be completely false. (The eventual
emulated history of overwriteable media is not affected by
this.) |
−calm_drive "in"|"out"|"all"|"revoke"|"on"|"off" |
Reduce drive noise until it is actually used again. Some
drives stay alert for substantial time after they have been
used for reading. This reduces the startup time for the next
drive operation but can be loud and waste energy if no i/o
with the drive is expected to happen soon. |
−ban_stdio_write |
Allow for writing only the usage of MMC optical drives. Disallow to write the result into files of nearly arbitrary type. Once set, this command cannot be revoked. |
|
The following commands expect file addresses of two
kinds: Note that in the ISO image you are as powerful as the superuser. Access permissions of the existing files in the image do not apply to your write operations. They are intended to be in effect with the read-only mounted image. If the iso_rr_path of a newly inserted file leads to an
existing file object in the ISO image, then the following
collision handling happens: The commands in this section alter the ISO image and not the local filesystem. |
−disk_pattern "on"|"ls"|"off" |
Set the pattern expansion mode for the disk_path
arguments of several commands which support this
feature. |
−add pathspec [...] | disk_path [***] |
Insert the given files or directory trees from filesystem
into the ISO image. |
−add_plainly mode |
If set to mode "unknown" then any command word
that does not begin with "-" and is not recognized
as known command will be subject to a virtual -add command.
I.e. it will be used as pathspec or as disk_path and added
to the image. Eventually -disk_pattern expansion applies to
disk_paths. |
−path_list disk_path |
Like -add but read the parameter words from file disk_path or standard input if disk_path is "-". The list must contain exactly one pathspec resp. disk_path pattern per line. |
−quoted_path_list disk_path |
Like -path_list but with quoted input reading rules. Lines get split into parameter words for -add. Whitespace outside quotes is discarded. |
−map disk_path iso_rr_path |
Insert file object disk_path into the ISO image as iso_rr_path. If disk_path is a directory then its whole sub tree is inserted into the ISO image. |
−map_single disk_path iso_rr_path |
Like -map, but if disk_path is a directory then its sub tree is not inserted. |
−map_l disk_prefix iso_rr_prefix disk_path [***] |
Perform -map with each of the disk_path arguments. iso_rr_path will be composed from disk_path by replacing disk_prefix by iso_rr_prefix. |
−update disk_path iso_rr_path |
Compare file object disk_path with file object
iso_rr_path. If they do not match, then perform the
necessary image manipulations to make iso_rr_path a matching
copy of disk_path. By default this comparison will imply
lengthy content reading before a decision is made. Options
-disk_dev_ino or -md5 may accelerate comparison if they were
already in effect when the loaded session was recorded. |
−update_r disk_path iso_rr_path |
Like -update but working recursively. I.e. all file
objects below both addresses get compared whether they have
counterparts below the other address and whether both
counterparts match. If there is a mismatch then the
necessary update manipulation is done. |
−update_l disk_prefix iso_rr_prefix disk_path [***] |
Perform -update_r with each of the disk_path arguments. iso_rr_path will be composed from disk_path by replacing disk_prefix by iso_rr_prefix. |
−cut_out disk_path byte_offset byte_count iso_rr_path |
Map a byte interval of a regular disk file into a regular
file in the ISO image. This may be necessary if the disk
file is larger than a single media, or if it exceeds the
traditional limit of 2 GiB - 1 for old operating systems, or
the limit of 4 GiB - 1 for newer ones. Only the newest Linux
kernels seem to read properly files >= 4 GiB - 1. |
−cpr disk_path [***] iso_rr_path |
Insert the given files or directory trees from filesystem
into the ISO image. |
−mkdir iso_rr_path [...] |
Create empty directories if they do not exist yet. Existence as directory generates a WARNING event, existence as other file causes a FAILURE event. |
|
−file_size_limit value [value [...]] -- |
Set the maximum permissible size for a single data file.
The values get summed up for the actual limit. If the only
value is "off" then the file size is not limited
by xorriso. Default is a limit of 100 extents, 4g -2k
each: |
−not_mgt code[:code[...]] |
Control the behavior of the exclusion lists. |
−not_paths disk_path [***] |
Add the given paths to the list of excluded absolute disk
paths. If a given path is relative, then the current -cdx is
prepended to form an absolute path. Eventual pattern
matching happens at definition time and not when exclusion
checks are made. |
−not_leaf pattern |
Add a single shell parser style pattern to the list of exclusions for disk leafnames. These patterns are evaluated when the exclusion checks are made. |
−not_list disk_path |
Read lines from disk_path and use each of them either as -not_paths argument, if they contain a / character, or as -not_leaf pattern. |
−quoted_not_list disk_path |
Like -not_list but with quoted input reading rules. Each word is handled as one argument for -not_paths resp. -not_leaf. |
−follow occasion[:occasion[...]] |
Enable or disable resolution of symbolic links and
mountpoints under disk_paths. This applies to actions -add,
-du*x, -ls*x, -findx, and to -disk_pattern expansion. Not an occasion but an optional setting is: |
−pathspecs "on"|"off" |
Control parameter interpretation with xorriso actions
-add and -path_list. |
−overwrite "on"|"nondir"|"off" |
Allow or disallow to overwrite existing files in the ISO
image by files with the same name. |
−split_size number["k"|"m"] |
Set the threshold for automatic splitting of regular
files. Such splitting maps a large disk file onto a ISO
directory with several part files in it. This is necessary
if the size of the disk file exceeds -file_size_limit. Older
operating systems can handle files in mounted ISO 9660
filesystems only if they are smaller than 2 GiB resp. 4
GiB. |
|
The following commands manipulate files in the ISO image, regardless whether they stem from the loaded image or were newly inserted. |
|
Set the pattern expansion mode for the iso_rr_path
arguments of several commands which support this
feature. |
−rm iso_rr_path [***] |
Delete the given files from the ISO image. |
−rm_r iso_rr_path [***] |
Delete the given files or directory trees from the ISO image. See also the note with option -rm. |
−rmdir iso_rr_path [***] |
Delete empty directories. |
−mv iso_rr_path [***] iso_rr_path |
Rename the given file objects in the ISO tree to the last
argument in the list. Use the same rules as with shell
command mv. |
−chown uid iso_rr_path [***] |
Set ownership of file objects in the ISO image. uid may either be a decimal number or the name of a user known to the operating system. |
−chown_r uid iso_rr_path [***] |
Like -chown but affecting all files below eventual directories. |
−chgrp gid iso_rr_path [***] |
Set group attribute of file objects in the ISO image. gid may either be a decimal number or the name of a group known to the operating system. |
−chgrp_r gid iso_rr_path [***] |
Like -chgrp but affecting all files below eventual directories. |
−chmod mode iso_rr_path [***] |
Equivalent to shell command chmod in the ISO image. mode
is either an octal number beginning with "0" or a
comma separated list of statements of the form
[ugoa]*[+-=][rwxst]* . |
−chmod_r mode iso_rr_path [***] |
Like -chmod but affecting all files below eventual directories. |
−setfacl acl_text iso_rr_path [***] |
Attach the given ACL to the given iso_rr_paths after
deleting their eventually existing ACLs. If acl_text is
empty, or contains the text "clear" or the text
"--remove-all", then the existing ACLs will be
removed and no new ones will be attached. Any other content
of acl_text will be interpreted as a list of ACL entries. It
may be in the long multi-line format as put out by -getfacl
but may also be abbreviated as follows: |
−setfacl_r acl_text iso_rr_path [***] |
Like -setfacl but affecting all files below eventual directories. |
−setfacl_list disk_path |
Read the output of -getfacl_r or shell command getfacl -R
and apply it to the iso_rr_paths as given in lines beginning
with "# file:". This will change ownership, group
and ACL of the given files. If disk_path is "-"
then lines are read from standard input. Line "@"
ends the list, "@@@" aborts without changing the
pending iso_rr_path. |
−setfattr [-]name value iso_rr_path [***] |
Attach the given xattr pair of name and value to the
given iso_rr_paths. If the given name is prefixed by
"-", then the pair with that name gets removed
from the xattr list. If name is "--remove-all"
then all user namespace xattr of the given iso_rr_paths get
deleted. In case of deletion, value must be an empty
text. |
−setfattr_r [-]name value iso_rr_path [***] |
Like -setfattr but affecting all files below eventual directories. |
−setfattr_list disk_path |
Read the output of -getfattr_r or shell command getfattr
-Rd and apply it to the iso_rr_paths as given in lines
beginning with "# file:". All previously existing
user space xattr of the given iso_rr_paths will be deleted.
If disk_path is "-" then lines are read from
standard input. |
−alter_date type timestring iso_rr_path [***] |
Alter the date entries of a file in the ISO image. type
is one of "a", "m", "b" for
access time, modification time, both times. |
−alter_date_r type timestring iso_rr_path [***] |
Like -alter_date but affecting all files below eventual directories. |
−hide hide_state iso_rr_path [***] |
Prevent the names of the given files from showing up in
the directory trees of ISO 9660 and/or Joliet when the image
gets written. The eventual data content of such hidden files
will be included in the resulting image, even if they do not
show up in any directory. But you will need own means to
find nameless data in the image. |
|
−find iso_rr_path [test [op] [test ...]] [-exec action [params]] -- |
A restricted substitute for shell command find in the ISO
image. It performs an action on matching file objects at or
below iso_rr_path. Default action is echo, i.e. to print the address
of the found file. Other actions are certain xorriso
commands which get performed on the found files. These
commands may have specific parameters. See also their
particular descriptions. |
|
Filters may be installed between data files in the
ISO image and their content source outside the image. They
may also be used vice versa between data content in the
image and target files on disk. |
−external_filter name option[:option] program_path [arguments] -- |
Register a content filter by associating a name with a
program path, program arguments, and some behavioral
options. Once registered it can be applied to multiple data
files in the ISO image, regardless whether their content
resides in the loaded ISO image or in the local filesystem.
External filter processes may produce synthetic file content
by reading the original content from stdin and writing to
stdout whatever they want. They must deliver the same output
on the same input in repeated runs. |
−unregister_filter name |
Remove an -external_filter registration. This is only possible if the filter is not applied to any file in the ISO image. |
−close_filter_list |
Irrevocably ban commands -external_filter and -unregister_filter, but not -set_filter. Use this to prevent external filtering in general or when all intended filters are registered. External filters may also be banned totally at compile time of xorriso. By default they are banned if xorriso runs under setuid permission. |
−set_filter name iso_rr_path [***] |
Apply an -external_filter or a built-in filter to the
given data files in the ISO image. If the filter suffix is
not empty , then it will be applied to the file name.
Renaming only happens if the filter really gets attached and
is not revoked by its options. By default files which
already bear the suffix will not get filtered. The others
will get the suffix appended to their names. If the filter
has option "remove_suffix", then the filter will
only be applied if the suffix is present and can be removed.
Name oversize or collision caused by suffix change will
prevent filtering. |
−set_filter_r name iso_rr_path [***] |
Like -set_filter but affecting all data files below eventual directories. |
|
(see also paragraph about settings below) |
−rollback |
Discard the manipulated ISO image and reload it from -indev. (Use -rollback_end if immediate program end is desired.) |
−commit |
Perform the write operation. Afterwards eventually make
the -outdev the new -dev and load the image from there.
Switch to growing mode. (A subsequent -outdev will activate
modification mode or blind growing.) -commit is performed
automatically at end of program if there are uncommitted
manipulations pending. Writing can last quite a while. It is not unnormal with several types of media that there is no progress visible for the first few minutes or that the drive gnaws on the media for a few minutes after all data have been transmitted. xorriso and the drives are in a client-server relationship. The drives have much freedom about what to do with the media. Some combinations of drives and media simply do not work, despite the promises by their vendors. If writing fails then try other media or another drive. The reason for such failure is hardly ever in the code of the various burn programs but you may well try some of those listed below under SEE ALSO. |
−eject "in"|"out"|"all" |
Eject the media in -indev, resp. -outdev, resp. both drives. Note: It is not possible yet to effectively eject disk files. |
−commit_eject "in"|"out"|"all"|"none" |
Combined -commit and -eject. When writing has finished do not make -outdev the new -dev, and load no ISO image. Rather eject -indev and/or -outdev. Eventually give up any non-ejected drive. |
−blank mode |
Make media ready for writing from scratch (if not -dummy
is activated). |
−format mode |
Convert unformatted DVD-RW into overwriteable ones,
"de-ice" DVD+RW, format newly purchased BD-RE or
BD-R, re-format DVD-RAM or BD-RE. |
−list_formats |
Put out a list of format descriptors as reported by the
output drive for the current media. The list gives the index
number after "Format idx", a MMC format code, the
announced size in blocks (like "2236704s") and the
same size in MiB. |
−list_profiles "in"|"out"|"all" |
Put out a list of media types supported by -indev, resp. -outdev, resp. both. The currently recognized type is marked by text "(current)". |
|
Rock Ridge info will be generated by the program unconditionally. ACLs will be written according to the setting of option -acl. |
−joliet "on"|"off" |
If enabled by "on", generate Joliet tree additional to ISO 9660 + Rock Ridge tree. |
−compliance rule[:rule...] |
Adjust the compliance to specifications of ISO 9660 and
its contemporary extensions. In some cases it is worth to
deviate a bit in order to circumvent bugs of the intended
reader system or to get unofficial extra features. |
−volid text |
Specify the volume ID. xorriso accepts any text up to 32
characters, but according to rarely obeyed specs stricter
rules apply: |
−volset_id text |
Set the volume set id string to be written with the next -commit. Permissible are up to 128 characters. This setting gets overridden by image loading. |
−publisher text |
Set the publisher id string to be written with the next -commit. This may identify the person or organisation who specified what shall be recorded. Permissible are up to 128 characters. This setting gets overridden by image loading. |
−application_id text |
Set the application id string to be written with the next
-commit. This may identify the specification of how the data
are recorded. Permissible are up to 128 characters. This
setting gets overridden by image loading. |
−system_id text |
Set the system id string to be written with the next -commit. This may identify the system which can recognize and act upon the content of the System Area in image blocks 0 to 15. Permissible are up to 32 characters. This setting gets overridden by image loading. |
−volume_date type timestring |
Set one of the four overall timestamps for subsequent
image writing. Available types are: |
−copyright_file text |
Set the copyright file name to be written with the next -commit. This should be the ISO 9660 path of a file in the image which contains a copyright statement. Permissible are up to 37 characters. This setting gets overridden by image loading. |
−abstract_file text |
Set the abstract file name to be written with the next -commit. This should be the ISO 9660 path of a file in the image which contains an abstract statement about the image content. Permissible are up to 37 characters. This setting gets overridden by image loading. |
−biblio_file text |
Set the biblio file name to be written with the next -commit. This should be the ISO 9660 path of a file in the image which contains bibliographic records. Permissible are up to 37 characters. This setting gets overridden by image loading. |
−preparer_id |
Set the preparer id string to be written with the next
-commit. This may identify the person or other entity which
controls the preparation of the data which shall be
recorded. Normally this should be the id of xorriso and not
of the person or program which operates xorriso. Please
avoid to change it. Permissible are up to 128
characters. |
−out_charset character_set_name |
Set the character set to which file names get converted when writing an image. See paragraph "Character sets" for more explanations. When loading the written image after -commit the setting of -out_charset will be copied to -in_charset. |
−uid uid |
User id to be used for all files when the new ISO tree gets written to media. |
−gid gid |
Group id to be used for all files when the new ISO tree gets written to media. |
−zisofs option[:options] |
Set global parameters for zisofs compression. This data
format is recognized and transparently uncompressed by some
Linux kernels. It is to be applied via option -set_filter
with built-in filter "--zisofs". Parameters
are: |
−speed number[k|m|c|d|b] |
Set the burn speed. Default is 0 = maximum speed. Speed
can be given in media dependent numbers or as a desired
throughput per second in MMC compliant kB (= 1000) or MB (=
1000 kB). Media x-speed factor can be set explicity by
"c" for CD, "d" for DVD, "b"
for BD, "x" is optional. |
−stream_recording "on"|"off"|"full"|"data"|number |
Setting "on" tries to circumvent the management
of defects on DVD-RAM, BD-RE, or BD-R. Defect management
keeps partly damaged media usable. But it reduces write
speed to half nominal speed even if the media is in perfect
shape. For the case of flawless media, one may use
-stream_recording "on" to get full speed. |
−dvd_obs "default"|"32k"|"64k" |
GNU/Linux specific: Set the number of bytes to be transmitted with each write operation to DVD or BD media. A number of 64 KB may improve throughput with bus systems which show latency problems. The default depends on media type, on option -stream_recording , and on compile time options. |
−stdio_sync "on"|"off"|number |
Set the number of bytes after which to force output to stdio: pseudo drives. This forcing keeps the memory from being clogged with lots of pending data for slow devices. Default "on" is the same as "16m". Forced output can be disabled by "off". |
−dummy "on"|"off" |
If "on" then simulate burning or refuse with FAILURE event if no simulation is possible, do neither blank nor format. |
−fs number["k"|"m"] |
Set the size of the fifo buffer which smoothens the data stream from ISO image generation to media burning. Default is 4 MiB, minimum 64 kiB, maximum 1 GiB. The number may be followed by letter "k" or "m" which means unit is kiB (= 1024) or MiB (= 1024 kiB). |
−close "on"|"off" |
If "on" then mark the written media as not
appendable any more (if possible at all with the given type
of target media). |
−padding number["k"|"m"] |
Append the given number of extra bytes to the image
stream. This is a traditional remedy for a traditional bug
in block device read drivers. Needed only for CD recordings
in TAO mode. Since one can hardly predict on what media an
image might end up, xorriso adds the traditional 300k of
padding by default to all images. |
|
Contrary to published specifications many BIOSes will
load an El Torito record from the first session on media and
not from the last one, which gets mounted by default. This
makes no problems with overwriteable media, because they
appear to inadverted readers as one single session. |
−boot_image "any"|"isolinux"|"grub" |
"discard"|"keep"|"patch"|"show_status"|bootspec|"next" El Torito boot images of any type can be newly inserted,
or discarded, or patched, or kept unaltered. Whether to
patch or to keep depends on whether the boot images contain
boot info tables. A bootspec is a word of the form name=value and is
used to describe the parameters of a boot image by an El
Torito record and eventually a MBR. The names
"dir", "bin_path", "efi_path"
lead to El Torito bootable images. Name
"system_area" activates a given file as MBR. |
|
File names are strings of non-zero bytes with 8 bit each.
Unfortunately the same byte string may appear as different
peculiar national characters on differently nationalized
terminals. The meanings of byte codes are defined in
character sets which have names. Shell command iconv
-l lists them. |
−charset character_set_name |
Set the character set from which to convert file names when loading an image and to which to convert when writing an image. |
−local_charset character_set_name |
Override the system assumption of the local character set name. If this appears necessary, one should consider to set -backslash_codes to "on" in order to avoid dangerous binary codes being sent to the terminal. |
|
Since the tasks of xorriso are manifold and prone to
external influence, there may arise the need for xorriso to
report and handle problem events. |
−abort_on severity |
Set the severity threshold for events to abort the
program. |
−return_with severity exit_value |
Set the threshold and exit_value to be returned at
program end if no abort has happened. This is to allow
xorriso to go on after problems but to get a failure
indicating exit value from the program, nevertheless. Useful
is a value lower than the -abort_on threshold, down to
"WARNING". |
−report_about severity |
Set the threshold for events to be reported. |
−error_behavior occasion behavior |
Control the program behavior at problem event occasions.
For now this applies to occasions "image_loading"
which is given while an image tree is read from the input
device, and to "file_extraction" which is given
with osirrox options like -extract. |
|
−dialog "on"|"off"|"single_line" |
Enable or disable to enter dialog mode after all
arguments are processed. In dialog mode input lines get
prompted via readline or from stdin. |
−page length width |
Describe terminal to the text pager. See also above,
paragraph Result pager. |
−use_readline "on"|"off" |
If "on" then use readline for dialog. Else use
plain stdin. |
−reassure "on"|"tree"|"off" |
If "on" then ask the user for "y" or
"n": |
|
−devices |
Show list of available MMC drives with the addresses of
their libburn standard device files. |
−toc |
Show media specific table of content. This is the media
session history, not the ISO image directory tree. |
−mount_cmd drive entity id path |
Emit an appropriate command line for mounting the ISO
session indicated by drive, entity and id. The result will
be different on GNU/Linux and on FreeBSD. |
−mount_opts option[:option...] |
Set options which influence -mount and -mount_cmd. Currently there is only option "exclusive" which is default and its counterpart "shared". The latter causes xorriso not to give up the affected drive with command -mount. On GNU/Linux it adds mount option "loop" which may allow to mount several sessions of the same block device at the same time. One should not write to a mounted optical media, of course. Take care to umount all sessions before ejecting. |
−session_string drive entity id format |
Print to the result channel a text which gets composed
according to format and the parameters of the addressed
session. |
−print_size |
Print the foreseeable consumption of 2048 byte blocks by next -commit. This can last a while as a -commit gets prepared and only in last moment is revoked by this option. |
−tell_media_space |
Print available space on output media and the free space after subtracting already foreseeable consumption by next -commit. |
−pvd_info |
Print various id strings which can be found in loaded ISO images. Some of them may be changed by options like -volid or -publisher. For these ids -pvd_info reports what would be written with the next -commit. |
|
−cd iso_rr_path |
Change the current working directory in the ISO image.
This is prepended to iso_rr_paths which do not begin with
’/’. |
−cdx disk_path |
Change the current working directory in the local filesystem. To be prepended to disk_paths which do not begin with ’/’. |
−pwd |
Tell the current working directory in the ISO image. |
−pwdx |
Tell the current working directory in the local filesystem. |
−ls iso_rr_pattern [***] |
List files in the ISO image which match shell patterns
(i.e. with wildcards ’*’ ’?’
’[a-z]’). If a pattern does not begin with
’/’ then it is compared with addresses relative
to -cd. |
−lsd iso_rr_pattern [***] |
Like -ls but listing directories as themselves and not by their content. This resembles shell command ls -d. |
−lsl iso_rr_pattern [***] |
Like -ls but also list some of the file attributes. The
output format resembles shell command ls -ln. |
−lsdl iso_rr_pattern [***] |
Like -lsd but also list some of the file attributes. The output format resembles shell command ls -dln. |
−lsx disk_pattern [***] |
List files in the local filesystem which match shell
patterns. Patterns which do not begin with ’/’
are used relative to -cdx. |
−lsdx disk_pattern [***] |
Like -lsx but listing directories as themselves and not by their content. This resembles shell command ls -d. |
−lslx disk_pattern [***] |
Like -lsx but also listing some of the file attributes. Output format resembles shell command ls -ln. |
−lsdlx disk_pattern [***] |
Like -lsdx but also listing some of the file attributes. Output format resembles shell command ls -dln. |
−getfacl iso_rr_pattern [***] |
Print the access permissions of the given files in the ISO image using the format of shell command getfacl. If a file has no ACL then it gets fabricated from the -chmod settings. A file may have a real ACL if it was introduced into the ISO image while option -acl was set to "on". |
−getfacl_r iso_rr_pattern [***] |
Like -gefacl but listing recursively the whole file trees underneath eventual directories. |
−getfattr iso_rr_pattern [***] |
Print the xattr of the given files in the ISO image. If a file has no such xattr then noting is printed for it. |
−getfattr_r iso_rr_pattern [***] |
Like -gefattr but listing recursively the whole file trees underneath eventual directories. |
−du iso_rr_pattern [***] |
Recursively list size of directories and files in the ISO image which match one of the patterns. similar to shell command du -k. |
−dus iso_rr_pattern [***] |
List size of directories and files in the ISO image which match one of the patterns. Similar to shell command du -sk. |
−dux disk_pattern [***] |
Recursively list size of directories and files in the local filesystem which match one of the patterns. Similar to shell command du -k. |
−dusx disk_pattern [***] |
List size of directories and files in the local filesystem which match one of the patterns. Similar to shell command du -sk. |
−findx disk_path [-name pattern] [-type t] [-exec action [params]] -- |
Like -find but operating on local filesystem and not on
the ISO image. This is subject to the settings of
-follow. |
−compare disk_path iso_rr_path |
Compare attributes and eventual data file content of a
fileobject in the local filesystem with a file object in the
ISO image. The iso_rr_path may well point to an image file
object which is not yet committed, i.e. of which the data
content still resides in the local filesystem. Such data
content is prone to externally caused changes. |
−compare_r disk_path iso_rr_path |
Like -compare but working recursively. I.e. all file objects below both addresses get compared whether they have counterparts below the other address and whether both counterparts match. |
−compare_l disk_prefix iso_rr_prefix disk_path [***] |
Perform -compare_r with each of the disk_path arguments. iso_rr_path will be composed from disk_path by replacing disk_prefix by iso_rr_prefix. |
−show_stream iso_rr_path [***] |
Display the content stream chain of data files in the ISO
image. The chain consists of the iso_rr_name and one or more
streams, separated by " < " marks. A stream
consists of one or more texts eventually in
’’-quotation marks, eventually separated by
":" characters. The first text describes the
stream type, the following ones describe its individual
properties. Frequently used types are: |
−show_stream_r iso_rr_path [***] |
Like -show_stream but working recursively. |
|
It is not uncommon that optical media produce read
errors. The reasons may be various and get obscured by error
correction which is performed by the drives and based on
extra data on the media. If a drive returns data then one
can quite trust that they are valid. But at some degree of
read problems the correction will fail and the drive is
supposed to indicate error. |
−check_media [option [option ...]] -- |
Try to read data blocks from the indev drive, eventually
copy them to a disk file, and finally report about the
encountered quality. Several options may be used to modify
the default behavior. |
−check_media_defaults [option [option ...]] -- |
Preset options for runs of -check_media, -extract_cut and
best_effort file extraction. Eventual options given with
-check_media will override the preset options. -extract_cut
will override some options automatically. |
−check_md5 severity iso_rr_path [***] |
Compare the data content of the given files in the loaded
image with their recorded MD5 checksums, if there are any.
In case of any mismatch an event of the given severity is
issued. It may then be handled by appropriate settings of
options -abort_on or -return_with which both can cause
non-zero exit values of the program run. Severity ALL
suppresses that event. |
−check_md5_r severity iso_rr_path [***] |
Like -check_md5 but checking all data files underneath the given paths. Only mismatching data files will be reported. |
|
Normally xorriso only writes to disk files which were
given as stdio: pseudo-drives or as log files. But its alter
ego osirrox is able to extract file objects from ISO images
and to create, overwrite, or delete file objects on
disk. |
−osirrox "on"|"device_files"|"off"|"banned"|[:option:...] |
Setting "off" disables disk filesystem
manipulations. This is the default unless the program was
started with leafname "osirrox". Elsewise the
capability to restore files can be enabled explicitly by
-osirrox "on". It can be irrevocably disabled by
-osirrox "banned". |
−extract iso_rr_path disk_path |
Copy the file objects at and underneath iso_rr_path to
their corresponding addresses at and underneath disk_path.
This is the inverse of -map or -update_r. |
−extract_single iso_rr_path disk_path |
Like -extract, but if iso_rr_path is a directory then its sub tree gets not restored. |
−extract_l iso_rr_prefix disk_prefix iso_rr_path [***] |
Perform -extract with each of the iso_rr_path arguments. disk_path will be composed from iso_rr_path by replacing iso_rr_prefix by disk_prefix. |
−extract_cut iso_rr_path byte_offset byte_count disk_path |
Copy a byte interval from a data file out of an ISO image
into a newly created disk file. The main purpose for this is
to allow handling of large files if they are not supported
by mount -t iso9660 and if the reading system is unable to
buffer them as a whole. |
−cpx iso_rr_path [***] disk_path |
Copy single leaf file objects from the ISO image to the
address given by disk_path. If more then one iso_rr_path is
given then disk_path must be a directory or non-existent. In
the latter case it gets created and the extracted files get
installed in it with the same leafnames. |
−cpax iso_rr_path [***] disk_path |
Like -cpx but restoring mtime, atime as in ISO image and trying to set ownership and group as in ISO image. |
−cp_rx iso_rr_path [***] disk_path |
Like -cpx but also extracting whole directory trees from
the ISO image. |
−cp_rax iso_rr_path [***] disk_path |
Like -cp_rx but restoring mtime, atime as in ISO image and trying to set ownership and group as in ISO image. |
−paste_in iso_rr_path disk_path byte_offset byte_count |
Read the content of a ISO data file and write it into a data file on disk beginning at the byte_offset. Write at most byte_count bytes. This is the inverse of option -cut_out. |
−mount drive entity id path |
Produce the same line as -mount_cmd and then execute it as external program run after giving up the depicted drive. See also -mount_opts. This demands -osirrox to be enabled and normally will succeed only for the superuser. For safety reasons the mount program is only executed if it is reachable as /bin/mount or /sbin/mount. |
|
Writing of ISO 9660 on CD is traditionally done by program mkisofs as ISO 9660 image producer and cdrecord as burn program. xorriso does not strive for their comprehensive emulation. Nevertheless it is ready to perform some of its core tasks under control of commands which in said programs trigger comparable actions. |
|
Perform the variable length option list as sparse emulation of the program depicted by the personality word. Personality "mkisofs" accepts the
options listed with: Personality "cdrecord" accepts the
options listed with: |
−read_mkisofsrc |
Try one by one to open for reading: ./.mkisofsrc ,
$MKISOFSRC , $HOME/.mkisofsrc , $(dirname $0)/.mkisofsrc |
−pacifier behavior_code |
Control behavior of UPDATE pacifiers during write
operations. The following behavior codes are defined: |
−scdbackup_tag list_path record_name |
Set the parameter "name" for a scdbackup
checksum record. It will be appended in an scdbackup
checksum tag to the -md5 session tag if the image starts at
LBA 0. This is the case if it gets written as first session
onto a sequential media, or piped into a program, named pipe
or character device. |
|
−no_rc |
Only if used as first command line argument this option prevents reading and interpretation of eventual startup files. See section FILES below. |
−options_from_file fileaddress |
Read quoted input from fileaddress and executes it like dialog lines. |
−help |
Print helptext. |
−version |
Print program name and version, component versions, license. |
−history textline |
Copy textline into libreadline history. |
−status mode|filter |
Print the current settings of xorriso. Modes: |
−status_history_max number |
Set maximum number of history lines to be reported with -status "long_history". |
−list_delimiter word |
Set the list delimiter to be used instead of
"--". It has to be a single word, must not be
empty, not longer than 80 characters, and must not contain
quotation marks. |
−backslash_codes "on"|"off"|mode[:mode] |
Enable or disable the interpretation of symbolic
representations of special characters with quoted input, or
with program arguments, or with program text output. If
enabled the following translations apply: |
−temp_mem_limit number["k"|"m"] |
Set the maximum size of temporary memory to be used for
image dependent buffering. Currently this applies to pattern
expansion, LBA sorting, restoring of hard links. |
−print text |
Print a text to result channel. |
−prompt text |
Show text at beginning of output line and wait for the user to hit the Enter key resp. to send a line via stdin. |
−errfile_log mode path|channel |
If problem events are related to input files from the
filesystem, then their disk_paths can be logged to a file or
to output channels R or I. |
−session_log path |
If path is not empty it gives the address of a plain text
file where a log record gets appended after each session.
This log can be used to determine the start_lba of a session
for mount options -o sbsector= resp. -s from date or volume
id. |
−scsi_log "on"|"off" |
Mode "on" enables very verbous logging of SCSI
commands and drive replies. Logging messages get printed to
stderr, not to any of the xorriso output channels. |
−end |
End program after writing eventually pending changes. |
−rollback_end |
Discard pending changes. End program immediately. |
# any text |
Only in dialog or file execution mode, and only as first non-whitespace in line: Do not execute the line but eventually store it in history. |
|
−pkt_output "on"|"off" |
Consolidate text output on stdout and classify each line
by a channel indicator: |
−logfile channel fileaddress |
Copy output of a channel to the given file. Channel may be one of: "." for all channels, "I" for info messages, "R" for result lines, "M" for -mark texts. |
−mark text |
If text is not empty it will get put out on "M" channel each time after a dialog line has been processed. |
−prog text |
Use text as name of this program in subsequent messages |
−prog_help text |
Use text as name of this program and perform -help. |
Overview of examples: |
As superuser learn about available drives |
As superuser learn about available drives |
On Linux or FreeBSD consider to give rw-permissions to
those users or groups which shall be able to use the drives
with xorriso. On Solaris use pfexec. Consider to restrict
privileges of xorriso to "base,sys_devices" and to
give r-permission to user or group. |
Blank media and compose a new ISO image as batch run |
Aquire drive /dev/sr2, make media ready for writing a new
image, fill the image with the files from hard disk
directories /home/me/sounds and /home/me/pictures. The ISO image may be shaped in a more elaborate way like
the following: Omit some unwanted stuff by removing it from
the image directory tree. Reintroduce some wanted stuff. |
A dialog session doing about the same |
Some settings are already given as start argument. The
other activities are done as dialog input. The pager gets
set to 20 lines of 80 characters. |
Manipulate an existing ISO image on the same media |
Load image from drive. Remove (i.e. hide) directory
/sounds and its subordinates. Rename directory
/pictures/confidential to /pictures/restricted. Change
access permissions of directory /pictures/restricted. Add
new directory trees /sounds and /movies. Burn to the same
media, check whether the tree can be loaded, and eject. |
Copy modified ISO image from one media to another |
Load image from input drive. Do the same manipulations as
in the previous example. Aquire output drive and blank it.
Burn the modified image as first and only session to the
output drive. |
Bring a prepared ISOLINUX tree onto media and make it bootable |
The user has already created a suitable file tree on disk
and copied the ISOLINUX files into subdirectory
./boot/isolinux of that tree. Now xorriso can burn an El
Torito bootable media: |
Change existing file name tree from ISO-8859-1 to UTF-8 |
This example assumes that the existing ISO image was
written with character set ISO-8859-1 but that the readers
expected UTF-8. Now a new session with the same files gets
added with converted file names. In order to avoid any
weaknesses of the local character set, this command pretends
that it uses already the final target set UTF-8. Therefore
strange file names may appear in eventual messages which
will be made terminal-safe by option -backslash_codes. |
Operate on storage facilities other than optical drives |
Full read-write operation is possible with regular files
and block devices: |
Burn an existing ISO image file to media |
Actually this works with any kind of data, not only ISO
images: |
Perform multi-session runs as of cdrtools traditions |
Between both processes there can be performed arbitrary
transportation or filtering. |
Let xorriso work underneath growisofs |
growisofs expects an ISO formatter program which
understands options -C and -M. If xorriso gets started by
name "xorrisofs" then it is suitable for that. |
Adjust thresholds for verbosity, exit value and program abort |
Be quite verbous, exit 32 if severity "FAILURE"
was encountered, do not abort prematurely but forcibly go on
until the end of commands. |
Examples of input timestrings |
As printed by program date: ’Thu Nov 8 14:51:13
CET 2007’ |
Incremental backup of a few directory trees |
This changes the directory trees /open_source_project and
/personal_mail in the ISO image so that they become exact
copies of their disk counterparts. ISO file objects get
created, deleted or get their attributes adjusted
accordingly. |
Restore directory trees from a particular ISO session to disk |
This is an alternative to mounting the media and using
normal file operations. |
Try to retrieve blocks from a damaged media |
$ xorriso -abort_on NEVER -indev /dev/sr0 \ |
Program alias names: |
Normal installation of xorriso creates three links or
copies which by their program name pre-select certain
settings: |
Startup files: |
If not -no_rc is given as the first argument then xorriso
attempts on startup to read and execute lines from the
following files: |
Runtime control files: |
The default setting of -check_media abort_file= is: |
For mounting xorriso generated ISO 9660 images (-t iso9660) |
mount(8) |
Libreadline, a comfortable input line facility |
readline(3) |
Other programs which produce ISO 9660 images |
mkisofs(8), genisoimage(8) |
Other programs which burn sessions to optical media |
growisofs(1), cdrecord(1), wodim(1), cdrskin(1) |
ACL and xattr |
getfacl(1), setfacl(1), getfattr(1), setfattr(1) |
MD5 checksums |
md5sum(1) |
Thomas Schmitt <scdbackup@gmx.net> |
Copyright (c) 2007 - 2010 Thomas Schmitt |
xorriso is in part based on work by Vreixo Formoso who
provides libisofs together with Mario Danic who also leads
the libburnia team. Thanks to Andy Polyakov who invented
emulated growing, to Derek Foreman and Ben Jansens who once
founded libburn. |