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

Re: [Bulk] Re: BD-RE mount problem

On 09/08/12 04:36 PM, Thomas Schmitt wrote:

# xorriso -scsi_log on -dev /dev/sr0 -format "full"
xorriso : FAILURE : libburn indicates failure with formatting.
It should have reported the SCSI error (will have to dig for that).

That error came with command FORMAT UNIT

04 11 00 00 00 00
To drive: 12b
00 82 00 08 00 b4 74 00 c2 00 30 00
+++ sense data = 70 00 05 00 00 00 00 0E 00 00 00 00 26 00 00 89 00 08
+++ key=5  asc=26h  ascq=00h   (     4 ms)
This would be

The drive does not want to format that medium.
At least not with Format Type 0x30, Sub-type 2.
Well, that's what dvd+rw-format tried too.

The refusal to re-format does not necessarily have to be related
to the failure to run mkudffs.

The failure to format is just on this system, which is the only one I have
locally with a BluRay writer. The other system was just a failure to mount
after formatting.
Formatting a BD-RE may or may not erase its data (i.e. the filesystem).
I would consider it normal that a BD-RE cannot be mounted after a
re-format with no successful mkudffs.

So the theory that something in your computer broke down
is not outruled yet.
Did you tamper with udev ? Install new peripherals ?
No. The last peripheral I installed was the BluRay writer, to replace a DVD writer.

Why do all block device writers so obstinately scream "read-only" ?

xorriso -outdev /dev/sr0 -blank as_needed \
           -md5 on -add /usr/local/bin
Writing to '/dev/sr0' completed successfully.
Ok. It is not the drive to blame. It allowed several SCSI write

xorriso uses the generic SG_IO driver, which directly performs
SCSI transactions with the drive.

dd, mkudffs, et.al. use the block device driver, which itself would
use the SG_IO driver ... if it was not broken on your machine.

Expert question:

What can make the kernel throw EROFS, probably on write(2) ?
Device file permissions seem not to be the reason.


Can you compile and run this C program ?


  int fd, ret;
  char buf[2048];

  fd = open("/dev/sr0", O_RDWR);
  printf("open: fd= %d , errno= %d\n", fd, errno);
  memset(buf, 0, 2048);
  ret = write(fd, buf, 2048);
  printf("write: ret= %d , errno= %d\n", ret, errno);

E.g. with code in file open_sr0.c :
   cc -g -o open_sr0 open_sr0.c
and then

With an empty drive i get
   open: fd= -1 , errno= 123
   open: No medium found
   write: ret= -1 , errno= 9
   write: Bad file descriptor

I assume that you, with a BD-RE loaded, get errno= 30,
"Read-only file system" at write.

garydale@transponder:~$ ./open_sr0
open: fd= -1 , errno= 30
open: Read-only file system
write: ret= -1 , errno= 9
write: Bad file descriptor
garydale@transponder:~$ su
root@transponder:/home/garydale# ./open_sr0
open: fd= -1 , errno= 30
open: Read-only file system
write: ret= -1 , errno= 9
write: Bad file descriptor

Reply to: