# mounting dvd+rws (UDF) read-write [SOLVED]

## Schrödinger

Should I be able to mount udf dvd+rw's in read-write mode with 2.6.8-gentoo-r9 or 2.6.9-r9 compiled with genkernel all. The disks are always mounted in read-only mode. udf support is compiled in according to /proc/filesystems

```
# mount /mnt/dvdrww

mount: block device /dev/sr0 is write-protected, mounting read-only

# grep dvdrww /etc/fstab

/dev/sr0                /mnt/dvdrww     udf             noauto,rw
```

I have also tried the cdrwtool/pktsetup tools from the udftools package with the following results:

```
# cdrwtool -d /dev/sr0

using device /dev/sr0

1568KB internal buffer

setting write speed to 12x

# pktsetup /dev/pktcdvd0 /dev/sr0

open packet device: No such device or address

# ls -l /dev/pktcdvd0

brw-r--r--  1 root root 97, 0 Dec 27 18:30 /dev/pktcdvd0

```

Last edited by Schrödinger on Tue Dec 28, 2004 1:20 pm; edited 1 time in total

----------

## Sanderfox

Dvd+r(w)'s and other writable discs will always be mounted read-only, because you can't write on it like a floppy or something, you have to burn things.

----------

## Schrödinger

with packet writing I should be able to read and write rw disks without having to (re)burn the whole disk. 

and this is what man page for pktsetup says:

 *Quote:*   

> Pktsetup  is  used  to  associate  packet  devices with CD or DVD block
> 
> devices, so that the packet device can then be mounted and  potentially
> 
> used  as  a read/write filesystem.This requires kernel support for the
> ...

 

I guess the stock gentoo-dev-sources does not include for the "packet device"?

I forgot to mention that the DVD-drive is an external firewire device (LaCie 4x DVD-/+RW), I don't know if that makes any difference.

----------

## Imek

You will need to configure your kernel manually with menuconfig, there should be a guide in the gentoo install documentation or some HowTo if you want it.

You can find UDF support in the File Systems section, in CD-ROM/DVD File Systems. I'm not sure about packet device support though, as I can't find anything referring to it.

----------

## dsd

packet writing support was not included until 2.6.10

----------

## NeddySeagoon

Schrödinger,

UDF is a R/W filesystem and 'just works' on DVD+RW without the packet writing patch. You need to make sure your mount point allows writing before you mount your DVD+RW and you should not put the 

```
o -rw
```

 option in your fstab, as a DVD+RW is only good for about 1000 mounts. Every rw mount costs a superblock write.

Its all here http://fy.chalmers.se/~appro/linux/DVD+RW/

----------

## Schrödinger

I will be trying the 2.6.10 kernel tomorrow (thanks dsd).

and as for 'just working' it isn't (maybe I'm still missing something). The mount point allows writing:

drwxr-xr-x  2 root root 4096 Dec 27 17:36 dvdrww

I was testing this as root.

URL provided by NeddySeagon was usefull also, I added the option noatime to my fstab, which should incease the lifetime of the RW disks. I also already had an another mount point for mounting the RW disks in read-only mode when I don't need to write to them:

```
/dev/sr0                /mnt/dvdrw      udf             noauto,ro

```

If I understood the DVD+RW/+R/-R[W] for Linux page correctly I do need the patch (now apparently included in kernel 2.6.10), since I want to mount the disk and delete some files from it and copy some others to it with standard rm and cp commands.

----------

## Schrödinger

kernel 2.6.10-gentoo-r1 did the trick. I just compiled it with genkernel all, made changes to lilo, rebooted the new kernel and no I can mount RW disk in read/write mode.

Thanks all.

----------

## razholio

 *Schrödinger wrote:*   

> kernel 2.6.10-gentoo-r1 did the trick. I just compiled it with genkernel all, made changes to lilo, rebooted the new kernel and no I can mount RW disk in read/write mode.
> 
> Thanks all.

 

Using UDF on your DVDRW should not have been necessary (there is no size limit for ISO9660) as per dvd+rw-tools author:

<snip>

Even though a modified kernel can let you put for example an ext2 file system on DVD+RW, it's probably not very practical, because you most likely want to access the data on an arbitrary computer. Or in other words you most likely want ISO9660.

<snip>

from: http://fy.chalmers.se/~appro/linux/DVD+RW/

by default growisofs calls mkisofs to use iso9660 for all DVD's.  I've been using this for years w/o any trouble, all of my DVD's burned with iso9660.  I recently upgraded from the default 2.4.26 kernel to 2.4.28-gentoo-r5 and suddenly I'm having the exact same problem you're having.  I can mount my DVDRW's on a 2.6.10 machine just fine, but when I mount them on the machine I burn them on (2.4.28-gentoo-r5) the first three files look fine, but the fourth one is severly truncated.  It should be about 1.5GB in size and it shows up as only a few meg.

something has changed with my gentoo system recently and the new kernel is the primary suspect in my book.

anyone else?

----------

## razholio

please ignore that last post.  wrong thread.  sorry guys

----------

