SATA HD plus IDE CD under 2.6 kernel
Posted by isilanes on July 14, 2006
You can read in my troubleshooting page what problems I had with my CD unit in a computer with a SATA hard disk (under Linux kernel 2.6, not 2.4).
Basically it boils down to: if / is mounted on a SATA HD, the
libata kernel module must be loaded at boot time. When
libata is loaded, it “hijacks” not only the SATA interfaces, but also the IDE interfaces. When, later on,
ide-generic and other IDE kernel modules are loaded, they don’t see the IDE ports, so the CDs/DVDs or other IDE HDs, are not found! Moreover, they can’t ever be found.
This can be overcome by loading some IDE modules before
libata is loaded, as I outline in my “Troubleshooting” page. However, I recently discovered (with kernel 2.6.15), that an IDE module (precisely
ide-generic would, conversely, hijack the SATA ports, making
libata not find any SATA interface, and generating a
kernel panic at boot time, because / could not be mounted.
Now, it seemed like I had no way to fix it, because if I loaded
ide-generic first, I would get a
kernel panic, whereas if I loaded
libata first, I would have to make do without access to the CD. Luckily, I tried to find out how to load one of the modules without having it hijack the interface that it shouldn’t hijack. To do so, I used the
Bart:~# modinfo libata
author: Jeff Garzik
description: Library module for ATA devices
vermagic: 2.6.15-1-686-smp SMP 686 gcc-4.0
parm: atapi_enabled:Enable discovery of ATAPI devices (0=off, 1=on) (int)
Then I tried to load
libata (“load” means to put it in
/etc/mkinitrd/modules), then running
mkinitrd -o /boot/initrd.img-2.6.15-1-686-smp.custom 2.6.15-1-686-smp, then rebooting) with the
atapi_enabled=0 parameter, so that it wouldn’t hijack the IDE, and it failed again :^(
They say that if you can’t beat an enemy you should join her, and that I did: I tried
libata atapi_enabled=1 with the intention of having
libata handle the IDE device properly (if I couldn’t make it ignore it), and it worked! The CD is emulated as a SCSI device (a
/dev/sga0 device was generated), but it works.
This entry was posted on July 14, 2006 at 3:55 pm and is filed under Free software and related beasts. Tagged: en, floss/linux, hardware, Software. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.