Enabling the Marvell SATA controller on an ASUS M2V motherboard

The computer running the deuxpi.ca domain had an extra hard disk installed since last November but I did not have a chance to use it because I didn’t have a SATA cable for it. The disk was finally connected yesterday. However, the system did not recognize the disk. Also, the kernel was using a driver named pata_marvell (thus not, for example, sata_marvell) for the controller.

After some research on the Internet, I found that the kernel loads the ahci driver which then delegates to the sata_marvell driver in order to support legacy PATA drives on this controller. Alan Cox introducted a kernel option to prevent this default behavior so the ahci driver would be used to drive the SATA ports. In my case, the Marvell controller is used only for SATA. See the thread for some history about SATA support for the Marvell 88SE6121.

To use this kernel option on a Ubuntu system, edit the grub configuration:

sudo gedit /boot/grub/menu.lst

Add ahci.marvell_enable=1 to the line of standard kernel options. For example:

# kopt=root=/dev/mapper/vg0-root ro ahci.marvell_enable=1

This line may be slightly different on another system depending on the partitioning scheme. Save the file, run sudo update-grub, and reboot the computer for this option to have effect.

Edit: See the Debian wiki page about enabling support for the Marvell SATA controller using possibly a better method.

Comments

Anonymous said on February 22, 2009:

I added then line with no success.

I replied:

  1. This was done on an Ubuntu system. Other distributions may have slightly different ways to set the kernel command line. Also, it might not be the best way to do it. For example, you may want to use the possibly better method described at http://wiki.debian.org/pata_marvell

  2. Just like the Debian page says, you must have the Marvell SATA controller enabled in the BIOS. If it isn’t, there is nothing the operating system can do.

  3. You need to have a recent kernel that has this feature included. Recent Ubuntu and Debian systems have it, I don’t know about the others.

  4. Don’t forget to run update-grub to update the boot entries. Doing this will copy the “# kopt” line to the actual boot configurations.

  5. You should see the ahci.marvell_enable=1 option added to the command line near the beginning of the dmesg log. If not, check your grub configuration.

Good luck!

Anonymous added:

The pata drivers were still loading. As soon as I blacklisted them, whola, it worked. Thank you for the help!

Pete

ksdfpr said on October 19, 2009:

Is there any method for newbies to do this? I dont understand how to make this work …

tinmice said on December 29, 2009:

what about the new grub that is being used with 9.10? there isn’t a menu.lst to edit any more, im not sure where to add the line to :(

I replied:

I will try the following procedure later to make sure it works, but until then, here are the details.

The special boot options are specified in the file “/etc/default/grub”. To edit this file you can run the command in the Terminal:

sudo gedit /etc/default/grub

and enter your password if requested.

Find the line

GRUB_CMDLINE_LINUX=""

and change it to

GRUB_CMDLINE_LINUX="ahci.marvell_enable=1"

then save the file. Close the text editor, then run the command:

sudo update-grub

to apply the configuration changes. When you reboot, Ubuntu should be able to detect the SATA drives on the Marvell controller.

Go Top