Burning CD-RW on Slackware from the Command Line

Due to the COVID-19 outbreak, I’ve been working from home. This caused me, for reasons that are unimportant, to learn how to burn a CD-RW from the command line in Slackware Linux.

The first step was to erase the media in the drive. (While DVD-RW media can be overwritten, I’ve always had to erase CD-RW media before burning.)

I found the spell for this on the Slackware WIKI, slackwiki: https://www.slackwiki.com/Burning_CD/DVD#Blanking. I used the quick method:

cdrdao blank --blank-mode minimal

I fumbled around with growisofs for a while, but had no luck. Searching the web, I kept finding references to wodim, which seems to come with Ubuntu.

Finally I came around to cdrecord, but I got the error message:

Cdrecord-ProDVD-ProBD-Clone 3.01 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2015 Joerg Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open or use SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

Afer much frustation, I figured out–the probably obvious answer–that I needed a link in /dev/ named pg(some number). I followed the example of /dev/cdrom. The spell I used was:

ln -sf sr0 pg0

NOTE: Added 20210821 — Since /dev/pg0 is removed on reboot, I added the following to /etc/rc.d/rc.local

make sure /dev/pg0 exists (as a link to /dev/sr0)

make sure /dev/pg0 exists (as a link to /dev/sr0)

if [ ! -L "/dev/pg0" ]; then
echo "creating /dev/pg0"
ln -sf /dev/sr0 /dev/pg0

This just left burning the image to the CD. The spell for that is uber-smiple:

cdrecord somefile.iso

So, yes! You can burn a CD-RW from the command line in Slackware!

Happy Slacking!

1 thought on “Burning CD-RW on Slackware from the Command Line”

  1. Thanks a lot for your blog.
    It helps a lot, if someone (me) is stuck in some trouble and don’t have time to solve every little missconfig in his “backup-system” 😀
    So I work from command line, often using root and this helps.

    Best regards and have fun!



Leave a Comment