Using a CD writer under Linux
- — 30 August, 2002 07:47
CD writer drives have become an almost standard feature of a modern PC. To help you get the most from this useful piece of hardware, this column looks at using a CD writer with Linux.
There are three required packages: cdrecord, mkisofs and X-CD-Roast. Each of these applications needs to be installed before you can begin burning CDs under Linux.
If you are using a recent distribution of Linux, you may be able to use your CD writer immediately. To test this, run the X-CD-Roast program by typing:
in a shell while running X11. As this is the first time X-CD-Roast has been run, it will need to be configured through the setup menu.
The first setup screen will list all of the drives in your system. If you can see your CD writer in this list, it can be used straight away and you can skip ahead to the next section. If the drive is not in the list, you will need to take the following steps:
1. Identify the device for your CD writer. The primary master IDE drive is called "hda", the primary slave IDE drive "hdb", the secondary master IDE drive "hdc". In my case, my CD writer is hdc. If you are unsure, device information for each drive is displayed as Linux boots.
2. If you use LILO to boot Linux, add the following to the end of /etc/lilo.conf:
substituting your device for hdc. After saving the changes, reinstall lilo by typing:
3. If you use GRUB to boot Linux, edit /boot/grub/grub.conf or /etc/grub.conf and add to the line similar to kernel /vmlinuz ro root=/dev/hda1 the following:
again substituting your device for hdc.
4. Add the following to /etc/modules.conf:
options ide-cd ignore=hdc
pre-install sg modprobe ide-scsi
Reboot your computer and the drive should appear in the list presented by X-CD-Roast. If it is still not there, you may be able to add it by typing in a shell:
$ modprobe ide-scsi
and restarting X-CD-Roast.
To configure X-CD-Roast, step through each menu and adjust the settings to suit your hardware. You will need to add a temporary image directory under the menu "HD Settings". This directory should be on a drive with a large amount of free space.
To add the directory, type the full path in the box labelled "Path" and click Add. When complete, click Save configuration to make the settings permanent.
X-CD-Roast can burn CDs from disk or images (such as an ISO), and perform CD-to-CD copies.
To burn a CD from data on your hard disk, click Create CD in the main menu. The next screen has many tools for burning different types of CDs; we want to master and burn a CD from disk, so click Master Tracks.
The Master Tracks menu displays the current layout of the CD to be recorded on the left, and a listing of directories on the right. Adding directories to the CD layout is as easy as selecting each directory and clicking Add. Each time you add a directory you will be asked where you want it to appear on the CD. Select an appropriate path. Most of the time you will want to select "Add with last path component".
Once you have added all the directories you want to burn, click on the ISO9660 Options tab. Select Rock Ridge + Joliet for the predefined image type to ensure maximum compatibility. You can skip the "Boot options" tab unless you want to make the CD bootable. If you want to record some information on the CD, add it under the "ISO9660 header" tab.
To burn the image, select the Create session/image tab. First click the Calculate size button, then select the length of media and check the burning options. Finally, to burn the CD, click Master and write on-the-fly. If you are using CD-RW media you can also blank a CD-RW at this menu, i.e. remove any existing data.
To perform a CD-to-CD copy, select Duplicate CD from the main menu. On the next menu, click the Write CD button on the left. Place the CD to be copied in a drive and select this drive in the Read Device menu. To begin the copy, place a blank CD in your CD writer and click the Write CD button at the bottom of the screen.