OpenSource For You

Writing an ISO image file to a CD-ROM from the command line

-

We usually download ISO images of popular Linux distros for installati­on or as live media, but end up using a GUI CD burning tool to create a bootable CD or DVD ROM. But, if you’re feeling a bit geeky, you could try doing so from the command line too: # cdrecord -v speed=0 driveopts=burnfree -eject dev=1,0,0 <src_iso_file>

speed=0 instructs the program to write the disk at the lowest possible drive speed. But, if you are in a hurry, you can try speed=1 or speed=2. Keep in mind that these are relative speeds.

The -eject switch instructs the program to eject the disk after the operation is complete.

Now, the most important part to specify is the device’s ID. It is absolutely important that you specify the device ID of your CD ROM drive correctly or you may end up writing the ISO to some other place on the disk and corrupting your entire hard disk. To find out the device ID of your CD ROM drive, just run the following command prior to running the first command:

#cdrecord -scanbus

Your CD ROM’s device ID should look something like what’s shown below:

1,0,0

Also, note that you cannot create a bootable DVD disk using this command. But, do not be dishearten­ed—there is another simpler command to burn a bootable DVD, which is:

# growisofs -dvd-compat -speed=0 -Z /dev/dvd=myfile.iso

Here, /dev/dvd is the device file that represents your DVD ROM. It is quite likely to be the same on your system as well.

Do not use growisofs to burn a CD ROM. The beauty of Linux

is that a single command does a single operation and does it well.

—Pankaj Rane, pankaj.rane2k8@gmail.com

 ??  ??

Newspapers in English

Newspapers from India