RHEL 7.3 unable to format blank DVD+R (/dev/sr0 read only)
RHEL 7.3 x64
Insert a blank unformatted DVD+R disc
Gnome > Applications > Accessories > Files
- "Blank DVD+R" icon appears, right click it choose 'Format'
- accept defaults (quick format, FAT) , give name for disc, FORMAT
- Are you sure? (CD/DVD Drive - HL-DT-ST DVD+/-RW GTA0N [A1C0] /dev/sr0
Format
"Error wiping device: Command line 'wipefs -a /dev/sr0 exited with nonzero exit status 1
wipefs: error: /dev/sr0: probing initialization failed: Read-only file system
(udisks-error-quark,0)
==> also tried
dvd+rw-format -force /dev/sr0
:-(mounted media does'nt appear to be DVD+/-RW, DVD-RAM or Blu-Ray
==> Looked on RHEL knowledgebase , find these:
wodim dev=/dev/sr0 -checkdrive
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'HL-DT-ST'
Identification : 'DVD+-RW GTA0N '
Revision : 'A1C0'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
yum list 'dvd+rw-tools'
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Installed Packages
dvd+rw-tools.x86_64 7.1-15.el7 @anaconda/7.3
cd-info /dev/sr0
cd-info version 0.92 x86_64-redhat-linux-gnu
Copyright (c) 2003-2005, 2007-2008, 2011-2013 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
CD location : /dev/sr0
CD driver name: GNU/Linux
access mode: IOCTL
Vendor : HL-DT-ST
Model : DVD+-RW GTA0N
Revision : A1C0
Hardware : CD-ROM or DVD
Can eject : Yes
Can close tray : Yes
Can disable manual eject : Yes
Can select juke-box disc : No
Can set drive speed : No
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device : Yes
Reading....
Can read Mode 2 Form 1 : Yes
Can read Mode 2 Form 2 : Yes
Can read (S)VCD (i.e. Mode 2 Form 1/2) : Yes
Can read C2 Errors : Yes
Can read IRSC : Yes
Can read Media Channel Number (or UPC) : Yes
Can play audio : Yes
Can read CD-DA : Yes
Can read CD-R : Yes
Can read CD-RW : Yes
Can read DVD-ROM : Yes
Writing....
Can write CD-RW : Yes
Can write DVD-R : Yes
Can write DVD-RAM : Yes
Can write DVD-RW : No
Can write DVD+RW : No
Disc mode is listed as: DVD+R
No further information currently given for DVDs.
Use --dvd to override.
ls -l /etc/wodim.conf
-rw-r--r--. 1 root root 17 Apr 26 18:54 /etc/wodim.conf
cat /etc/wodim.conf
cdrom= /dev/sr0
/usr/bin/dvd+rw-mediainfo /dev/sr0
INQUIRY: [HL-DT-ST][DVD+-RW GTA0N ][A1C0]
GET [CURRENT] CONFIGURATION:
Mounted Media: 1Bh, DVD+R
Media ID: SONY/D21
Current Write Speed: 8.0x1385=11080KB/s
Write Speed #0: 8.0x1385=11080KB/s
Write Speed #1: 4.0x1385=5540KB/s
Speed Descriptor#0: 00/2295103 R@8.0x1385=11080KB/s W@8.0x1385=11080KB/s
Speed Descriptor#1: 00/2295103 R@8.0x1385=11080KB/s W@4.0x1385=5540KB/s
READ DVD STRUCTURE[#0h]:
Media Book Type: 00h, DVD-ROM book [revision 0]
Legacy lead-out at: 22951042KB=4700372992
READ DISC INFORMATION:
Disc status: blank
Number of Sessions: 1
State of Last Session: empty
"Next" Track: 1
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: blank
Track Start Address: 02KB
Next Writable Address: 02KB
Free Blocks: 22951042KB
Track Size: 22951042KB
ROM Compatibility LBA: 266240
READ CAPACITY: 02048=0
Responses
Each block on a DVD+R disc is writeable only once, so formatting it like a traditional magnetic storage media does not make sense. Also, a filesystem like FAT expects to be able to rewrite its File Allocation Table blocks whenever new files are added or old ones changed/removed; this obviously does not work if you can write each block only once.
On optical discs, the standard filesystems are either ISO9660 or UDF. These are designed to cope with the features and restrictions of optical media types.
If you want to use an optical disc like a traditional magnetic storage media (or like a USB stick), you'll need a CD-RW, DVD-RW or DVD+RW disc, and a drive that can specifically write those (which includes the functionality of erasing them). Apparently your optical disc drive cannot do that:
Can write DVD-RW : No
Can write DVD+RW : No
Even if your drive had the capability to write the RW discs, using them the same way as other types of storage would require loading the pktcdvd.ko kernel module and then using the /dev/pktcdvd/* device instead of the usual /dev/sr0. For details, please see: https://www.kernel.org/doc/Documentation/cdrom/packet-writing.txt (and note that the document refers to old-style PATA-connected optical drives, which used to use /dev/hd* devices instead of /dev/sr*).
With CD-R/DVD-R/DVD+R discs, you'll need to use a dedicated optical disc burning program to copy all the files you want to the disc in a single operation, but you don't have to fill the entire disc at once: you can usually write only a part of the disc and keep the rest of the capacity for later. This is called "multi-session recording/burning": the later sessions cannot delete existing data, but may hide the files belonging to the older sessions from casual observation. With proper tools, the hidden files can still be read.
If your system is RHEL 7.x Workstation, then there should be a GUI CD/DVD burning program available for the default Gnome desktop, named "brasero". For KDE, there is "k3b". You will also need the command-line tools that do the actual job, see below.
For a RHEL 7.x server, the standard repository only holds the command-line tools. The packages you'll need are "genisoimage" and "wodim"... and apparently you already have "wodim" installed.
If you have to burn a CD/DVD from the command line, it's usually a two-step process: First, create an ISO image of the file(s) you wish to burn. It's usually easiest to create a temporary directory (say, /var/tmp/burnroot) and copy the things you wish to burn into that directory. Then, create an ISO image out of them. For optimal results, you'll need to enable the extensions for long filenames: Joliet for Windows, and Rock Ridge for Linux/Unix systems. It's also nice to hide the extra files/directories used by the extension mechanisms. The volume label for the disk is also specified at this stage: feel free to choose whatever you want.
genisoimage -J -hide-joliet-trans-tbl -r -hide-rr-moved -V volume-label -o /var/tmp/burn.iso /var/tmp/burnroot
Then, to burn the ISO image to the disc:
(-sao selects session-at-once mode; the -multi option allows using the remaining capacity for future burn sessions without erasing the disc; the fs= option sets the FIFO size for the burning operation)
wodim dev=/dev/sr0 -sao -multi fs=16m /var/tmp/burn.iso
Edit: actually, you can achieve much the same in a single step using the "growisofs" command:
growisofs -Z /dev/sr0 -r -J /var/tmp/burnroot
...and if you later want to add more data on the same disk:
growisofs -M /dev/sr0 -r -J /var/tmp/second_burnroot
(Sorry about the late answer; when I wrote my initial answer, I had no access to my RHEL 7.x test VMs so I could not look up the actual package names and the options syntax for the exact versions used in RHEL 7.)
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
