bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-xorriso] To Thomas Schmitt: how to go on, xorriso is installed


From: Thomas Schmitt
Subject: Re: [Bug-xorriso] To Thomas Schmitt: how to go on, xorriso is installed
Date: Wed, 24 Apr 2019 10:48:03 +0200

Hi,

> you spoke about CD-RW in two places: Under
> sequential multi session media (unformatted CD-RW) and under overwritabel
> random read-write (Formatted CD-RW).
> [...]
> the lower left of the four [Xfburn greeting screen]
> big buttons seems to be the same function like Aktionen>CD-RW löschen. This
> one does not format the CD-RW. [...]
> Would it be possible to format the CD-RW with xorriso-commands instead of
> the missing xfburn-item to format?

Not with xorriso. Actually libburn is supposed to refuse writing on
formatted CD-RW. (I would have to try again after many years.)

Formatted CD-RW belong to the topic of UDF random read-write filesystems
on optical media. See for example
  https://www.kernel.org/doc/Documentation/cdrom/packet-writing.txt
(It must be older than Blu-ray burning, as it does not mention BD-RE
 as suitable medium type.)

CD-RW as hard disk was a really appealing idea back in the 1990s.
650 MB for a few D-Mark. Great ... until you work with it.
Optical drives have very poor random access capabilities. It lasts
several hundred milliseconds until the head assumes a new position.
Not to speak of the miserable noises.

If you want a cheap small hard disk, get any USB stick and be better off.

Optical media should be written sequentially, even if they could do
random access writing. It's better for speed, ears, and drive longevity.


> $ sudo apt-get install k3b

If you had not installed KDE, then you'd now got half of it.


> k3b(28608) K3b::Device::Device::checkWritingModes: (K3b::Device::Device) 
> "/dev/sr0" : checking for SAO_R96P
> k3b(28608) K3b::Device::ScsiCommand::debugError: (K3b::Device::ScsiCommand)
> failed:
> command:     "MODE SELECT (55)"
> errorcode:   "70"
> sense key:   "ILLEGAL REQUEST (5)"
> asc:         "26"
> ascq:        "0"

K3B does own SCSI transactions to inspect the drive.
This one refuses to set an exotic CD write type. That's ok.


> I tried to start formatting the blanked CD-RW. Finally a dialog opened
> similar to that of xfburn
> "Es wird auf ein Medium gewartet -k3b
> gefundenes Medium: Leerers CD-RW-Medium
> Bitte ein wiederbeschreibbares CD-Medium in das folgende Laufwerk einlegen:
> MATSHITA DVD-RAM UJ8C0 (dev/sr0)
> Laden/Auswerfen/Abbrechen"

I started my local K3B and choose "Format/Erase rewritable disc".
It talks of "Quick format". If i give it a written CD-RW, then it
works for about 30 seconds.

The result is a blank sequential CD-RW. Too much capacity for being
in formatted state:

  Media status : is blank
  Media summary: 0 sessions, 0 data blocks, 0 data,  703m free

So this is the same as xorriso command -blank does and the Xfburn
task of blanking is supposed to do.

-------------------------------------------------------------------

Let's try it the old way:

  $ cdrwtool -d /dev/sr0 -q
  ...
  wait_cmd: Bad address
  Command failed: bb 00 ff ff 08 40 00 00 00 00 00 00 - sense 00.00.00
  set speed

Sense code 0,0,0 does not indicate a drive protest. It must be
something in the program or kernel.

Digging into source ... looks like bit rot ("Datenfaeule"):
  https://sources.debian.org/src/udftools/2.1-1/cdrwtool/cdrwtool.c
line 92:

  ret = ioctl(fd, CDROM_SEND_PACKET, cgc);

This way of transferring SCSI commands to a drive is deprecated
since about 15 years. Seems not to work any more.

The call does not get proper diagnosis after it failed. The SCSI
sense code 0,0,0 does not tell what's wrong. Probably because the
drive did not get to see the command.
The program should rather print the Unix error number from ioctl().

The ioctl CDROM_SEND_PACKET and its data structure cdrom_generic_command
are so old and dumb that they cannot even tell why the Linux SCSI
driver stack refused to do the job.
That's why everybody should use ioctl SG_IO for SCSI transactions.

So it looks that GNU/Linux currently has no tool for formatting CD-RW.
(And this is good so. :))

-------------------------------------------------------------------

Now for your text draft:

> Please look especially if my anser to question d) is ok

> But this alone does not fix the other issues of xfburn: being unable
> to reasonably treat rewritable media (i.e. -RW media)

Xfburn in principle can blank written CD-RW. Somehow your submitted
medium is perceived as already blank. (What does xorriso -toc say ?)

I just tried with a written CD-RW. Similar processing time as K3B.
Same result:

  Media status : is blank
  Media summary: 0 sessions, 0 data blocks, 0 data,  703m free

Afterwards it refuses to do it again, because
  "Inserted disc is already blank"


I would still leave out the topic of finalized media and multi-session.
The statements are mainly correct but simply do not belong to the original
question why the burn attempt did fail.

A small flaw:

> Tomas Schmitt knows well what would have to be changed on the lower,
> the drive related part, of xfburn,

I only have a rough idea how to let Xfburn use the multi-session
capabilities of libburn. The main problem for me would be the XFCE
aspects about menu options and letting the program react on their
settings.
(At least it is not C++ programming language, like in K3B.
 With C++ i always riddle where the code of a particular function
 might be hidden in the inheritance stack of KDE classes.)


Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]