Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-22-2005, 03:21 AM   #1
Registered: Jul 2005
Posts: 161

Rep: Reputation: 30
Another GRUB error 17 thread

I believe this is a simple problem, however I have not been able to find a simple solution to it in this forum and google.

I have been using Ubuntu Hoary (hda1) all the while and GRUB runs great.

Yesterday I installed Suse 9.3 (hdb1 )and Suse's GRUB overwriten the Ubuntu's.

Today I am wise enough to erase off the entire hdb1 while apparently the GRUB in the MBR is still pointing to hdb1.

Now GRUB gives me error 17 and I am unable to boot anything with the GRUB in the MBR.

Now how do I "flash" my MBR back to point to hda1? I have tried reinstalling GRUB with Synaptic but apparently it doesn't touch the MBR.

Thank you for reading.
Old 09-22-2005, 05:47 AM   #2
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Dead simple problem

Your Suse Grub was loading hdb1's /boot/grub/menu.lst that has been erased by you and Grub doesn't know what to do!

Think error 17 stands for "No such partition" or something similar


You should be able to use Ubuntu's installation CD to replicate its boot loader again.

The standard method is change root to do a grub-install. Steps are

(1) boot up a Live CD, log in as root and drop into terminal mode
(2) make a temp. directory for hda1 --- mkdir /mnt/hda1
(3) Mount device hda1 on it --- mount /dev/hda1 /mnt/hda1
(4) Replicate Ubuntu's boot loader in the MBR -- grub-install /dev/hda
(5) Reboot --- reboot

As a rule you overwrite one boot loader with another. In this case you overwrite Suse's Grub with Ubuntu's Grub, but it can equally it can be Windows MBR or a Lilo.
Old 09-22-2005, 06:09 AM   #3
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Originally posted by saikee
grub-install /dev/hda
Cool, that's the magic word that I'm looking for.

Old 10-10-2005, 09:04 PM   #4
Registered: Apr 2004
Location: Greensboro, NC, USA
Distribution: Debian
Posts: 134

Rep: Reputation: 15
This just fixed a problem on my machine as well. I started getting IO errors and when I rebooted my machine I was getting the error 17. The steps above fixed mine, but just to clarify for someone who might be trying this also:

in step (4) above be sure to specify the correct directory for the grub install to place the files:
grub-install --root-directory=/mnt/hda1 /dev/hda
if you don't put the correct directory there (wherever you mounted the drive) you will get an error about not being able to create /boot directory because it is a read-only filesystem since it will be trying to make the /boot directory in the filesystem created by the LiveCD you are using.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 09:33 AM
scheduling thread gives error bndpatel Programming 1 06-24-2005 02:54 PM
MySql Thread error on startup Biggen Linux - Software 9 09-30-2004 09:05 AM
gnome 2.6 gtk thread locks error???? DaVenom Slackware 3 05-31-2004 07:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration