Getting Linux to Grok Your IDE Burner

Getting Linux to Grok Your IDE Burner

Well, we already know your burner is supported, right? So all we have to do now is convince Linux that your IDE burner isn't a regular CD-ROM drive. Unfortunately, when you booted , Linux decided that it was a regular CD-ROM drive. In order to convince it otherwise , we're going to have to tweak your conf.modules settings, recompile your kernel (or set up a module for insertion), and reboot!

It's been said that the only reason to reboot in Linux is to add new hardware. While there are rare instances when this isn't true, it most certainly is true here. Basically, we're going to convince Linux that your IDE burner is actually an SCSI burner. That's because all the burning software in the world is pretty much written to the SCSI (at least in the Linux world. I have no idea how Windows handles the dirty work, but I'm sure it's messy). The reason for this is simple: IDE/ATAPI doesn't have a full command set, so you can't properly drive a CD burner with it.

Let's not go modifying your conf.modules yet, at least not until we have a new, working kernel compiled. I'm going to assume that you want to compile the driver into your kernel. I'm a firm believer in having the core drivers compiled into your kernel ”this means they can't be inadvertently deleted, and you have access to those devices just as soon as the system loads the kernel.

Jump into your kernel source directory. On my system, at the time of this writing, the kernel source is at /usr/src/linux, and it's version 2.2.16. Even though I detest X-windows for being slow and bloated (don't even talk to me about the Enlightenment Window Manager), I almost always use make xconfig for my kernel configurations. Figure 18-1 shows the generic Kernel config screen. Figure 18-2 shows the SCSI device setup, where I've selected SCSI-emulation, SCSI CD-ROM support, and generic SCSI support. Figure 18-3 , on the other hand, shows the Block devices setup, where I've disabled IDE/ATAPI CD-ROM support. I don't need it, because I'll never be addressing my CD-ROM as an IDE device anymore. If, and only if, you have an additional IDE CD-ROM device in your machine should you leave this enabled. If you don't, pull it out. It'll make your kernel smaller and faster.

Figure 18-1. Kernel Configuration main menu.

Figure 18-2. Kernel Configuration SCSI menu.

Figure 18-3. Kernel Configuration IDE, ATA, and ATAPI menu.

Now go into Filesystems. Undoubtedly, you're going to want to be able to understand a PC-formatted CD-R someday, so we're going to enable Joliet file system support. Joliet is a way to get long filenames onto a CD-ROM (longer than 8.3 characters , anyway), and to have deep directories and what not. Naturally, Microsoft has added their own extensions to this (surprise, surprise!), and we're going to compile those extensions directly into the kernel. Again, we do this for ease of configuration and speed.

Now exit and save your kernel configuration. We're about to rebuild the kernel. The sequence of commands we want to follow is this:

 make dep 
 make clean 
 make 
 make modules 
 su -c"make install && make modules_install" 

I give some of my friends major conniptions when I do things this way:

 jeremy@thor:/usr/src/linux > make dep &&make clean &&make &&make modules 
 &&su -c "make install && make modules_install" && /sbin/lilo && reboot 

The double ampersands require that each previous command complete successfully before the next will be run. If any command in the list errors out, no subsequent commands will be run. Personally, I think it's pretty cool. When I run the whole thing as root, I don't even need the "su -c" bit ”my machine just recompiles the kernel and modules, installs them, reruns LILO, and reboots. I hit Enter, go get myself a soda, talk to my wife for an hour or so (or maybe wrestle with the bloodthirsty beast I call a dog), and come back to the new system. Note that we can't do that nice ¼ber-command here, because we haven't yet made all the necessary modifications to /etc/conf.modules. We'll do those now.

If you're taking the kernel module approach, you'll have to have the following lines in your /etc/conf.modules:

  alias scd0 sr_mod  
  alias scsi_hostadapter ide-scsi  
  options ide-cd ignore=/dev/hdX #where X is the letter of your device  

If you're compiling everything into the kernel, ignore the preceding stuff. It's all extraneous.

Now we modify /etc/fstab to reflect the new nature of your CD-ROM drive.

Open up /etc/fstab in your favorite editor, and find the line with / cdrom in the second field. Mine looks like this:

  /dev/hdc /cdrom auto  
  ro,noauto,user,exec 0 0  

Change it to look like this:

  /dev/scd0 /cdrom auto  
  ro,noauto,user,exec 0 0  

Did you notice that the only change is that hdc became scd0? That's all you had to do.

Now it's time to reboot. Note that you'll need to make the above changes to your /etc/conf.modules only if you decided to ignore my advice and go with the modules approach. If you left IDE CD-ROM drivers in the kernel, you'll need to have all three options in your /etc/conf.modules, or it won't work.

Now that you've rebooted, it's time to test your setup. Throw a CD-ROM into your drive, and type

  mount /cdrom  

If it returns without error and you can now browse the CD, you've done everything right. It's time to start installing burning software. If it doesn't work, then you've done something wrong. Go back to the beginning and double-check all your entries. If you're trying something funky, like a machine with one IDE CD-ROM drive, a SCSI burner and an IDE DVD-ROM drive well, try disabling some of the hardware and doing it again.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net