### QEMU Installation Command Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md This command starts a QEMU virtual machine to install an operating system from an ISO image. It configures networking, storage, and boots from the CD-ROM. ```bash $ qemu \ -enable-kvm \ -m 512 \ -net nic,model=ne2k_pci \ -hda /dvdbuffer/i386-install.qemu \ -cdrom debian-6.0.3-i386-netinst.iso \ -boot d ``` -------------------------------- ### QEMU VM Start Command (qemu-2.1.2) Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md This command starts a QEMU virtual machine, similar to the previous version but with adjustments for passing through a host CD-ROM drive using a different configuration. ```bash $ qemu \ -enable-kvm \ -nographic \ -m 512 \ -net nic,model=ne2k_pci \ -net user,hostfwd=tcp::5557-:22 \ -hda /dvdbuffer/i386-install.qemu \ -cdrom .../some_image.iso \ -drive file=/dev/sr0,index=2,if=virtio ``` -------------------------------- ### Install Libburnia Libraries Source: https://dev.lovelyhq.com/libburnia/web/wiki/Releases.md Execute the 'make install' command to install the built libraries. This step may require superuser privileges. ```bash make install ``` -------------------------------- ### Install Xorriso (Superuser) Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md Command to install the compiled xorriso binary as a superuser. This makes the new version available system-wide. ```bash # make install ``` -------------------------------- ### QEMU VM Start Command (qemu-1.0-rc3) Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md This command initiates a QEMU virtual machine with specific configurations for KVM, networking, and storage, including passing through a host CD-ROM drive. ```bash $ qemu \ -enable-kvm \ -nographic \ -m 512 \ -net nic,model=ne2k_pci \ -net user,hostfwd=tcp::5557-:22 \ -hda /dvdbuffer/i386-install.qemu \ -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 ``` -------------------------------- ### Device Translation Example for cdrskin Source: https://dev.lovelyhq.com/libburnia/web/wiki/Cdrskin.md This example shows how to use the `dev_translation` option to map frontend program device assumptions to cdrskin's reported devices. The '+' character is used as a separator. ```bash dev_translation=+0,0,0+/dev/hdc ``` ```bash dev_translation=-cd+dvd-1,0,0 ``` -------------------------------- ### Create QEMU Disk Image Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md Command to create a new QEMU disk image of a specified size. This is used to prepare the storage for the guest operating system installation. ```bash $ qemu-img create /dvdbuffer/i386-install.qemu 8G ``` -------------------------------- ### Configure FIFO Buffer Start Source: https://dev.lovelyhq.com/libburnia/web/wiki/Cdrskin.md Use `fifo_start_at=` to control when burning begins with unsteady data streams. It allows burning to start after a specified number of bytes are read, rather than waiting for the FIFO to be completely full, potentially reducing initial delay at the risk of early underruns. ```bash cdrskin ... fs=128m fifo_start_at=20m ... ``` ```bash cdrskin ... fifo_start_at=0 ... ``` -------------------------------- ### Creating an ISO Image using xorriso's mkisofs Emulation Source: https://dev.lovelyhq.com/libburnia/web/wiki/FAQ.md This example shows how to create an ISO image using xorriso's emulation of the mkisofs command. It uses the -graft-points option to map local directories to ISO directories. ```bash xorriso -as mkisofs \ -o $HOME/result.iso \ -graft-points \ /sounds=/home/me/sounds \ /pictures=/home/me/pictures ``` -------------------------------- ### Execute Compiled Xorriso Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md How to execute the xorriso binary directly from the build directory without installing it system-wide. Useful for testing or temporary use. ```bash $ ./xorriso/xorriso ...arguments... ``` -------------------------------- ### Example ACL Entry - Access and Default ACLs with User Source: https://dev.lovelyhq.com/libburnia/web/wiki/AAIP.md Demonstrates the byte-level representation of ACL entries for both 'access' and 'default' ACLs, including a SWITCH_MARK and a specific user entry for 'lisa'. ```text { 'A', 'L', 20, 1, 0, 0, 0, 0, 11, 0x17, 0x35, 0x65, 0x81, 0x17, 0x35, 0x57, 0x65, 0xA7, 1, 123 } ``` -------------------------------- ### Build libisoburn from Repository Source: https://dev.lovelyhq.com/libburnia/web/wiki/Releases.md Clone the libisoburn repository and build it using autotools. Ensure you have autotools version 1.7 or higher installed. ```bash git clone https://dev.lovelyhq.com/libburnia/libisoburn.git cd libisoburn ./bootstrap ; ./configure ; make ``` -------------------------------- ### Build libisofs from Repository Source: https://dev.lovelyhq.com/libburnia/web/wiki/Releases.md Clone the libisofs repository and build it using autotools. Ensure you have autotools version 1.7 or higher installed. ```bash git clone https://dev.lovelyhq.com/libburnia/libisofs.git cd libisofs ./bootstrap ; ./configure ; make ``` -------------------------------- ### Interactive xorriso GUI Tutorial Source: https://dev.lovelyhq.com/libburnia/web/wiki/FAQ.md The xorriso-tcltk GUI can be used as an interactive exploration tool. It requires xorriso version 1.2.6 or later, Tcl/Tk, and optionally the BWidget package. Starting it with --script_log_file - logs xorriso commands to the terminal. ```bash xorriso-tcltk --script_log_file - ``` -------------------------------- ### Build libburn from Repository Source: https://dev.lovelyhq.com/libburnia/web/wiki/Releases.md Clone the libburn repository and build it using autotools. Ensure you have autotools version 1.7 or higher installed. ```bash git clone https://dev.lovelyhq.com/libburnia/libburn.git cd libburn ./bootstrap ; ./configure ; make ``` -------------------------------- ### Check Xorriso Version Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md Command to display the installed xorriso version and its components. Ensure the version is at least 1.1.8 for compatibility. ```bash $ xorriso -version ``` -------------------------------- ### Using /dev/sg* with xorriso (>= 1.4.4) for ISO creation Source: https://dev.lovelyhq.com/libburnia/web/wiki/ConcurrentLinuxSr.md This command uses xorriso to create an ISO image, specifying the SCSI device family as 'sg' and using the 'cdrecord' emulation mode. This is an alternative to the previous example for ISO creation. ```bash xorriso -as cdrecord drive_scsi_dev_family=sg dev=/dev/sr1 -v image2.iso ``` -------------------------------- ### Specify Write Start Address Source: https://dev.lovelyhq.com/libburnia/web/wiki/Cdrskin.md Use `write_start_address` to position the track on media aligned to a 32KiB boundary. This is particularly relevant for media like DVD-RAM, DVD+RW, BD-RE, and overwriteable DVD-RW. ```bash cdrskin ... write_start_address=2412m ... ``` -------------------------------- ### Example ACL Entry - User and Group Permissions Source: https://dev.lovelyhq.com/libburnia/web/wiki/AAIP.md Illustrates the byte-level representation of an ACL entry for user and group permissions, including specific user 'lisa' and group 'toolies' with their associated numeric IDs. ```text { 'A', 'L', 20, 1, 0, 0, 0, 0, 11, 0x16, 0xAE, 1, 123, 0x34, 0xCE, 2, 255, 254, 0x54, 0x64 } ``` -------------------------------- ### AAIP Example: Two Attribute-Value Pairs Source: https://dev.lovelyhq.com/libburnia/web/wiki/AAIP.md Encodes two attribute-value pairs ('name' and 'one') across two AL entries. The first entry contains the 'name' component record and starts the 'long...content' value, marking continuation. The second entry completes the 'long...content' and adds the 'one' attribute-value pair, marking the end of the Attribute List. ```text Field 1 contains the Component Record of Name and one Component Record of Value : { 'A', 'L', 255, 1, 1, 0, 4, 'n', 'a', 'm', 'e', 1, 255, 'l', 'o', 'n', 'g', ... 238 more bytes, 13 go to next AL ... } Field 2 contains the rest of "long...content" and the complete second pair. It marks the end of the Attribute List : { 'A', 'L', 38, 1, 0, ... 13 remaining bytes of the Component Record in first entry ... 0, 7, 'c', 'o', 'n', 't', 'e', 'n', 't', 0, 3, 'o', 'n', 'e', 0, 4, 'm', 'o', 'r', 'e' } ``` -------------------------------- ### Xorriso Build Instructions Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md Steps to download, configure, and compile xorriso from source. This is useful if the distribution's version is outdated. ```bash http://ftpmirror.gnu.org/xorriso/xorriso-1.1.8.tar.gz ``` ```bash $ tar xzf xorriso-1.1.8.tar.gz $ cd xorriso-1.1.8 $ ./configure && make ``` -------------------------------- ### AAIP Namespace Short Notation Examples Source: https://dev.lovelyhq.com/libburnia/web/wiki/AAIP.md Demonstrates the use of short notation for namespaces in AAIP. The first example shows 'user.abc' with and without the short notation (using 0x03 for 'user.'). The second example shows how to escape a reserved character using 0x01. ```text Name "user.abc" with and without short notation. Both is allowed. 0, 4, 0x03, 'a', 'b', 'c' 0 8, 'u', 's', 'e', 'r', '.', 'a', 'b', 'c' Name "\003abc" (if really desired) 0, 5, 0x01, 0x03, 'a', 'b', 'c' ``` -------------------------------- ### List cdrskin-specific options Source: https://dev.lovelyhq.com/libburnia/web/wiki/Cdrskin.md Use the `--help` option with two dashes to display cdrskin-specific command-line options. Some options are experimental and require coordination with developers. ```bash cdrskin --help ``` -------------------------------- ### zisofs Header Structure Example Source: https://dev.lovelyhq.com/libburnia/web/wiki/zisofs.md Illustrates the byte-level structure of a zisofs header, including signature, length, algorithm, and size fields. This example shows a specific case with a block size of 32 kiB and an uncompressed file size of 1,234,567 bytes. ```text | 'Z' | 'F' | LENGTH | 1 | 'p' | 'z' | HEADER SIZE DIV 4 | LOG2 BLOCK SIZE | UNCOMPRESSED SIZE | ``` ```text { 'Z', "F', 16, 1, 'p', 'z', 4, 15, 0x87, 0xD6, 0x12, 0x00, 0x00, 0x12, 0xD6, 0x87 } ``` -------------------------------- ### Creating an ISO Image with xorriso Source: https://dev.lovelyhq.com/libburnia/web/wiki/FAQ.md This snippet demonstrates how to create an ISO image using xorriso's native commands. It maps local directories to directories within the ISO image. The output file should not pre-exist. ```bash xorriso -outdev $HOME/result.iso \ -map /home/me/sounds /sounds \ -map /home/me/pictures /pictures ``` -------------------------------- ### List cdrecord-compatible options Source: https://dev.lovelyhq.com/libburnia/web/wiki/Cdrskin.md Use the `-help` option to display cdrecord-compatible command-line options for cdrskin. Behavior is similar to the original cdrecord man page. ```bash cdrskin -help ``` -------------------------------- ### libisoburn API for Partition Offset Source: https://dev.lovelyhq.com/libburnia/web/wiki/PartitionOffset.md Functions to set and get the partition offset and system area options using the libisoburn library. ```APIDOC ## libisoburn API ### `isoburn_igopt_set_part_offset` Sets the partition offset for the image generation options. #### Parameters - `struct isoburn_imgen_opts *opts` - Pointer to the image generation options structure. - `uint32_t block_offset_2k` - The partition offset in 2KB blocks. - `int secs_512_per_head` - Number of 512-byte sectors per head. - `int heads_per_cyl` - Number of heads per cylinder. ### `isoburn_igopt_get_part_offset` Retrieves the partition offset from the image generation options. #### Parameters - `struct isoburn_imgen_opts *opts` - Pointer to the image generation options structure. - `uint32_t *block_offset_2k` - Pointer to store the partition offset in 2KB blocks. - `int *secs_512_per_head` - Pointer to store the number of 512-byte sectors per head. - `int *heads_per_cyl` - Pointer to store the number of heads per cylinder. ### `isoburn_igopt_set_system_area` Sets the system area for the image generation options. #### Parameters - `struct isoburn_imgen_opts *o` - Pointer to the image generation options structure. - `char data[32768]` - Buffer containing the system area data. - `int options` - Options for the system area. ### `isoburn_igopt_get_system_area` Retrieves the system area from the image generation options. #### Parameters - `struct isoburn_imgen_opts *o` - Pointer to the image generation options structure. - `char data[32768]` - Buffer to store the system area data. - `int *options` - Pointer to store the system area options. ``` -------------------------------- ### Build Libburnia Libraries Source: https://dev.lovelyhq.com/libburnia/web/wiki/Releases.md Extract the tarball, navigate into the directory, and run the configure and make commands to build the libraries. Ensure you have 'make' and a C compiler available. ```bash tar xzf .../lib...x.y.z.tar.gz cd lib...x.y.z ./configure ; make ``` -------------------------------- ### AAIP Example: Long Qualifier Name Source: https://dev.lovelyhq.com/libburnia/web/wiki/AAIP.md Demonstrates a long qualifier name requiring two records, showing the structure for extended names. ```text Example: A very long qualifier naming "His_Excellency_..._the_Boss" as user #1. This needs two qualifier records. 0x08, 255, 0, 1,0,0,0, 0,0,0,1, 'H', 'i', 's', '_', 'E', 'x', 'c', 'e', 'l', 'e', ... 108 more bytes ... 8, 't', 'h', 'e', '_', 'B', 'o', 's', 's', ``` -------------------------------- ### AAIP Example: User ID to Name Association Source: https://dev.lovelyhq.com/libburnia/web/wiki/AAIP.md Illustrates how a user ID number is associated with a user name using AAIP qualifier bytes. ```text Example: User id number 123 gets associated with user name "lisa" 0x08, 13, 0, 123,0,0,0, 0,0,0,123, 'l', 'i', 's', 'a', ``` -------------------------------- ### Configure Build Environment Source: https://dev.lovelyhq.com/libburnia/web/wiki/Releases.md This command is a prerequisite for building from repositories on BSD systems. It must be run before any other configure steps. ```bash ./configure ``` -------------------------------- ### Build GRUB 2 Image Source: https://dev.lovelyhq.com/libburnia/web/wiki/PartitionOffset.md Builds a bootable ISO image using the modified GRUB 2 build scripts. The output image is saved to 'image.iso'. ```bash ./grub-mkrescue -o image.iso ``` -------------------------------- ### Read All Content from Mounted Device Source: https://dev.lovelyhq.com/libburnia/web/wiki/PartitionOffset.md Reads all content from a mounted file system and pipes it to 'wc' to get a byte count. This is a method to test the integrity and completeness of the data. ```bash tar cf - /mnt | wc ``` -------------------------------- ### Create Hybrid ISO with Partition Offset using xorriso Source: https://dev.lovelyhq.com/libburnia/web/wiki/PartitionOffset.md Creates a new ISO image using xorriso, incorporating an existing MBR and setting a partition offset. This enables the image to be bootable from USB and mountable as a partition. ```bash xorriso -as mkisofs \ -o new_image.iso \ -b boot/isolinux/isolinux.bin -c boot/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -isohybrid-mbr RIPLinux-9.3-non-X.mbr \ -partition_offset 16 \ /mnt ``` -------------------------------- ### Clone libburnia Project Repositories Source: https://dev.lovelyhq.com/libburnia/web/wiki/Home.md Clone the latest unstable versions of the libburnia project libraries using git. Ensure you have autotools version 1.7 or later installed for building. ```bash git clone https://dev.lovelyhq.com/libburnia/libburn.git git clone https://dev.lovelyhq.com/libburnia/libisofs.git git clone https://dev.lovelyhq.com/libburnia/libisoburn.git ``` -------------------------------- ### AAIP Path Format Example Source: https://dev.lovelyhq.com/libburnia/web/wiki/AAIP.md Illustrates the path format used in AAIP, which is isomorphic to the RRIP SL field format. This format allows for arbitrary byte values in components. ```text / name1 / value1 / name2 / value2 / name3 / value3 / ... ``` -------------------------------- ### Create Partition Image by Skipping Offset Source: https://dev.lovelyhq.com/libburnia/web/wiki/PartitionOffset.md Creates a new image file by skipping the initial blocks defined by the partition offset. This simulates mounting just the partition from an ISO image. ```bash dd if=new_image.iso of=partition_image.iso bs=2048 skip=16 mount -o loop partition_image.iso /mnt1 ``` -------------------------------- ### Using xorriso with grub-mkrescue Source: https://dev.lovelyhq.com/libburnia/web/wiki/FAQ.md When xorriso is not found by tools like grub-mkrescue, you can specify its absolute path using the --xorriso option. This is useful when xorriso is installed in a non-standard location or compiled from source. ```bash grub-mkrescue --xorriso=$HOME/xorriso-1.3.8/xorriso/xorriso -o output.iso ``` -------------------------------- ### Handling MD5 Mismatch During Verification Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md This example shows the expected output on stderr when an MD5 checksum mismatch is detected during verification. It indicates the specific file with the mismatch and the resulting exit value will be non-zero. ```text ... MD5 MISMATCH: '/usr/bin/ncursesw5-config' ... Mismatch detected between file contents and MD5 checksums. 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 ``` -------------------------------- ### Writing a DAO Session with xorriso Source: https://dev.lovelyhq.com/libburnia/web/wiki/QemuXorriso.md This command writes a Data-At-Once (DAO) session to the optical medium, adding the contents of a specified directory. Ensure '-close on' is included to finalize the session. The stderr output shows the progress of file addition and writing. ```bash $ xorriso -md5 on -outdev /dev/sr1 -close on -add /usr/bin -- ``` ```text ... xorriso : UPDATE : 594 files added in 1 seconds ... xorriso : UPDATE : Thank you for being patient. Working since 2 seconds. xorriso : UPDATE : Writing: 32s 0.1% fifo 100% buf 0% 0.1xD ... xorriso : UPDATE : Writing: 2704s 5.1% fifo 11% buf 0% 3.9xD ... xorriso : UPDATE : Writing: 20208s 38.2% fifo 52% buf 99% 4.0xD ... xorriso : UPDATE : Writing: 52885s 100.0% fifo 0% buf 99% 0.0xD ISO image produced: 52735 sectors Written to media : 52885 sectors at LBA 0 Writing to '/dev/sr1' completed successfully. ```