home dorian moore : (digital media) technologist

  • works Linux / Pioneer DVD-R/RW A03 [2002.01.19]

    Getting files on the disk as either ISO9660 or ext2 format for system backup.

    Introduction
    Writing DVD's under Linux doesn't seem to be something that has much consistent documentation. At the moment their don't seem to be any tools which support writing DVD's to play in a domestic player, but that's not why I have a DVD-R/RW in my Linux box. I'm using it as a backup device, as CDR/RW is just to small.

    DVD-R/RW vs Tape
    Why not use DDS/AIT/DLT etc? I've had bad experiences with DDS tapes [they never have restored on me, and they feel slow and cumbersome to use]. AIT/DLT are expensive, and I've not used them much under Linux. DVD ROM drives are now very cheap and easy to install and work under Linux, thus you should find it quite easy to read your disk elsewhere once you've backed up data to it.

    My DVD-R/RW
    The Pioneer A03 DVD/RW drive [IDE interface] cost me just under �450, which is a bit cheaper than a DAT drive [and doesn't need a SCSI card]. It doesn't store as much data obviously, as a DVD-R or DVD-RW disk only holds 4.7GB, but that was plenty for my needs... and if the data set goes up in size then I can split it across disks.

    Basic How To
    The Linux CD Writing HowTo discusses all of the basic principles for writing to CD Rom, and i've been using the tools and principles to write to my Plexwriter 24/10/40A before.

    First up I tried using the same basic principles to write a CD to the Pioneer drive [yep, it also writes CD-R and CD-RW] and everything when perfectly. Next step was to try and write a larger ISO image to the DVD portion. This wasn't as straightforward as it seems, as cdrecord 1.10 didn't want to burn anything that large to a disk, despite the referals to DVD's in the documentation.

    DVD Writing Software
    Perplexed I went and had a dig around Joerg Schilling's site for his cdrecord/cdtools. A quick look brought me up cdrecord-ProDVD which are binaries to be downloaded. I brought down the appropriate versions and they seem to work fine, but you can only cut up to 1 Gigabyte to a disk, or emulate a larger write. Why is this? It seems that Joerg would like us to buy the software, which seems reasonable. But he doesn't really explain how to get the money to him... and when I emailed him he just said 'send me $100' ... when I manage to find out what I get for the $100 and so on I'll update the site. In the meantime there is another solution. He did tell me that you also need to patch the kernel on your system for extended ISO9660 support. This is included in kernel 2.4.13 and later.

    Note from J�rg Schilling Please read

    After much searching I found Nicolae Mihalache had created a free patch for cdrecord to make it cut DVD's. I actually downloaded his distribution version of cdtools 1.11a08 with the patches applied, compiled them first time [I'm running a pretty standard install of RedHat Linux 7.2, with a customised compile of Kernel 2.4.17]. I did a make install and let them install in their own place, to keep them seperate from the original cdrecord/cdtools set I was using and which works very well, and I don't want to start interfering with... yet.

    Also check out DVDRTools Talked about here

    Using this version of cdrecord, I've been able to cut DVD's with ISO + RockRidge file extensions on them, or an ext2 partition created using a loopback device. The later is a prefered method for me as I use rsync to bring the data into the ext2 partition, and then just burn when ready.

    The steps to success : ISO 9660 DVD Recording
    To make an ISO image for DVD [for data backup, not general usage mind... if you want general usage check out the CD-Writing how to about ISO limitations]:


    mkisofs \
    -o iso.img \ # output file
    -iso-level 3 \ # force unstrict ISO compatability
    -R \ # use rockridge extension
    directory/ # source directory

    To mount the ISO image for testing [will require loopback devices to be installed into your kernel or to be availabel as a module]


    mount \
    -t iso9660 \ # disk format
    -o ro,loop=/dev/loop0 \ # mount read only, use loopback device
    iso.img \ # file to mount
    /mnt/iso #�mount point

    To burn the ISO image to a DVD-R disk


    cdrecord \
    -v \ # verbose output, help see what's going on
    speed=2 \ # cut at double speed
    dev=0,1,0 \ # device [see CD Writing HowTo]
    -dao \ # DVD's must be written in Disk At Once mode
    -data dao.img # file to write to disk

    Once the DVD is written you can mount it as you usally would [though, I've found I had to eject then re-insert the disk]


    mount \
    -t iso9660 \ # disk format, this isn't necessary.
    /dev/scd1 \ # device name,
    /mnt/scd1 # mount point

    ext2 DVD Recording
    ext2 is a format which is used for Linux hard disks. Using it to cut a DVD means that you can store exactly the same information as used on the original system. For me this is useful as I hold a mirror of my webserver on my development server. This mirror is synchronized every night using rsync [as people upload data to my web server on a regular basis]. To keep this all intact I copy it into a file which is mounted as a loopback device, in a similar way to how I mounted the iso9660 image above.

    It's worth reading this before you do a burn.

    Firstly I created an empty file to be the filesystem


    dd \
    if=/dev/zero \ # read input for file from /dev/zero
    of="ext2_file" \ #�output file
    bs=1024k \ # file has block size of 1024k [1 Megabyte]
    count=4096 # file has 4096 blocks [4 Gigabytes]

    Then I make an ext2 filesystem on it


    mke2fs \
    -b 1024 \ # block size
    -F \ # Force [I shouldn't have to use this, but I do]
    ext2_file # input file

    Then I mount the ext2 filesystem


    mount \
    -t ext2 \ # device format type
    -o rw,loop=/dev/loop0 \ # mount read/write using loopback device
    ext2_file \ # device/file name
    /mnt/ext2 # mount point

    I then write to /mnt/ext2/ like it is a normal disk. Once it is set up as I need it with all the appropriate data I execute the command


    cdrecord \
    -v \ # verbose output, help see what's going on
    speed=2 \ # cut at double speed
    dev=0,1,0 \ # device
    -dao \ # DVD's must be written in Disk At Once mode
    -data ext2_file # file to write to disk

    And away she goes!

    Anyway, I've just written all this as I reckon someone else out there may be trying to do this, and one of these bits might just help you sort it out a bit quicker than I did. It's not hugely complex, provided you are happy playing around. A good idea is to try everything then run the cdrecord command with the -dummy option in before the -data option, which will do a test burn.

    Posted by Dorian Moore on Saturday, January 19, 2002 at 00:00 GMT
    Last modified Thursday, October 20, 2005 at 20:22 GMT

  • home home
  • page me
  • page page page page page page words
  • page page images
  • page page page page listening
  • page sounds
  • page radio
  • page page page page page page page works
  • page page page page likes
  • page page page page page page page page links
  • page mobile
  • page interfaces
  • page contact

    email

    telephone
    +44 (0)7976 242 805

    post
    Dorian Moore,
    Flat 2, Radnor Villas,
    45b King Henry's Walk,
    London,
    N1 4HQ.
    United Kingdom.

    ichat
    ichat://mtrapr

    aol instant messenger
    aim://mtrapr

    skype
    skype://dorianmoore