Monday 17 June 2013

Writing an ISO image file to a CDROM from the command line - :::LINUX TRICKS :::

We usually download .iso images of popular linux distros for installation or as live media, but end up using a GUI cd burning tool to create a bootable cdrom. But, if your feeling a bit geeky, you could try doing so from the command line with
$ cdrecord -v speed=0 driveopts=burnfree -eject dev=1,0,0 <src_iso_file>
speed=0 tells 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.
-eject switch tells the program to eject the cdrom after the operation is complete.
Now, the most important part… specifying the device 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 disk and corrupting your entire hard disk. To find out the device id of your cd-rom drive, just run this command prior to running the first command:
$ cdrecord -scanbus
Your cd-roms device id should look something like 1,0,0 but need not be exactly the same on your system.
Also, note that, you cannot create a bootable dvd disk using this command for distros like openSUSE or Fedora or Ubuntu or Slackware which come as dvd iso’s. But, do not be disheartened, there is another more simpler command to burn a bootable dvd
$ 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.
Donot use growisofs to burn a cdrom. The beauty of linux is that a single command does a single operation and does it well. So, we will stick to it.

No comments:

Post a Comment