RHEL 7.3 unable to format blank DVD+R (/dev/sr0 read only)

Latest response

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: 0
2KB
Next Writable Address: 02KB
Free Blocks: 2295104
2KB
Track Size: 22951042KB
ROM Compatibility LBA: 266240
READ CAPACITY: 0
2048=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.

Thank you for taking the time to explain.

I don't need to rewrite the disc , I am happy to burn only one time. I want to write a 3gigabyte file from /tmp/myfile.tar to the DVD for copying to other computers (which might not run Linux). I should have explained that in the first post.

I would prefer to use a GUI for that purpose, instead of command-lines, and preferably with a GUI that comes with RHEL 7.3 so I don't get into dependencies troubles or missing packages issues. But if necessary I will use the command line even if that is less intuitive and I don't know the commands. I don't know if I must install some more packages or drivers to make it work however. I thought at first this was a simple use case.

SO.... I removed the blank DVD+R disc, and inserted instead a blank DVD+RW (Imation) disc into the DVD drive.

With a DVD+RW blank disc in the drive, the cd-info /dev/sr0 still reports (snip).. " Can write DVD-RW : No Can write DVD+RW : No" and I don't know why that is happening.

Additionally the dvd+rw-format -force /dev/sr0 appears to work now:

#

dvd+rw-format -force /dev/sr0
  • BD/DVD±RW/-RAM format utility by appro@fy.chalmers.se, version 7.1.
  • 4.7GB DVD+RW media detected.
  • formatting 0.0-

And after the formatting, dvd+rw-mediainfo /dev/sr0 now shows the media as formatted (whereas it previous showed unformatted).

dvd+rw-mediainfo /dev/sr0

INQUIRY: [HL-DT-ST][DVD+-RW GTA0N ][A1C0] GET [CURRENT] CONFIGURATION: Mounted Media: 1Ah, DVD+RW Media ID: MBIPG101/W04 Current Write Speed: 4.0x1385=5540KB/s Write Speed #0: 4.0x1385=5540KB/s Write Speed #1: 2.4x1385=3324KB/s Speed Descriptor#0: 00/2295103 R@8.0x1385=11080KB/s W@4.0x1385=5540KB/s Speed Descriptor#1: 00/2295103 R@8.0x1385=11080KB/s W@2.4x1385=3324KB/s READ DVD STRUCTURE[#0h]: Media Book Type: 00h, DVD-ROM book [revision 0] Legacy lead-out at: 2211842KB=452984832 READ DISC INFORMATION: Disc status: complete Number of Sessions: 1 State of Last Session: complete Number of Tracks: 1 BG Format Status: suspended READ FORMAT CAPACITIES: formatted: 22951042048=4700372992 26h(0): 22951042048=4700372992 READ TRACK INFORMATION[#1]: Track State: complete incremental Track Start Address: 02KB Free Blocks: 02KB Track Size: 22951042KB FABRICATED TOC: Track#1 : 14@0 Track#AA : 14@2295104 Multi-session Info: #1@0 READ CAPACITY: 2295104*2048=4700372992

So now I have a formatted DVD+RW on /dev/sr0, not sure what is the next step to copy& burn /tmp/myfile.tar to /dev/sr0 in a single session in such a way that a Windows PC might be able to read that disc afterwards. There seems much to learn , just for this simple task of copying a file to a blank DVD+RW on RHEL 7.3.

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.)

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.