- Linux Shell Scripting Cookbook(Third Edition)
- Clif Flynt Sarath Lakshman Shantanu Tushar
- 140字
- 2021-07-09 19:46:34
How to do it...
In order to create an ISO image from /dev/cdrom, use the following command:
# cat /dev/cdrom > image.iso
Though this will work, the preferred way to create an ISO image is with dd:
# dd if=/dev/cdrom of=image.iso
The mkisofs command creates an ISO image in a file. The output file created by mkisofs can be written to CD-ROM or DVD-ROM with utilities such as cdrecord. The mkisofs command will create an ISO file from a directory containing all the files to be copied to the ISO file:
$ mkisofs -V "Label" -o image.iso source_dir/
The -o option in the mkisofs command specifies the ISO file path. The source_dir is the path of the directory to be used as content for the ISO file and the -V option specifies the label to use for the ISO file.