Archive for October, 2008

Fix for Marvell SATA/IDE controller on Debian

Thursday, October 23rd, 2008

I recently purchased an ASUS P5Q-PRO motherboard to use as a basis for an upgrade to my home server.  Unfortunately I had not done my research and ran into some issues with installing and running Linux.  Most of these issues revolved around the fact that ASUS had implemented IDE using the Marvell 88SE6111 controller.

Installation issues

Initially, booting up off the Debian netinst CD, everything seemed fine, but once I got to the CD drive detection stage the installer threw an error: “No common CD-ROM drive was detected“.  I tried manually with the CD drivers on offer from the installer but had no luck.

Whilst I was a little concerned for the future of this motherboard, I thought that once it was up a running there would probably be a fix available somewhere for this problem.  So to get to that point I decided to install Debian from a flash disk – this worked fine (there are plenty of guides available to show you how to do this, or you can check out my previous post Installing Debian from a USB Flash Disk).

Still no IDE

I now had a new Debian Lenny system up and running, but unfortunately my only optical drive (being IDE) was not working at all.  I was aware that the module I needed for this controller was pata_marvell and performing the following command confirmed it was already loaded.

lsmod | grep marvell

Solution

In the end the solution to this issue was quite simple.  Whilst I had the right module installed and loaded, the order in which it was loading was the issue.  The fix was to have the pata_marvell module load up before the ahci module.  To do this we need to perform two small tasks (as root).

First we need to edit:

/etc/initramfstools.d/modules

To the bottom of this file add the following lines:

pata_marvell
ahci

With this file updated, we need to update our initramfs, this can be done with the following command:

update-initramfs -k all -u

This will update all the kernel options you currently have on your system.  With that done, reboot and check if you have your IDE devices available.  My DVD drive showed up as /dev/scd0.

Whilst I couldn’t find this complete solution in one place, the combination of the following websites allowed me to piece it together:

http://fixunix.com/debian/542307-bug-493657-workaround-2-6-25-2-6-26-marvell-88se6121-88se6145-pata_marvell-ahci-regression.html
http://www.gossamer-threads.com/lists/linux/kernel/968813
http://www.linuxquestions.org/questions/linux-general-1/module-load-order.-648599/