Posts Tagged ‘CD-RW’

You’ve got to love Linux. There are so many things you can do with it that you could only dream of in Windows. What I’ll show you here is how to set up a button (or launcher actually) that will erase a rewritable disc with one click, with no further action needed on your part.

The command that will do the task is:

cdrecord -v dev=/dev/cdrom blank=fast

If you enter it into a terminal, you will see output similar to:

Starting to write CD/DVD at speed 2.0 in real BLANK mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Performing OPC…
Blanking PMA, TOC, pregap
Blanking time: 48.879s

But you don’t have to open a terminal, as this command runs fine from a launcher. So for one-click erasing of CD-RW and DVD-RW media, make a panel launcher for that command, and it’s done. Just insert a disc that needs to be blanked, click the button/launcher, and when the optical drive’s light finishes flashing, your media is now empty and ready for use.

Note: You may need to substitute the correct device path if it differs from /dev/cdrom, as the command will not work if it is looking to an address that doesn’t exist. It will likely be something like /dev/scd0 or /dev/sr0; to find out exactly what it is, read this guide.

Another error you may encounter may be that the operation cannot proceed because the disc is mounted (which can happen if you stick in a RW with data on it), and will end with something like:

Error trying to open /dev/cdrom exclusively (Device or resource busy)… retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource busy)… giving up.
WARNING: /dev/cdrom seems to be mounted!
wodim: Device or resource busy.

Simply unmount the disc drive by right-clicking it in the left pane of Nautilus and choosing Unmount, then try the command again.

Note: If you can find no Unmount option, only Eject, you can do it via the terminal (replacing /dev/scd0 with the correct path if need be):

umount /dev/scd0

You can of course also run both commands at once (note this will not work as a launcher, as it will only run the first command):

umount /dev/scd0 && cdrecord -v dev=/dev/scd0 blank=fast


Can’t Blank a Disc?

Unfortunately, while this command works great with some media, on other discs you might see it end with the following error:

Error: this media does not support blanking, ignoring.
This drive or media does not support the ‘BLANK media’ command
wodim: Cannot blank disk, aborting.

You can try adding the options -force and blank=all to the end of the command, but don’t get your hopes up. In my case, old 2x RW DVDs get blanked fine, but the 4x RWs I just bought simply refuse to be blanked in this way.

You will need to erase such discs with a burning app such as K3b (which will let you pick an alternate method if the default blanking option doesn’t work).



Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!


Read Full Post »