Linux Hell – Via Southbridge VT8251 SATA II Controller


I’ve been experiencing strange boot problems on my ASUS A8V-VM SE motherboard where by fsck would run on nearly every boot, finding and fixing problems on my SATA II 300Gb Maxtor hard disk. Now I wouldn’t mind so much but this is a quality enterprise grade hard disk with a 5yr warranty. So some investigation was required……

I swapped out the motherboard for an ASUS A8V-XM board, the problem got worse, no SATA drives detected in Kubuntu 9.10 64-bit, not even the SATA DVD recorder. A BIOS update made no difference!

Digging around on the Internet, I discovered after about a week of tearing my hair out (I didn’t have much to start with!) that the problem is down to the SATA II Southbridge chip-set used by ASUS on a lot of their boards, namely the VT8251.

Entering

sudo lspci -vvnn

displays the culprit

SATA controller [0106]: VIA Technologies, Inc. VT8251 AHCI/SATA 4-Port Controller

To fix (really this is fudge) you need to:

1. Change your SATA Controller Mode in your BIOS to AHCI. This is normally found under on board device configuration.

2. Add pci=nomsi to the GRUB menu.lst file which can be found in /boot/grub.

To do this edit menu.lst as sudo and find the first menu item after the section, add pci=nomsi (see below in red) for each kernel boot option (if you wish). Below I’ve just given the example of the first one.

## ## End Default Options ##

title Ubuntu 9.10, kernel 2.6.31-17-generic
uuid 93eb10b9-97c9-46f4-a6b5-cb16a6626692
kernel /boot/vmlinuz-2.6.31-17-generic root=UUID=93eb10b9-97c9-46f4-a6b5-cb16a6626692
pci=nomsi ro quiet splash
initrd /boot/initrd.img-2.6.31-17-generic

quiet

What the command pci=nomsi does is to disable the MSI-style (Message Signaled Interrupts) interrupts. If you want to know more about MSI-style interrupts see http://en.wikipedia.org/wiki/Message_Signaled_Interrupts .

I’ve yet to find out whether this has any I/O performance hit on SATA II drives, but the problem seems to be common across all Linux distributions an seems to stem from a problem in the Linux Kernel. Judging by past performance the speed those kernel guys operate at, the fix is no time soon!

Note, if you want to see what you system is doing on boot-up, you can remove the quiet option in GRUB, see above in green.

=-=-=-=-=
Powered by Bilbo Blogger

Advertisements

7 thoughts on “Linux Hell – Via Southbridge VT8251 SATA II Controller

  1. How do I make that entry with Grub 2? I can run my live cd and install linux from there using the pci=nomsi option, but how do I make this my default option on my HD install?

    1. I’ve not yet had the ‘pleasure’ in using Grub 2. However, looking through the “The Grub 2 Guide” http://tinyurl.com/yfqjm4z in Ubuntu Forums, it would seem that you have a similar setup as the original version of GRUB.

      However, the GRUB menu is now stored in a file called grub.cfg instead of menu.lst. To me this makes more sense. Although the format has changed slightly, the kernel parameters seem to have remained the same and layout is similar. See below for an example:

      ### BEGIN /etc/grub.d/10_linux ###
      menuentry “Ubuntu, Linux 2.6.31-12-generic” {
      recordfail=1
      save_env recordfail
      set quiet=1
      insmod ext2
      set root=(hd0,1)
      search –no-floppy –fs-uuid –set 7ebcfe33-6914-42ec-9d2e-0859f7396933
      linux /boot/vmlinuz-2.6.31-12-generic root=UUID=7ebcfe33-6914-42ec-9d2e-0859f7396933 ro quiet splash
      initrd /boot/initrd.img-2.6.31-12-generic

      Now the bad news: DO NOT EDIT GRUB.CFG!

      The reason is that unlike menu.lst, grb.cfg is a script generated file and that is the way it is maintained.

      So to modify grb.cfg you need to create a script which is stored in /etc/grub.d/, remember that scripts must be made executable e.g. sudo chmod +x /etc/grub.d/script filename

      So a script for adding a pci=nomsi Grub menu entry would look like the following:

      #!/bin/sh
      exec tail -n +3 $0
      # This file provided an easy way to add custom menu entries to GRUB 2. Add the entries required below, and change nothing above.

      echo “Adding pci=nomsi” >&2
      menuentry “Linux with Kernel Parameter pci=nomsi” {
      set root=(hd0,1)
      search –no-floppy –fs-uuid –set 7ebcfe33-6914-42ec-9d2e-0859f7396933
      linux /boot/vmlinuz-2.6.31-12-generic root=UUID=7ebcfe33-6914-42ec-9d2e-0859f7396933 ro quiet splash pci-nomsi
      initrd /boot/initrd.img-2.6.31-12-generic
      }

      Remember you will need to adapt the above for your particular configuration, using the grub.cfg file as a template.

      Good luck and let me know how you get on.

        References:

      1. Linux Format Magazine: Issue 128 pages 88 – 91, excellent tutorial on the difference between Grub 1 and 2

      2. Dedoimedo: GRUB 2 bootloader – Full tutorial
      http://www.dedoimedo.com/computers/grub-2.html#mozTocId293325

  2. This could not have been more timely. I just spent 5 hours pulling my hair out trying to get Linux Mint loaded onto an A8V-X ASUS board/SATA drive.

    The only after install issue was adding the pci=nomsi parms to Grub. It now boots.

    Thank you.

    1. Actually, one of my very smart Linux buddies suggested this as an easy fix:

      Edit /etc/default/grub

      Edit the line: GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”. Add your kernel param at the
      end of that inside the quotes.

      run “update-grub’

      Done.

      Easy Peasy!

  3. Mongo :
    This could not have been more timely. I just spent 5 hours pulling my hair out trying to get Linux Mint loaded onto an A8V-X ASUS board/SATA drive.
    The only after install issue was adding the pci=nomsi parms to Grub. It now boots.
    Thank you.

    There is another catch with this board’s VIA chip-set which I’ve recently discovered. If you use an ATA (IDE) Pioneer DVD-RW burner it will fail to successfully burn disks. However, this is not limited to Linux but also includes Windows XP as a work colleague of mine discovered on his dual boot PC. In my case I swapped my Pioneer drive for a SATA drive and all is well. He did the same wit his Pioneer drive. So the moral is don’t use Pioneer ATA DVD-RW drives (even though they are great drives) with this chip-set.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s