4 thoughts on “Linux Command to Erase Rewritable CD

  1. Another way to do it would go like so:
    $cdrecord -scanbus
    $cdrecord -v gracetime=2 dev= -eject blank=fast -force

    Or if you wanted to erase the CD completely:
    $cdrecord -scanbus
    $cdrecord -v gracetime=2 dev= -eject blank=all -force

  2. Hello,
    at sudo cdrecord -scanbus, i obtained these:
    scsibus0:
    0,0,0 0) ‘HL-DT-ST’ ‘RW/DVD GCC-4481B’ ‘1.05’ Removable CD-ROM
    0,1,0 1) ‘TSSTcorp’ ‘CDDVDW SH-S202J ‘ ‘SB01’ Removable CD-ROM
    0,2,0 2) *
    0,3,0 3) *
    0,4,0 4) *
    0,5,0 5) *
    0,6,0 6) *
    0,7,0 7) *
    scsibus1:
    1,0,0 100) ‘ATA ‘ ‘Hitachi HDS72161’ ‘P22O’ Disk
    1,1,0 101) *
    1,2,0 102) *
    1,3,0 103) *
    1,4,0 104) *
    1,5,0 105) *
    1,6,0 106) *
    1,7,0 107) *
    scsibus2:
    2,0,0 200) ‘HP ‘ ‘Photosmart C3180’ ‘1.00’ Removable Disk
    2,1,0 201) *
    2,2,0 202) *
    2,3,0 203) *
    2,4,0 204) *
    2,5,0 205) *
    2,6,0 206) *
    2,7,0 207) *
    scsibus3:
    3,0,0 300) ‘WD ‘ ‘5000AAK External’ ‘1.05’ Disk
    3,1,0 301) *
    3,2,0 302) *
    3,3,0 303) *
    3,4,0 304) *
    3,5,0 305) *
    3,6,0 306) *
    3,7,0 307) *

    i know that my cdrw is in the scsibus0 0.1.0 1), but i can’t figure out what to type after “dev=” in your config, you type /dev/cdrom, but i’m running on a live cd of ubuntu, and i get errors.
    Error trying to open /dev/sg2 exclusively (Permission denied)… retrying in 1 second.
    i guess maybe the /dev/sg2 is the live cd ?
    do you know what i’m supposed to write (given that i wrote above the result of the scanbus ?)

  3. To whom it may concern,

    The correct command should look like so:

    $ sudo cdrecord dev=0,0,0 blank=all
    OR
    $ sudo cdrecord dev=0,1,0 blank=fast

    “dev” will always need to point to the 3 number combination that points to your CD/DVD burner device, according to what “scanbus” finds. It seems from your scanbus output, that you have 2 burner devices, so you have some choices to make. First, which drive do you want to use? ‘HL-DT-ST’ ‘RW/DVD GCC-4481B’ points to the number combination “0,0,0”, while ‘TSSTcorp’ ‘CDDVDW SH-S202J’ points to “0,1,0”. your second decision would be as to what blanking type do you want? Do you want to blank the entire disc (slower but accounts for a healthier disc over a longer period of time, “blank=all”), or a fast erase (“blank=fast”)?

    It always helps to read the man (short for manual) pages on the subject:
    $ man cdrecord

    If you’re not familiar with reading man pages, i would suggest that you do this:
    $ man man

    Anyway, hope this helps.

    Sincerely,
    Charles Broam

Leave a Reply

Your email address will not be published. Required fields are marked *