Monday, December 26, 2005

Serial ATA and Grub

For those of you who don't already know grub is a bootloader used mostly by linux machines. I got a spare powersupply put in my computer this morning and got to work moving my linux partition over to the new (SATA) drive. This was fine until it got time to reinstall grub. Turns out that the grub-install script that I was trying to use (and that most distro's installers use) doesn't handle SATA drives correctly. You have to install grub by hand with a command like

grub
root (hd1,0)
setup (hd1,0)
quit


Assuming you have 1 IDE drive and 1 SATA drive these commands will install to the SATA drive. Apparently SATA drives are detected second by most chipsets to the sata drive will always be one number less than the number of drives you have (because grub starts counting at 0). This also applies to the grub configuration file usually found in /boot/grub/grub.conf.
Then it turns out to make my asus motherboard boot off the sata drive I had to set "SCSI" as the boot device. Of course there is no documentation of this at all so thanks to the good people on the gentoo forums.

One of my friends had this come up in a graphical installer (ubuntu) so I thought I would post it here as about 15% of my readers (ok, maybe 4-5 people) use linux.

For the record, there is a noticeable difference going from IDE to SATA in perceived speed

No comments: