Stupid solution for Grub error 17

Posted on June 16, 2008

I’ve got a Dell that shipped with Vista. I installed Ubuntu 8.04 on a 2nd hard drive and had it install Grub so I could boot between the two. After playing games on Vista, I rebooted to do some work in Ubuntu. The machine wouldn’t boot due to Grub error 17, but after doing something stupid it booted just fine.

The Problem

So, I tell Vista to restart so I can load up Ubuntu. When I should get the Grub menu that lets me choose between Vista and Ubuntu, instead I got this error message:

GRUB Loading stage1.5

GRUB loading, please wait . . .
Error 17

Possible Solutions

I hit up Google as usual and found this post on the Ubuntu forums that explains how to change some settings in the BIOS to fix the error. Then I found this post that explains how to reinstall Grub from a Live CD to fix the error.

I booted up the Ubuntu Live CD, getting ready to reinstall Grub (2nd link).

Something odd

When the Live CD loaded, I noticed my external USB hard drive was mounted on the desktop. I remembered one this post from the 1st link:

In my case, I have three SATA hard disks.

My BIOS sees them as:
HDD1 - 80 GB - Windows
HDD2 - 80 GB - Linux
HDD3 - 250 GB - Media

Linux sees them as:
/dev/sda - 80 GB - Windows
/dev/sdb - 250 GB - Media
/dev/sdc - 80 GB - Linux

So it generated assuming that order was correct, i.e.:
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc

When the installer installed GRUB using that data, it tried to install the first part of GRUB on /dev/sda and told it to look for the OS on /dev/sdc. Unfortunately, this translated to “install on (hd0) then look for the OS on (hd2)”, so it was looking for the OS on the wrong drive.

So one cause of Grub error 17 is the order in which Linux mounts hard drives vs. the mount point where Grub expects to find Linux.

The Stupid Solution

I unmounted the external hard drive, then turned it off. I rebooted the computer and a few seconds later BAM! there’s the Grub Menu.


About the Author
Adrian J. Moreno

Adrian is a CTO and solution architect specializing in software modernization. More information