Archive for November, 2005

Burning a CD/DVD in GNU/Linux

One thing that prevented me from completely switching over from Microsoft Windows to GNU/Linux was the relatively difficult way to burn a CD/DVD media in GNU/Linux OS. Printing came a close second. Hardware support and Games were also way better supported in Windows than in GNU/Linux. Now, atleast burning media has become extremely easy in GNU/Linux, arguably easier than burning it in Nero under Windows(infact, there is a version of Nero for GNU/Linux too, but who cares to use propriety software when there is so much of choice in Free burning tools?).

If you have an ISO file(files ending in .iso extension), which is the most popular file format for making and sharing images of CDs and DVDs, then this simple command will burn it on an empty disc:

# cdrecord dev=/dev/hdc file.iso [1]

that’s it! ofcourse, there are tons of options that you can pass to ‘cdrecord’ if you want more control over the burning process, like specifying the speed of burning(as in 4x):

# cdrecord dev=/dev/hdc file.iso speed=4
for more information regarding the options of cdrecord, see its man pages[2].
if you want to rather burn a directory which contains your data files, first make an ISO file:

# mkisofs -o file.iso -RJ /home/user/directory/

and then burn ‘file.iso’ using the above procedure. you can also first mount an ISO file on a directory to check its contents before burning it:

# mount -o loop file.iso /home/user/mountdir

to erase a CD-RW, use:

# cdrecord dev=/dev/hdc blank=fast (‘blank=all’ will do a complete erase)

If you are not a command-line guy, then K3B is an excellent graphical tool to burn a CD/DVD under GNU/Linux and should get the job done with equal ease[3]. You won’t need more than a few clicks to burn a CD!! It is the best CD/DVD writer of all IMHO.
[1] where hdc is your cd-rom drive. if you don’t know what is the the name of your cd-rom drive, then try:

# cat /etc/fstab | grep /mnt/cdrom
# cat /etc/fstab | grep /media/cdrom
#dmesg | grep ‘^hd.:’
OR use this guide:
hda->primary master
hdb->primary slave
hdc->secondary master
hdd->secondary slave

if you use an older kernel(# cdrecord dev=0,0,0 file.iso

or better, upgrade the kernel!!

[2] # man cdrecord

[3] you can also try X-CD Roast which boasts of more features and stability, but i strongly suggest K3B for its user-friendliness and simplicity.


Leave a Comment