On Mon, Nov 17, 2003 at 12:26:11AM +0000, Stefan A. Deutscher wrote:
> Hi all,
> 
>  just got an ATAPI LG 4040 multiwriter (CD-R/RW, DVD+/-R,+/-RW, and
> DVD-RAM) and wish to use it on FreeBSD 5.1. While still having to
> configure the system to address it in UDMA rather than PIO 4 mode, it
> installed fine. Reading and writing CDs in all possible variations works
> fine with burncd. Yet many of my scripts are written for cdrecord, so
> I'd rather stick with that tool instead of learing yet another one.
> 
> Two questions arise
> 
> (a) How do I get such a unit to treat DVD-RAM just as slow, random
>     access optical media (much like an MO-Disk)?
>     I do not wish to do burncd or cdrecord on it, I wish to write to it
>     directly, if possible.
>     Alas, I could not put a new disk label on the blank (disklabel says
>     'unknown type: auto'), and newfs does not like it either. So I am
>     stuck.
> 
> (b) Google and the online handbook (for 4.x though) tell me that I
>     need 
> 
>       device atapicam
>       device scbus
>       device pass
> 
>     in my kernel to get to use the ATAPI unit like a SCSI unit
>     (e.g. with cdrecord and friends). However, on 5.1R I cannot find any
>     mention of an atapicam device, neither in GENERIC nor in the hints
>     nor NOTES. Now, what's a man to do?
> 
> 
> I checked the freebsd.org FAQs and archives, google and the news groups,
> but most stuff there is not really conclusive. In case this is a FAQ,
> after all, please just post a pointer.
> 
> Any hints are much appreciated.
> 
>  Thanks in advance & cheers,
>                                Stefan


Hi all,

   the issue has been resolved, thanks go to Kent and Marc for their
pointers.
 
Adding the following, as Kent suggested, put the drive in UDMA-33 mode:

  # cat /boot/loader.conf
  # -- sysinstall generated deltas -- #
  userconfig_script_load="YES"
  hw.ata.atapi_dma="1"

It's load on the system is now somewhere in the background noise.

Ignoring that the atapicam device is not mentioned in the GENERIC nor
hints nor NOTES files in /usr/src/sys/i386/conf and instead following
the handbook (http://www.FreeBSD.org/cgi/man.cgi?query=atapicam&sektion=4)
by adding the line

  device atapicam # Allows ATAPI devices to addressed as if they were SCSI

to the kernel resulted after a kernel build and install in a system that
now

(a) does not block the eject button anymore

(b) shows the drive in the 'camcontrol devlist -v' listing as /dev/cd1

(c) allows me to actually write to and read from DVD-RAM is if it were a
    sloooow hard drive.

    disklabel -A cd1     # Tells me there is no label on the device
    disklabel -w cd1     # labels the disk just fine
    disklabel -A cd1     # shows the label
    newfs /dev/cd1       # puts the file system on it
    tunefs -n enable cd1 # enables softupdates
    df /dev/cd1          # shows about 4.3 GB usable
    mount /dev/cd1 /dvd  # mounts the device (-t cd9660 is rejected)



    Tested on /usr with about 2.5 GB of data, the speed is
    - tar -cvf /dvd/51usr.tar writes at about 1.4 MB/s (slow for a
      HD), i.e. 89 MB/min (as fast or slow as my DDS-3 DAT drive)
    - tar -tvf /dvd/51usr.tar reads at about three times as fast at
      4.1 MB/s (i.e. 245 MB/min)

    - cp -R /usr /dvd/ : writes slooooow, at about 110kb/s (or 6.6
      MB/min). 
      The first time around it got stuck after a couple of hours (when
      most of the data seemed to be transferred already), with ps
      telling its status being D+ (uniterruptible wait for device
      access) and MWCHAN as biowr. Neither camcontrol reset nor shutdown
      -r would work, had to power cycle the machine. Next time it
      worked. 


Thanks again to all & cheers,
                                 Stefan

-- 
============================================================================
Stefan A. Deutscher                             |
Donostia International Physics Center           | office: ++34-943-018174
Universidad del Pais Vasco, Facultad de Quimica | fax   : ++34-943-015600
Departamento de Fisica de Materiales            | home  : ++34-943-270647
Apartado 1072, San Sebastian 20080, Spain       | email : [EMAIL PROTECTED]
============================================================================

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to