Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Erase a CD-RW via Command Line?

  1. #1
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    193
    Distro
    Lubuntu 18.04 Bionic Beaver

    Arrow Erase a CD-RW via Command Line?

    This question is one that arose as part of a slightly more complex issue on another thread. Since it is really a separate issue I started a new thread on it.

    Is it possible to erase (or blank) a CD-RW from the command line? If so what is the command syntax?

    Thank you for any assistance you can render.

  2. #2
    Join Date
    Oct 2010
    Beans
    61

    Re: Erase a CD-RW via Command Line?

    Should be possible using wodim

    Code:
    wodim dev=/dev/cdrom blank=fast
    Make sure you replace /dev/cdrom with whatever the proper device is on your system.

    To write an ISO image

    Code:
    wodim dev=/dev/cdrom image.iso

  3. #3
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Erase a CD-RW via Command Line?

    To get the device name of the CD/DVD drive, run:
    Code:
    sudo lshw -class disk
    and check out the community documentation:
    community/CdDvd/Burning
    the ArchWiki pages are usually good:
    https://wiki.archlinux.org/index.php/CD_Burning

  4. #4
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    193
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Erase a CD-RW via Command Line?

    Thank you for that reply!

    I am using Lubuntu 10.10. I started off by trying:

    Code:
    $ wodim -scanbus
    to get the identity of the CD drive and it returned:

    Code:
    The program 'wodim' is currently not installed.  You can install it by typing:
    sudo apt-get install wodim
    I thought all Ubuntu flavours had wodim, but perhaps Lubuntu doesn't? Is there any reason not to go ahead and install wodim?

  5. #5
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Erase a CD-RW via Command Line?

    Quote Originally Posted by Ahunt View Post
    Is there any reason not to go ahead and install wodim?
    Nope, you can remove it if you don't need it anymore.

  6. #6
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    193
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Erase a CD-RW via Command Line?

    Quote Originally Posted by sisco311 View Post
    To get the device name of the CD/DVD drive, run:
    Code:
    sudo lshw -class disk
    and check out the community documentation:
    community/CdDvd/Burning
    the ArchWiki pages are usually good:
    https://wiki.archlinux.org/index.php/CD_Burning
    Thank you for that hint! As you can see I was going to try that as a first step, but using wodim!

    I entered the command you suggested:

    Code:
    sudo lshw -class disk
    and it returned a lot of info. Which CD drive ID do I use?

    Code:
    *-disk                  
           description: ATA Disk
           product: WDC WD1600AAJB-0
           vendor: Western Digital
           physical id: 0
           bus info: scsi@0:0.0.0
           logical name: /dev/sda
           version: 01.0
           serial: WD-WCAV2U881476
           size: 149GiB (160GB)
           capabilities: partitioned partitioned:dos
           configuration: ansiversion=5 signature=000ec423
      *-cdrom
           description: DVD-RAM writer
           product: DVD-RAM GH22NP20
           vendor: HL-DT-ST
           physical id: 1
           bus info: scsi@1:0.0.0
           logical name: /dev/cdrom
           logical name: /dev/cdrw
           logical name: /dev/dvd
           logical name: /dev/dvdrw
           logical name: /dev/scd0
           logical name: /dev/sr0
           logical name: /media/disk
           version: 2.00
           capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
           configuration: ansiversion=5 mount.fstype=iso9660 mount.options=ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 state=mounted status=ready
         *-medium
              physical id: 0
              logical name: /dev/cdrom
              logical name: /media/disk
              configuration: mount.fstype=iso9660 mount.options=ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 state=mounted
      *-disk
           description: SCSI Disk
           physical id: 0.0.0
           bus info: scsi@2:0.0.0
           logical name: /dev/sdb

  7. #7
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    193
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Erase a CD-RW via Command Line?

    Quote Originally Posted by sisco311 View Post
    Nope, you can remove it if you don't need it anymore.
    Not sure what you mean by "remove it". Wodim is not installed apparently. Is there another way to erase the CD from the command line then without wodim?

  8. #8
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Erase a CD-RW via Command Line?

    Quote Originally Posted by Ahunt View Post
    Not sure what you mean by "remove it". Wodim is not installed apparently. Is there another way to erase the CD from the command line then without wodim?
    I mean, you can uninstall (remove) wodim.

    You can use any logical name listed in the *-cdrom stanza.

    Usually /dev/sr0 (/dev/sr[0-9]) is the device name and all the others (/dev/cdrom, /dev/cdrw...) are just symlinks to it.
    Last edited by sisco311; December 9th, 2010 at 02:51 AM.

  9. #9
    Join Date
    Apr 2007
    Location
    Ottawa ON Canada
    Beans
    193
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Erase a CD-RW via Command Line?

    Okay thank you for the explanation on the nomenclature, so it sounds like hwychld's suggestion above of "/dev/cdrom" would work fine.

    I am still not clear what you mean by "I mean, you can uninstall (remove) wodim." According to the command reply I got it is not currently installed. hwychld's suggestion was to use wodim to erase the CD-RW, so wouldn't I need to install wodim, rather than remove it?

    I only ask because Lubuntu 10.10 uses XFburn as the default CD burner application and I wanted to make sure wodim wouldn't conflict with it.

  10. #10
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Erase a CD-RW via Command Line?

    Quote Originally Posted by Ahunt View Post
    Okay thank you for the explanation on the nomenclature, so it sounds like hwychld's suggestion above of "/dev/cdrom" would work fine.
    Yes.

    Quote Originally Posted by Ahunt View Post
    I am still not clear what you mean by "I mean, you can uninstall (remove) wodim." According to the command reply I got it is not currently installed. hwychld's suggestion was to use wodim to erase the CD-RW, so wouldn't I need to install wodim, rather than remove it?
    You can install wodim and when you don't need it anymore you can uninstall it.

    Quote Originally Posted by Ahunt View Post
    I only ask because Lubuntu 10.10 uses XFburn as the default CD burner application and I wanted to make sure wodim wouldn't conflict with it.
    They don't; anyway the package manager takes care of conflicting packages. It will prompt you if a package conflicts with another.
    Last edited by sisco311; December 9th, 2010 at 03:22 AM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •