How to burn a CD in linux on the command line
1. Create an iso to burn to your CD.
In my case I already had one, but there’s a nice HOW-TO in the tutorial I was reading.
mkisofs -r -o myiso mydirectory/
2. Make sure that linux knows there’s a CD drive connected to your box. If nothing comes up, then you’ll have to install the drive. If something comes up, you’re right to go onto step 2.
cdrecord -scanbus
3. Figure out the name of the IDE port that your drive is connected to. The usual names are:
- hda = IDE bus/connector 0 master device
- hdb = IDE bus/connector 0 slave device
- hdc = IDE bus/connector 1 master device
- hdd = IDE bus/connector 1 slave device
If you can’t remember (like me), go to the /dev directory and search through the directory to see a list of ports that are registered. Once you know what’s there it’s pretty easy to guess which one is the right one to use.
cd /devls | grep hd
4. Run cdrecord to burn your ISO to CD. The “dev=/dev/hdc” part is the path to the port we discovered in step three. The part after the -data switch is the path to the ISO.
cdrecord dev=/dev/hdc -data /home/helen/downloads/myiso.iso
References:
CD writing HOW-TO
