最後更新: 2020-07-29
目錄
Tools
- wodim <-- wodim, readom
- genisoimage <-- isoinfo, isovfy,
- dvd+rw-tools <-- growisofs
genisoimage
支援 ISO9660/Joliet/HFS filesystem
Install
apt-get install genisoimage
genisoimage --version
genisoimage 1.1.11 (Linux)
由 Folder 建立 ISO
genisoimage [options] [-o filename] path
i.e.
genisoimage -o cd.iso cd_dir
Label 的設定
-V volid # Specifies the "volume label" to be written into the master block.(max. 32 characters)
-volset ID # Specifies the volume set ID.(max. 128 characters)
-A application_id # Specifies a text string that will be written into the volume header.(max. 128 characters)
genisoimage -V virtio-win-0.1.215.amd64 -o virtio-win-0.1.215.amd64.iso virtio-win-0.1.215.amd64
I: -input-charset not specified, using utf-8 (detected in locale settings) 58.53% done, estimate finish Wed Mar 9 23:54:56 2022 Total translation table size: 0 Total rockridge attributes bytes: 0 Total directory bytes: 22528 Path table size(bytes): 142 Max brk space used 1b000 8568 extents written (16 MB)
isoinfo
# -d Print information from the primary volume descriptor (PVD) of the iso9660 image.
# -i iso_image
isoinfo -d -i /dev/sr0
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: OEMDRV <-- 由"-V"設定
Volume set id:
Publisher id:
Data preparer id:
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR ...
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 175
NO Joliet present
NO Rock Ridge present
# -l = 'ls -lR'
isoinfo -l -i ks.iso
Directory listing of / d--------- 0 0 0 2048 Jul 22 2020 [ 23 02] . d--------- 0 0 0 2048 Jul 22 2020 [ 23 02] .. ---------- 0 0 0 735 Jul 22 2020 [ 24 00] KS.CFG;1
建立 Linux LiveCD
genisoimage -o ../centos8-custom.iso \ -boot-load-size 4 -boot-info-table -J -r -R -T \ -V 'CentOS8_x86_64' \ -no-emul-boot -b isolinux/isolinux.bin -c isolinux/boot.cat \ -eltorito-alt-boot \ -no-emul-boot -eltorito-boot images/efiboot.img ./
Clone CD - readom
readom - read or write data Compact Discs
apt-get install burner-cdrkit
readom dev=device f=file.iso
# 清空 DVD-R
wodim -v dev=/dev/cdrw blank=fast
# 燒碟
wodim -v dev=/dev/cdrw install-x86-minimal-2008.0.iso
設定檔
/etc/wodim.conf
# 建出本機的可燒錄裝置
wodim --devices
# DVD-R 參數
-dummy
-speed=# <-- speed = # x 150 KB/s
-format
blank= all / fast
xorriso
介紹
creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions
Install
apt-get install xorriso
Version
xorriso --version
xorriso 1.3.2
Help
xorriso --help
xorriso -as mkisofs --help
Extract an ISO image using xorriso
ie.
mkdir extracted_iso
xorriso -osirrox on -indev Core-14.iso -extract / extracted_iso
Opts
-osirrox MODE
"off" disables disk filesystem manipulations
"on" copy 時只有 set 它
-indev address
Set input drive and load an ISO image if present.
-extract iso_rr_path disk_path
將 iso_rr_path 抄到 disk_path
iso_rr_path 是指在 ISO 映像檔中的一種檔案路徑.
使用 Rock Ridge 標準來提供 POSIX 相容的檔案屬性和長檔名
如果沒有包含 Rock Ridge 資訊, 就會被映射到 ISO 9660 檔名
-as mkisofs
# Perform some mkisofs gestures, understand pathspecs as mkisofs does.
Usage
xorriso -as mkisofs [options] file...
ie. Create Live CD
xorriso -as mkisofs -R -r -J -joliet-long -l -iso-level 3 -V LiveCD \ -no-emul-boot -boot-load-size 4 -boot-info-table -partition_offset 16\ -A 'Clonezilla live CD' \ -b syslinux/isolinux.bin -c syslinux/boot.cat \ -eltorito-alt-boot --efi-boot boot/grub/efi.img \ -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -isohybrid-gpt-basdat -isohybrid-apm-hfsplus ./ \ > /home/partimag/clonezilla-live.iso
-------- 第1行
-l, -full-iso9660-filenames
Allow full 31 character filenames for ISO9660 names
-iso-level LEVEL
Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2
- Level 1 allows only 8.3 filenames.
- Level 2 allows up to 30 characters in filenames.
- Level 3 allows data files larger than 4 GiB
-R, -rock
Generate Rock Ridge directory information
enables normal Unix filenames and attributes by Rock Ridge extension.
當加入 -J 但沒有 -R 時
Warning: creating filesystem with Joliet extensions but without Rock Ridge extensions. It is highly recommended to add Rock Ridge.
-r, -rational-rock
Generate rationalized Rock Ridge directory information
does the '-R' same but also changes access permissions to make all files readable by everybody.
-J
Generate Joliet directory information
enables MS-Windows UCS-2 names via Joliet extension
mount 時 dmesg
ISO 9660 Extensions: Microsoft Joliet Level 3
-joliet-long
Allow Joliet file names to be 103 Unicode characters
-V ID, -volid ID
Set Volume ID
It written into the master block (There is space on the disc for 32 characters of information)
-------- 第2行
-no-emul-boot
execute this image without performing any disk emulation <- "El Torito" bootable CD
It is needed for boot images of ISOLINUX / GRUB2
-boot-load-size
sets how many "virtual" blocks (512-byte) of the boot image are to be loaded by the BIOS in no-emulation mode
-boot-info-table
Patch boot image with info table
A Boot Info Table to be written into the boot image. Needed for boot images of ISOLINUX and GRUB2
* the boot file is modified in the source filesystem
-partition_offset LBA
Make image mountable by first partition, too
-------- 第3行
-b FILE, -eltorito-boot FILE
Set El Torito boot image name
-c FILE, -eltorito-catalog FILE
Set El Torito boot catalog name
* This option is required to make a bootable CD.
-------- 第4行: EFI bootable
It needs an EFI bootable image
-eltorito-alt-boot Start specifying alternative(a new set) El Torito boot parameters
--efi-boot FILE Set "El Torito EFI boot image" name and type
El Torito EFI boot image
El-Torito is a standard for creating bootable optical media like CD-ROMs, DVD, or BD.
The starting point can either be an emulated floppy drive, an emulated hard disk, or a plain block address in the ISO filesystem.
More modern ways are no-emulation setups as made by GRUB2 script grub-mkrescue
-------- 第5行: isohybrid
- -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid
- -isohybrid-gpt-basdat Mark El Torito boot image as Basic Data in GPT
- -isohybrid-gpt-hfsplus Mark El Torito boot image as HFS+ in GPT
ISO 9660 filesystems created by the mkisofs command as described in the ISOLINUX article will boot via BIOS firmware,
but only from optical media like CD, DVD, or BD.
The isohybrid feature enhances such filesystems by a Master Boot Record (MBR) for booting via BIOS from disk storage devices like USB flash drives.