Writing cd is an old fashion but a lot of server hardware all ready use cdrom. Writing iso files into cdrom from bash can be seem very hard job. But it is not hard as it seem.
Install Mkisofs, Cdrecord
We will install tools named
cdrecord into our system. Apt and Yum package installation is below.
$sudo apt-get install mkisofs cdrecord
$ sudo yum install mkisofs cdrecord
List Cdrom Devices
We need to get CDROM device major and minor numbers. We will use
cdrecord toll for this information. We will also provide the CDROM device type which is
ATA in this example.
$ sudo cdrecord dev=ATA: -scanbus
Write Iso Into Cd
We will provide major, minor numbers of the device and use these numbers to specify target CDROM
$ sudo cdrecord -v -dev=ATA:1,1, speed=4 ubuntu.iso
Following options can be used to change the command behavior like speed,verbosity and device
- speed=4 is the writing speed f the CDROM
- -v will make operation verbose
- -dev=ATA:1,1,0 specify target cdrom device