~hruske Hruške, jabuke, jablane, čežane. » Blog Archive » Enable native command queueing on your MacBook for Linux/Windows
Home Contact Sitemap

Hruške, jabuke, jablane, čežane.

Ste se gdaj vprašali, zakaj Najboljšega soseda nikoli ni doma, ko pridete na obisk?

Enable native command queueing on your MacBook for Linux/Windows

Posted on November 16th, 2008 in dovhcajt |

Debian OpenLogoImage via WikipediaImage by keepthebyte via FlickrI’ve got a mid 2007 MacBook and I’m quite happy with it. I’m running Debian on it and has served me quite well for some time. However, using Linux, there are always quirks.

One of them is also native command queueing, which MacBook’s hardware (ICH7) supports, but is not enabled. By booting other operating system than OS X, Apple chose to use compatibility so the SATA controller is reprogrammed to emulate IDE.

The instructions are a bit biased for Debian users, but I think you’ll manage. The idea is to recompile GRUB with a little bit of code that reenables AHCI mode. Here’s how you get AHCI mode back (and the NCQ).

First, go to http://boeglin.org/blog/index.php?entry=entry071218-212838 and download the patch there.

Install required packages to build customized grub package:

apt-get build-dep grub 
apt-get install fakeroot build-essential devscripts

Fetch the GRUB source:

apt-get source grub

Put the patch you downloaded earlier in grub-0.97/debian/patch/.

Edit grub-0.97/debian/patch/00list and put a new line at the end, with “grub-0.97_macpro_esb2_ahci_stage1.patch” in it.

Now change dir to grub-0.97 and execute dpkg-buildpackage -us -uc -rfakeroot. This will build a new, customized grub package. Next step, obviously, is to install it.

With the package installed, all you need to do is copy new stage files over to boot directory and reinstall grub on boot sector:

cp /usr/lib/grub/i386-pc/* /boot/grub/.
grub-install /dev/sda

Now you’re supposed to reboot and see your NCQ enabled. To check, you can use:

dmesg | grep -i ncq

The (successful) result would look like this:

ahci 0000:00:1f.2: flags: 64bit ncq ilck pm led clo pio slum part
ata3.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 31/32)

Now, if you want grub not go get upgraded, you can block it’s upgrade with dpkg like so:

echo grub hold | dpkg --set-selections
Reblog this post [with Zemanta]

Comments are closed.

Komentarji so izklopljeni