XORRISOFS(1) | General Commands Manual | XORRISOFS(1) |
NAME¶
xorrisofs - Emulation of ISO 9660 program mkisofs by program xorrisoSYNOPSIS¶
xorrisofs [ options ] [-o filename ] pathspec [pathspecs ...]DESCRIPTION¶
xorrisofs produces Rock Ridge enhanced ISO 9660 filesystems and add-on sessions to such filesystems. Optionally it can produce Joliet directory trees too.ISO 9660, Rock Ridge, Joliet, HFS+:¶
ISO 9660 (aka ECMA-119) is a read-only filesystem that is mainly used for optical media CD, DVD, BD, but may also reside on other storage devices like disk files, USB sticks or disk partitions. It is widely readable by many operating systems and by boot facilities of personal computers.Inserting files into the ISO image:¶
xorrisofs deals with two kinds of file addresses:Relation to program xorriso:¶
xorrisofs is actually a command mode of program xorriso, which gets entered either by xorriso command "-as mkisofs" or by starting the program by one of the names "xorrisofs", "mkisofs", "genisoimage", or "genisofs".OPTIONS¶
- Image loading:
- -M disk_path
- Set the path from which to load the existing ISO image directory tree on
which to base the upcomming directory tree as add-on session. The path
must lead to a random-access readable file object. On GNU/Linux: regular
data files or block device files.
- -prev-session disk_path
- Alias of -M.
- -dev disk_path
- Alias of -M.
- -C last_session_start,next_writeable_address
- Set the 2 KiB block address last_session_start from where to read the ISO
image out of the file given by option -M.
dd if=/dev/... count=1 >/dev/null 2>&1
values=$(xorriso -as cdrecord dev=/dev/... -msinfo)
echo $values
- -cdrecord-params last_session_start,next_writeable_address
- Alias of -C.
- Settings for file insertion:
- -path-list disk_path
- Read pathspecs line-by-line from disk_file and insert the depicted file objects into the ISO image. If disk_path is "-" then read the pathspecs from standard input.
- --quoted_path_list disk_path
- Like option -path-list but reading quoted words rather than plain lines.
Whitespace outside of quotes will be discarded. On the other hand it is
possible to represent pathspecs which contain newline characters.
- -f
-
- -follow-links
- Alias of -f.
- -graft-points
- Enable interpretation of input file pathspecs as combination of iso_rr_path and disk_path, separated by a =-character.
- -m disk_pattern
- Exclude files from being inserted into the image. Silently ignored are
those files of which the disk_path matches the given shell parser pattern.
If no /-character is part of the pattern, then it gets matched against the
leaf name of the disk file.
- -exclude
- Alias of -m.
- -x
-
- -old-exclude
- Alias of -m.
- -exclude-list disk_path
- Perform -m using each line out of file disk_path as argument disk_pattern.
- -z
-
- -transparent-compression
- Alias of -z.
- -root iso_rr_path
- Insert all files under the given iso_rr_path. If option -graft-points is
given, then iso_rr_path is prepended to each target part of a pathspec.
- -old-root iso_rr_path
- Enable incremental insertion of files into the loaded image. The effective
target and source addresses of given pathspecs get compared whether the
target already exists in the ISO image and is still identical to the
source on disk. Metadata in the ISO image will get adjusted, if they
differ from those on disk. New files and files with changed content will
get newly added. Target files which do not exist in any of the according
pathspec sources will get removed from the ISO directory tree.
- --old-root-no-ino
- Disable recording and use of disk inode numbers. If no disk inode numbers
are recorded, then option -old-root will have to read disk file content
and compare it with the MD5 checksum that is recorded in the ISO image.
- --old-root-devno
- Enable comparison of recorded device numbers together with recorded inode numbers. This works only with good old stable device numbers which get out of fashion, regrettably. If the hard disk has a different device number after each reboot, then this comparison will see all files as changed and thus prevent any incremental size saving.
- --old-root-no-md5
- Disable recording and use of MD5 checksums for data file content. If neither checksums and nor disk inode numbers are recorded, then option -old-root will have to read ISO image file content when comparing it with disk file content.
- Settings for image production:
- -o disk_path
- Set the output file address for the emerging ISO image. If the address
exists as regular file, it will be truncated to length 0 when image
production begins. It may not already exist as directory. If it does not
exist yet then its parent directory must exist and a regular file will get
created.
- -output disk_path
- Alias of -o.
- --stdio_sync "on"|"off"|number
- Set the number of bytes after which to force output to disk in order to
keep 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".
- --emul-toc
- Write a second superblock with the first session into random-access files.
If further sessions get appended and the first superblock gets updated,
then the second superblock will not be overwritten. This allows to still
mount the first session and to find the start blocks of the further
sessions.
- --no-emul-toc
- Do not write a second superblock with the first session into random-access
files.
- --sort-weight weight_number iso_rr_path
- Attribute a LBA weight number to regular files. If iso_rr_path leads to a
directory then all regular files underneath will get the weight_number.
- --sort-weight-list disk_path
- Read pairs of weight number and iso_rr_path from a file of the local
filesystem. Apply each pair like with --sort-weight.
-as mkisofs --sort-weight-list disk_path --
- --sort-weight-patterns disk_path
- Like --sort-weight-list , but expanding the iso_rr_paths as shell parser patterns and applying --sort-weight to each matching file.
- -dir-mode mode
- Set the access permissions for all directories in the image to the given mode which is either an octal number beginning with "0" or a comma separated list of statements of the form [ugoa]*[+-=][rwxst]* . E.g. ug=rx,a-rwx
- -file-mode mode
- Like -dir-mode but for all regular data files in the image.
- -pad
-
- -no-pad
- Disable padding of 300 KiB to the end of the produced ISO image. This is safe if the image is not meant to be written on CD or if it gets written to CD as only track in write mode SAO.
- --old-empty
- Use the old way of of giving block addresses in the range of [0,31] to files with no own data content. The new way is to have a dedicated block to which all such files will point.
- Settings for standards compliance:
- -iso-level number
- Specify the ISO 9660 version which defines the limitations of file naming
and data file size. The naming restrictions do not apply to the Rock Ridge
names but only to the low-level ISO 9660 names. There are three
conformance levels:
- -disallow_dir_id_ext
- Do not follow a bad habit of mkisofs which allows dots in the ISO names of directories. On the other hand, some bootable GNU/Linux images depend on this bad habit.
- -U
-
- -untranslated-filenames
- Alias of -U.
- -untranslated_name_len number
- Allow ISO file names up to the given number of characters without any
character conversion. The maximum number is 96. If a file name has more
characters, then image production will fail deliberately.
- -allow-lowercase
- Allow lowercase character in ISO file names.
- -relaxed-filenames
- Allow nearly all 7-bit characters in ISO file names. Not allowed are 0x0
and '/'. If not option -allow-lowercase is given, then lowercase letters
get converted to uppercase.
- -d
-
- -omit-period
- Alias of -d.
- -l
-
- -full-iso9660-filenames
- Alias of -l.
- -max-iso9660-filenames
- Allow up to 37 characters in ISO file names.
- -N
-
- -omit-version-number
- Alias of -N.
- Settings for standards extensions:
- -R
-
- -rock
-
- -r
-
- -rational-rock
- Alias of -r.
- --norock
-
- -D
- The standard ECMA-119 demands that no path in the image shall have more
than 8 name components or 255 characters. Therefore it would be necessary
to move deeper directory trees to a higher directory. Rock Ridge offers an
opportunity to let these relocated directories appear at their orginal
deep position, but this feature might not be implemented properly by
operating systems which mount the image.
- -disable-deep-relocation
- Alias of -D.
- -rr_reloc_dir name
- Enable the relocation of deep directories and thus avoid ECMA-119 file
paths of more than 8 name components or 255 characters. Directories which
lead to such file paths will get moved to a directory in the root
directory of the image. Its name gets set by this option. It is
permissible to use the root directory itself.
- -hide-rr-moved
- Alias of -rr_reloc_dir "/.rr_moved"
- --for_backup
- Enable options which improve backup fidelity: --acl, --xattr, --md5, --hardlinks.
- --acl
-
- --xattr
-
- --md5
-
-find / -exec get_md5
- --hardlinks
- Enable loading and recording of hardlink relations. Search for families of
iso_rr files which stem from the same disk file, have identical content
filtering and have identical properties. The members of each family get
the same inode number in the ISO image.
- --scdbackup_tag disk_path record_name
- Append a scdbackup checksum record to the image. This works only if the
parameter next_writeable_address of option -C is 0. If disk_path is not an
empty string, then append a scdbackup checksum record to the end of this
file. record_name is a word that gets part of tag and record.
- -J
-
- -joliet
- Alias of -J.
- -joliet-long
- Allow 103 characters in Joliet file names rather than 64 as is prescribed
by the specification. Allow Joliet paths longer than the prescribed limit
of 240 characters.
- -hfsplus
- Enable the production of an additional HFS+ filesystem inside the ISO 9660
image and mark it by Apple Partition Map (APM) entries in the System Area,
the first 32 KiB of the image.
- -hfsplus-serial-no
- Set a string of 16 digits "0" to "9" and letters "a" to "f", which will be used as unique serial number of an emerging HFS+ filesystem.
- -hfsplus-block-size number
- Set the allocation block size to be used when producing HFS+ filesystems. Permissible are 512, 2048, or 0. The latter lets the program decide.
- -apm-block-size number
- Set the block size to be used when describing partitions by an Apple
Partition Map. Permissible are 512, 2048, or 0. The latter lets the
program decide.
- -hfsplus-file-creator-type creator type iso_rr_path
- Set the HFS+ creator and type attributes of a file in the emerging image. These are two codes of 4 characters each.
- -hfs-bless-by blessing iso_rr_path
- Issue a HFS+ blessing. They are roles which can be attributed to up to
four directories and a data file:
- -hfs-bless disk_path
- Issue HFS+ blessing "ppc_bootdir" to the directory which stems
from the directory disk_path in the local filesystem tree.
- Settings for file hiding:
- -hide disk_path_pattern
- Make files invisible in the directory tree of ISO 9660 and Rock Ridge, if
their disk_path matches the given shell parser pattern. The 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.
- -hide-list disk_path
- Perform -hide using each line out of file disk_path as argument disk_path_pattern.
- -hide-joliet disk_path_pattern
- Like option -hide but making files invisible in the directory tree of Joliet, if their disk_path matches the given shell parser pattern.
- -hide-joliet-list disk_path
- Perform -hide-joliet using each line out of file disk_path as argument disk_path_pattern.
- -hide-hfsplus disk_path_pattern
- Like option -hide but making files invisible in the directory tree of HFS+, if their disk_path matches the given shell parser pattern.
- -hide-hfsplus-list disk_path
- Perform -hide-hfsplus using each line out of file disk_path as argument disk_path_pattern.
- ISO image ID strings:
- -V text
- Set the Volume Id of the ISO image. xorriso accepts any text up to 32
characters, but according to rarely obeyed specs stricter rules apply:
- -volid text
- Alias of -V.
- -volset text
- Set the Volume Set Id of the ISO image. Permissible are up to 128 characters.
- -P text
- Set the Publisher Id of the ISO image. This may identify the person or organisation who specified what shall be recorded. Permissible are up to 128 characters.
- -publisher text
- Alias of -P.
- -A text
- Set the Application Id of the ISO image. This may identify the
specification of how the data are recorded. Permissible are up to 128
characters.
- -appid text
- Alias of -A.
- -sysid text
- Set the System Id of the ISO image. 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.
- -p text
- Set the Preparer Id of the ISO image. 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.
- -preparer text
- Alias of -p.
- -abstract iso_path
- Set the address of the Abstract File of the ISO image. 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.
- -biblio iso_path
- Set the address of the Biblio File of the ISO image. This should be the ISO 9660 path of a file in the image which contains bibliographic records. Permissible are up to 37 characters.
- -copyright iso_path
- Set the address of the Copyright File of the ISO image. This should be the ISO 9660 path of a file in the image which contains a copyright statement. Permissible are up to 37 characters.
- --modification-date=YYYYMMDDhhmmsscc
- Set a timestring that overrides ISO image creation and modification
timestamps literally. It must consist of 16 decimal digits which form
YYYYMMDDhhmmsscc, with YYYY between 1970 and 2999. Time zone is GMT. It is
supposed to match this GRUB line:
search --fs-uuid --set YYYY-MM-DD-hh-mm-ss-cc
- --application_use character|0xXY|disk_path
- Specify the content of the Application Use field which can take at most
512 bytes.
- El Torito Bootable ISO images:
- -b iso_rr_path
- Specify the boot image file which shall be mentioned in the current entry
of the El Torito boot catalog. It will be marked as suitable for PC-BIOS.
- -eltorito-boot iso_rr_path
- Alias of -b.
- -eltorito-alt-boot
- Finalize the current El Torito boot catalog entry and begin a new one. A boot image file and all its necessary options shall be specified before option -eltorito-alt-boot. All further El Torito boot options apply to the new catalog entry. Up to 32 catalog entries are possible.
- -e iso_rr_path
- Specify the boot image file which shall be mentioned in the current entry
of the El Torito boot catalog. It will be marked as suitable for EFI.
- --efi-boot iso_rr_path
- Perform -eltorito-alt-boot, option -e with the given iso_rr_path, and again -eltorito-alt-boot. This gesture is used for achieving EFI-bootability of the GRUB2 rescue CD.
- -boot-load-size number
- Set the number of 512-byte blocks for boot images which emulate a floppy or a hard disk. A safe default for non-emulating boot images is 4.
- -hard-disk-boot
- Mark the boot image in the current catalog entry as emulated hard disk. (Not suitable for any known boot loader.)
- -no-emul-boot
- Mark the boot image in the current catalog entry as not emulating floppy
or hard disk. (This is to be used with all known boot loaders.)
- -eltorito-id text|56_hexdigits
- Define the ID string of the boot catalog section where the boot image will be listed. If the value consists of 56 characters [0-9A-Fa-f] then it is converted into 28 bytes, else the first 28 characters become the ID string. The ID string of the first boot image becomes the overall catalog ID. It is limited to 24 characters. Other id_strings become section IDs.
- -eltorito-selcrit hexdigits
- Define the Selection Criteria of the boot image. Up to 20 bytes get read from the given characters [0-9A-Fa-f]. They get attributed to the boot image entry in the catalog.
- -boot-info-table
- Overwrite bytes 8 to 63 in the current boot image. The information will be supplied by xorriso in the course of image production: Block address of the Primary Volume Descriptor, block address of the boot image file, size of the boot image file.
- --grub2-boot-info
- Overwrite bytes 2548 to 2555 in the current boot image by the address of that boot image. The address is written as 64 bit little-endian number. It is the 2KB block address of the boot image content, multiplied by 4, and then incremented by 5.
- -c iso_rr_path
- Set the address of the El Torito boot catalog file within the image. This file address is not significant for the booting PC-BIOS or EFI, but it may later be read by other programs in order to learn about the available boot images.
- -eltorito-catalog iso_rr_path
- Alias of -c.
- --boot-catalog-hide
- Prevent the El Torito boot catalog from appearing as file in the directory trees of the image.
- System Area, MBR, GPT, APM, other boot blocks:
- -G disk_path
- Copy at most 32768 bytes from the given disk file to the very start of the
ISO image.
- -generic-boot disk_path
- Alias of -G.
- --embedded-boot disk_path
- Alias of -G.
- --grub2-mbr disk_path
- Install disk_path in the System Area and treat it as modern GRUB2 MBR. The content start address of the first boot image is converted to a count of 512 byte blocks, and an offset of 4 is added. The result is written as 64 bit little-endian number to byte address 0x1b0.
- -isohybrid-mbr disk_path
- Install disk_path as ISOLINUX isohybrid MBR which makes the boot image
given by option -b bootable from USB sticks and hard disks via PC-BIOS.
This preparation is normally done by ISOLINUX program isohybrid on the
already produced ISO image.
- -isohybrid-gpt-basdat
- Mark the current El Torito boot image (see options -b and -e) in GPT as
partition of type Basic Data. This works only with -isohybrid-mbr and has
the same impact on the system area as -efi-boot-part. It cannot be
combined with -efi-boot-part or -hfsplus.
- -isohybrid-gpt-hfsplus
- Mark the current El Torito boot image (see options -b and -e) in GPT as partition of type HFS+. Impact and restrictions are like with -isohybrid-gpt-basdat.
- -isohybrid-apm-hfsplus
- Mark the current El Torito boot image (see options -b and -e) in Apple
Partition Map as partition of type HFS+. This works only with
-isohybrid-mbr and has a similar impact on the system area as -hfsplus. It
cannot be combined with -efi-boot-part or -hfsplus.
- --protective-msdos-label
- Patch the System Area by a simple PC-DOS partition table where partition 1 claims the range of the ISO image but leaves the first block unclaimed.
- -partition_offset 2kb_block_adr
- Cause a partition table with a single partition that begins at the given
block address. This is counted in 2048 byte blocks, not in 512 byte
blocks. If the block address is non-zero then it must be at least 16.
Values larger than 16 are hardly of use. A non-zero partition offset
causes two superblocks to be generated and two sets of directory trees.
The image is then mountable from its absolute start as well as from the
partition start.
- -partition_hd_cyl number
- Set the number of heads per cylinder for the partition table. 0 chooses a default value. Maximum is 255.
- -partition_sec_hd number
- Set the number of sectors per head for the partition table. 0 chooses a
default value. Maximum is 63.
- -partition_cyl_align mode
- Control image size alignment to an integer number of cylinders. It is
prescribed by isohybrid specs and it seems to please program fdisk.
Cylinder size must be divisible by 2048. Images larger than 8,323,596,288
bytes cannot be aligned.
- -append_partition partition_number type_code disk_path
- Cause a prepared filesystem image to be appended to the ISO image and to
be described by a partition table entry in a boot block at the start of
the emerging ISO image. The partition entry will bear the size of the
submitted file rounded up to the next multiple of 2048 bytes or to the
next multiple of the cylinder size.
- -efi-boot-part disk_path
- Copy a file from disk into the emerging ISO image and mark it by a GPT
entry as EFI System Partition. EFI boot firmware is supposed to use a FAT
filesystem image in such a partition for booting from USB stick or hard
disk.
- -chrp-boot-part
- Mark the block range of the whole emerging ISO image as MBR partition of
type 0x41. This is not compatible with any other feature that produces MBR
partition entries. It makes GPT unrecognizable.
- -prep-boot-part disk_path
- Copy a file from disk into the emerging ISO image and mark it by a MBR partition entry of type 0x96. PReP boot firmware is supposed to read the content of the partition as single ELF executable file. This option is compatible with other MBR partitions and with GPT.
- -mips-boot iso_rr_path
- Declare a data file in the image to be a MIPS Big Endian boot file and cause production of a MIPS Big Endian Volume Header. This is mutually exclusive with production of other boot blocks like MBR. It will overwrite the first 512 bytes of any data provided by -G. Up to 15 boot files can be declared by multiple -mips-boot options.
- -mipsel-boot iso_rr_path
- Declare a data file in the image to be the MIPS Little Endian boot file. This is mutually exclusive with other boot blocks. It will overwrite the first 512 bytes of any data provided by -G. Only a single boot file can be declared by -mipsel-boot.
- -B disk_path[,disk_path ...]
- Cause one or more data files on disk to be written after the end of the
ISO image. A SUN Disk Label will be written into the first 512 bytes of
the ISO image which lists this image as partition 1 and the given
disk_paths as partition 2 up to 8.
- -sparc-boot disk_path[,disk_path ...]
- Alias of -B.
- -sparc-label text
- Set the ASCII label text of a SUN Disk Label.
- --grub2-sparc-core iso_rr_path
- Cause the content address and size of the given data file in the image to be written after the SUN Disk Label. Both numbers are counted in bytes. The address is written as 64 bit big-endian number to byte 0x228. The size is written as 32 bit big-endian number to byte 0x230.
- Character sets:
- -input-charset character_set_name
- Set the character set from which to convert disk file names when inserting them into the ISO image.
- -output-charset character_set_name
- Set the character set from which to convert names of loaded ISO images and to which to convert names when writing ISO images.
- Jigdo Template Extraction:
$ xorrisofs -version 2>&1 | grep '^libjte' && echo YES
- -jigdo-jigdo disk_path
- Set the disk_path for the .jigdo file with the checksums and download addresses for filling the holes in .template.
- -jigdo-template disk_path
- Set the disk_path for the .template file with the holed and compressed ISO image copy.
- -jigdo-min-file-size size
- Set the minimum size for a data file to be listed in the .jigdo file and being a hole in the .template file. size may be a plain number counting bytes, or a number with appended letter "k", "m", "g" to count KiB (1024 bytes), MiB (1024 KiB), or GiB (1024 MiB).
- -jigdo-force-md5 disk_path_pattern
- adds a regular expression pattern which will get compared with the absolute disk_path of any data file that was not found in the .md5 list. A match causes a MISHAP event, which normally does not abort the program run but finally causes a non-zero exit value of the program.
- -jigdo-exclude disk_path_pattern
- Add a regular expression pattern which will get compared with the absolute disk_path of any data file. A match causes the file to stay in .template in any case.
- -jigdo-map To=From
- Add a string pair of the form To=From to the parameter list. If a data file gets listed in the .jigdo file, then it is referred by the file address from its line in the .md5 file. This file address gets checked whether it begins with the From string. If so, then this string will be replaced by the To string and a ':' character, before it goes into the .jigdo file. The From string should end by a '/' character.
- -md5-list disk_path
- Set the disk_path where to find the .md5 input file.
- -jigdo-template-compress "gzip"|"bzip2"
- Choose one of "bzip2" or "gzip" for the compression of the template file. The jigdo file is put out uncompressed.
- -checksum_algorithm_iso list_of_names
- Choose one or more of "md5", "sha1", "sha256", "sha512" for the auxiliary "# Image Hex" checksums in the .jigdo file. The list_of_names may e.g. look like "md5,sha1,sha512". Value "all" chooses all available algorithms. Note that MD5 stays always enabled.
- -checksum_algorithm_template list_of_names
- Choose the algorithms for the "# Template Hex" checksums in the .jigdo file. The rules for list_of_names are the same as with -checksum_algorithm_iso.
- Miscellaneous options:
- -print-size
- Print to stdandard output the foreseeable number of 2048 byte blocks in
the emerging ISO image. Do not produce this image.
- --no_rc
- Only if used as first argument this option prevents reading and interpretation of startup files. See section FILES below.
- -help
-
- -quiet
-
- -gui
-
- -log-file disk_path
-
- -v
-
- -verbose
- Alias of -v.
- -version
- Print to standard output a text that begins with
"mkisofs 2.01-Emulation Copyright (C)"
EXAMPLES¶
Overview of examples:¶
A simple image production runA simple image production run¶
A prepared file tree in directory ./for_iso gets copied into the root directory of the ISO image. File permissions get set to read-only for everybody. Joliet attributes for Microsoft systems get added. The resulting image gets written as data file ./image.iso on disk.$ xorrisofs -r -J -o ./image.iso ./for_iso
Set ISO image paths by -graft-points¶
Without option -graft-points each given disk file is copied into the root directory of the ISO image, maintaining its name. If a directory is given, then its files and sub-directories are copied into the root directory, maintaining their names.$ xorrisofs ... /home/me/datafile /tmp/directory
/datafile
/file_1_from_directory
...
/file_N_from_directory
$ xorrisofs ... -graft-points /home/me/datafile /dir=/tmp/directory
/datafile
/dir
/datafiles/file1=/home/me/datafile
/datafiles/file1
/with_\=_and_\\/file=/tmp/directory/file
/with_=_and_\/file
Perform multi-session runs¶
This example works for multi-session media only: CD-R[W], DVD-R[W], DVD+R, BD-R. Add cdrskin option --grow_overwriteable_iso to all -as cdrecord runs in order to enable multi-session emulation on overwriteable media.$ xorrisofs -graft-points \
/tree1=prepared_for_iso/tree1 \
| xorriso -as cdrecord -v dev=/dev/sr0 blank=fast -multi -eject -
$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
$ m=$(xorriso -as cdrecord dev=/dev/sr0 -msinfo)
$ xorrisofs -M /dev/sr0 -C $m -graft-points \
/tree2=prepared_for_iso/tree2 \
| xorriso -as cdrecord -v dev=/dev/sr0 -waiti -multi -eject -
Let xorrisofs work underneath growisofs¶
growisofs expects an ISO formatter program which understands options -C and -M. A variable is defined to override the hardcoded default name.$ export MKISOFS="xorrisofs"
$ growisofs -Z /dev/dvd /some/files
$ growisofs -M /dev/dvd /more/files
$ ln -s $(which xorriso) "$HOME/xorrisofs"
$ export MKISOFS="$HOME/xorrisofs"
$ growisofs -Z /dev/dvd --for_backup -- \
outdev - -update_r /my/files /files
$ growisofs -M /dev/dvd --for_backup -- \
outdev - -update_r /my/files /files
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.$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
$ msinfo=$(xorriso -as cdrecord dev=/dev/sr0 -msinfo)
$ load_opts=
$ test -n "$msinfo" && load_opts="-M /dev/sr0 -C $msinfo"
$ xorrisofs $load_opts -o - --for_backup -m '*.o' -m '*.swp' \
-V PROJ_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" -graft-points \
-old-root / \
/projects=/home/thomas/projects \
/personal_mail=/home/thomas/personal_mail \
| xorriso -as cdrecord dev=/dev/sr0 -v -multi -waiti -eject -
$ xorriso -dev /dev/sr0 -toc
$ xorriso -mount_cmd /dev/sr0 session 12 /mnt
$ xorriso -mount_cmd /dev/sr0 volid '*2008_12_05*' /mnt
mount -t iso9660 -o nodev,noexec,nosuid,ro,sbsector=1460256 '/dev/sr0' '/mnt'
# osirrox -mount /dev/sr0 "volid" '*2008_12_05*' /mnt
Incremental backup with accumulated trees¶
Solaris does not offer the option to mount older sessions. In order to keep them accessible, one may map all files to a file tree under a session directory and accumulate those directories from session to session. The -root tree is cloned from the -old-root tree before it gets compared with the appropriate trees on disk.$ xorrisofs -root /session1 \
-o - --for_backup -m '*.o' -m '*.swp' \
-V PROJ_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" -graft-points \
/projects=/home/thomas/projects \
/personal_mail=/home/thomas/personal_mail \
| xorriso -as cdrecord dev=/dev/sr0 -v blank=as_needed \
-multi -waiti -eject -
$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
$ msinfo=$(xorriso -as cdrecord dev=/dev/sr0 -msinfo)
$ load_opts=
$ test -n "$msinfo" && load_opts="-M /dev/sr0 -C $msinfo"
$ xorrisofs $load_opts -root /session2 -old-root /session1 \
-o - --for_backup -m '*.o' -m '*.swp' \
-V PROJ_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" -graft-points \
/projects=/home/thomas/projects \
/personal_mail=/home/thomas/personal_mail \
| xorriso -as cdrecord dev=/dev/sr0 -v -multi -waiti -eject -
Create bootable images for PC-BIOS¶
The ISOLINUX wiki prescribes to create on disk a directory ./CD_root and to copy all desired files underneath that directory. Especially file isolinux.bin shall be copied to ./CD_root/isolinux/isolinux.bin . This is the boot image file.$ xorrisofs -o output.iso \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
./CD_root
$ xorriso -as cdrecord -v dev=/dev/sr0 blank=as_needed output.iso
$ xorrisofs -o output.iso \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
-partition_offset 16 \
./CD_root
# dd bs=2K if=/dev/sdb count=50K >/dev/null
# dd bs=2K if=output.iso of=/dev/sdb
FILES¶
Startup files:¶
If not --no_rc is given as the first argument then xorrisofs attempts on startup to read and execute lines from the following files:/etc/default/xorriso
/etc/opt/xorriso/rc
/etc/xorriso/xorriso.conf
$HOME/.xorrisorc
./.mkisofsrc
$MKISOFSRC
$HOME/.mkisofsrc
$(dirname $0)/.mkisofsrc
APPI default for -A
PUBL default for -publisher
SYSI default for -sysid
VOLI default for -V
VOLS default for -volset
SEE ALSO¶
- For generic xorriso command mode
- xorriso(1)
- For the cdrecord emulation of xorriso
- xorrecord(1)
- For mounting xorriso generated ISO 9660 images (-t iso9660)
- mount(8)
- Other programs which produce ISO 9660 images
- mkisofs(8), genisoimage(8)
- Programs which burn sessions to optical media
- growisofs(1), cdrecord(1), wodim(1), cdrskin(1), xorriso(1)
- ACL and xattr
- getfacl(1), setfacl(1), getfattr(1), setfattr(1)
- MD5 checksums
- md5sum(1)
- On FreeBSD the commands for xattr and MD5 differ
- getextattr(8), setextattr(8), md5(1)
BUGS¶
To report bugs, request help, or suggest enhancements for xorriso, please send electronic mail to the public list <bug-xorriso@gnu.org>. If more privacy is desired, mail to <scdbackup@gmx.net>.AUTHOR¶
Thomas Schmitt <scdbackup@gmx.net>COPYRIGHT¶
Copyright (c) 2011 - 2013 Thomas SchmittCREDITS¶
xorrisofs is in part based on work by Vreixo Formoso who provides libisofs together with Mario Danic who also leads the libburnia team. Vladimir Serbinenko contributed the HFS+ filesystem code and related knowledge.Version 1.3.2, Aug 07, 2013 |