--- HP7200e minihowto --- 0.0 How to configure your HP7200e working with Linux Author: Miika Komu E-mail: miika@iki.fi www: http://www.iki.fi/miika/ updated: 24.8.1999 - initial version 19.10.2000 - updated kernel versions and partport notes Special thanks to Mika Kousa (mkousa@cc.hut.fi) for checking out this document. 0.1 Index 1.0 Purpose 1.1 Legal stuff 1.2 Tested platforms 1.3 Updates 2.0 Kernel configuration 2.1 Testing 2.2 Notes about kernel configuration and testing 2.3 Trouble shooting 3.0 Links to the source of information 1.0 Purpose The purpose of this document is to help you to configure your HP7200e drive (external paraller ide cd-writer) with your linux system. I've heard that somebody got a newer HP external drive working with these instructions. If you're one of them, please inform me so that I can update the "tested platforms" section. I will give you the needed settings for configuring your kernel and tell how you should test them out. In case my advices didn't work, I have included some links to relevant information. 1.1 Legal stuff I take no responsibility of any damage caused by my advices to your system, so please do use your common sense or refer to your friends or the links in the end of this document. I will be not legaly responsible if anything at all goes wrong, so you're on your own. I will take no copyrights for this document, so you may copy and modify it as you will. 1.2 Tested platforms The kernel settings have been tested on the following platform: AMD K6 266 MHz 2 (internal) ide hard drives HP7200e Debian 2.1/Linux kernel 2.2.10 - 2.2.17 _no printer!_ 1.3 Updates If you find any errors from this document or want to add something to it, please mail to me at miika@iki.fi. 2.0 Kernel configuration Here are all the the relevant configurations: General setup: < > Parallel port support Block Devices: <*> Include IDE/ATAPI CDROM support < > SCSI emulation support <*> Generic PCI IDE chipset support [ ] Other IDE chipset support <*> Loopback device support <*> Parallel port IDE device support --- Parallel IDE high-level drivers < > Parallel port IDE disks < > Parallel port ATAPI CD-ROMs < > Parallel port ATAPI disks <*> Parallel port generic ATAPI devices --- Parallel IDE protocol modules <*> Shuttle EPAT/EPEZ protocol < > [ ] = not included [M] = module <*> [*] = built-in Note: here is only the information I consider valuable in configuring your HP7200e. You will also have to make the relevant devices with this script (included in the paride.txt in your kernel source documentation): #!/bin/bash # # mkd -- a script to create the device special files for the PARIDE subsystem # function mkdev { mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1 } # function pd { D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) ) mkdev pd$D b 45 $[ $1 * 16 ] for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 do mkdev pd$D$P b 45 $[ $1 * 16 + $P ] done } # cd /dev # for u in 0 1 2 3 ; do pd $u ; done for u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done for u in 0 1 2 3 ; do mkdev pf$u b 47 $u ; done for u in 0 1 2 3 ; do mkdev pt$u c 96 $u ; done for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done for u in 0 1 2 3 ; do mkdev pg$u c 97 $u ; done # # end of mkd You should cut'n'paste the script above to file (e. g. mkd) , set execution bit to that file with 'chmod u+x mkd' and execute is as root. There may be also a /dev/MAKEDEV script to do the same work but you need some parameters on it (and I'm not going to explain that). 2.1 Testing When you have built your kernel and booted your machine, you should receive following information during boot-up (can also be viewed with 'dmesg' after booting): paride: epat registered as protocol 0 pg: pg version 1.02, major 97 pg0: epat 1.01, Shuttle EPAT chip c6 at 0x378, mode 5 (EPP-32), delay 1 pg0: HP CD-Writer+ 7200, slave Then you can test the drive with cdrecord (I used version 1.8a20) as _root_: # cdrecord dev=0,0 -scanbus Cdrecord release 1.8a20 Copyright (C) 1995-1999 Jvrg Schilling scsidev: '0,0' scsibus: 0 target: 0 lun: 0 scsibus0: 0) 'HP ' 'CD-Writer+ 7200 ' '3.01' Removable CD-ROM 1) * 2) * 3) * 4) * 5) * 6) * 7) * If you got that message and you got the boot-up info correctly, you should be ready to burn cd's! Remember that you should probably set SUID bit (chmod +s filename) on cdrecord or what ever front-end to cdrecord you are using. I recommend gcombust (http://www.iki.fi/jmunsin/gcombust/), you might have trouble with x-cd-roast. 2.2 Notes about kernel configuration and testing o I have configured everything built-in in the kernel, because o kernel will autodetect HP7200e o I have no other paraller devices conflicting with HP7200e o I couldn't make insmod paride|epat|pg work and I'm too lazy to insmod stuff everytime I want to burn something o If you have a paraller printer or any other paraller device... o you should probably configure paraller ide support (paride), paraller port generic atapi devices (pg) and shuttle EPAT/EPEZ protocol (epat) as modules and add some command line options to lilo.conf (if you're using lilo :). o see the links in the end of this document (3.0) o ask for an advice from a linux news group (finnish people: sfnet.atk.linux is a good source), but please read the FAQ of the newsgroup first! o you the get at least one device working at a time, you could try dropping the modules of the other devices with rmmod o I have only included the options that I though was relevant; use your own imagination to figure out the rest. Specially note that if you include "Parallel port support", my example configuration will not work. o You do have to have 'cdrecord' to burn stuff on cd's and to test out if HP7200e works. Get your copy of cdrecord from the link of section 3.0. 2.3 Trouble shooting Q: cdrecord says "Permission denied. Cannot open '/dev/sg0'" when I'm scanning the bus. A: You're not executing cdrecord as root. Q: I have a paraller printer or an other paraller device and... A: See section 2.2. Configurating your system won't be easy... Q: I'm tired in configuring the kernel to get HP7200e work! Nothing will work! A: Well... have you asked for an advice in the newsgroups or your friend? If you have more than one paraller device conflicted and you can't configure the settings, you can open up the shell of HP7200e as an last resource and there should be a standard IDE-device inside that can be plugged inside your computer. You will need to modify the kernel configuration after the operation. Note that I haven't never opened my cd-rom drive and never probably will. NOTE: THIS WILL AVOID WARRANTY AND COULD BRAKE THE CD-WRITER. I will not be legaly responsible if something goes wrong, so you're on your own. 3.0 Links to the source of information paride.txt on your local linux kernel source tree http://www.torque.net/parport/paride.html http://www.torque.net/parport/cdr.html http://interactive.hp.com/cspt/hpcd-write9682.html http://lcdx00.wm.lc.ehu.es/~svet/hp7200.html http://www.guug.de/~winni/linux/CD-Writing/html/ http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html http://www.iki.fi/jmunsin/gcombust/