LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-30-2007, 08:15 AM   #1
dcorb62
LQ Newbie
 
Registered: Aug 2007
Posts: 3

Rep: Reputation: 0
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22


I found out about Ubuntu and was attempting to install it onto my external hard drive. However, after installing it to the external drive and rebooting to my primary hard drive with XP partition, it now gives "GRUB error 22"(when I am trying to boot up my Primary XP hard drive). My desire was to run Ubuntu from the external drive using Virtual PC 2004 to see if I liked it and to get familiar with it. I can still see my files on my primary hard drive but Ubuntu appears to have changed my boot partition. Any suggestions on how to get my XP drive (primary drive) re-established?

Last edited by dcorb62; 08-30-2007 at 03:06 PM.
 
Old 08-30-2007, 01:28 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
In the grub manual, error 22 means the partition does not exist. I googled your situation using "Configure grub to boot external USB drive" as key words. The first link that came up looks like a very good tut.
 
Old 08-30-2007, 03:10 PM   #3
dcorb62
LQ Newbie
 
Registered: Aug 2007
Posts: 3

Original Poster
Rep: Reputation: 0
I appreciate the information but I am trying to get my primary hard drive to boot up. For whatever reason, when installing Ubuntu on the external hard drive, it also changed the boot sector of my primary (XP) hard drive. I still want the primary drive to boot up to Windows XP until I get familiar with Ubuntu and make any decision to switch to it.

Thanks,
Darrell
 
Old 08-30-2007, 08:53 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Ubuntu did the same thing to me, I have a boot manager and over 10 partitions with different operating systems. After installing Ubuntu, my boot manager was gone (it has it's own 8MB partition) and all the partitions that had all the other OS's. Had to re-install the boot manager and recover all the lost partitions. Ubuntu didn't even offer the choice to put grub in the root partition like all the other distributions, it just went ahead and put it in the MBR which was controlled by my boot manager. That's one mark against Ubuntu's installer, I'm going to write the developers and bitch.
If you have an XP CD, or the neighbor has one, you can use it to restore the Windows boot loader in the MBR. Instructions follow:
Code:
To restore Windows XP MBR

1: Boot with Windows XP CD in the drive
2: Hit any key to boot from the CD
3: Wait for installer to load drivers in memory
4: When asked to press enter to install, type: r
5: When asked which Windows installation would you like to log onto, 
if there is only one, type: 1  (and hit enter)
6: When asked to type the Administrator password, I hit enter without 
typing anything which will be the administrator password for most OEM 
Windows installations, (No password). If you installed Windows XP 
yourself and added an administrator password, type this password.
7: At the prompt type: fixmbr   (and hit enter)
-**CAUTION** and a warning appear
8: When asked "Are you sure you want to write a new MBR?:" type: y
-The new master boot record has been successfully written.
9: When the prompt returns, type: exit
-The computer re-boots and Windows kernel is loaded.
There are also rescue CD's available on-line that can restore a Windows boot loader in the MBR. Not sure which, will investigate and report back.
 
Old 08-30-2007, 09:04 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You can also try "fixboot" instead of "fixmbr" if it appears the boot sector of the Windows partition is holding Grub files instead of Windows boot.ini.
 
Old 09-04-2007, 09:32 AM   #6
ham635
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: 0
I'm having the same problem... but with a twist. I've got a laptop and whenever I try to boot up without the external drive, I get the same error (when I boot up WITH the external drive, I am able to boot to either windows or ubuntu just fine). However, when I try and use the recovery utility to reinstate the mbr, it doesn't detect my primary hard drive. If I try and use it without the external drive powered up, I get a 'no hard drives present' error and if I do it with the external drive, the external drive is the only one detected.... help?!
 
Old 09-04-2007, 09:59 AM   #7
ham635
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: 0
Apparently the solution was the least likely (at least in my mind. Windows system restore seems to do the trick if anyone else ends up having this problem. I've never had much luck with it before, but it sure saved me this time
 
Old 09-04-2007, 11:28 PM   #8
dcorb62
LQ Newbie
 
Registered: Aug 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Smile Problem solved

I tried every suggestion recommended here and spent several days doing Google searches on the error and finally found a web site that had an .iso file that worked for me. The problem with most suggestions is that while trying to boot from a windows boot cd or from the install cd, it would not recognize my primary windows drive. From Ubuntu, I could see the drive and all of my files. Obviously, Ubuntu over-wrote my MBR so I finally tried the following web site: http://supergrub.forjamari.linex.org/?section=download. Using the Super Grub Disk, I was able to step through the procedures to re-write a windows MBR. Finally, after getting windows to boot up, I did a restore to the week prior to installing Ubuntu (just to be on the safe side). However, until I could get windows to boot up, there was no possibility to do a system restore. A valuable lesson learned.

thanks for all your help.
Darrell Corbitt

Last edited by dcorb62; 09-04-2007 at 11:29 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error first boot from external hard drive GvdB Linux - General 3 11-26-2007 06:06 PM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 09:03 AM
External Hard drive + ubuntu yayd Linux - Newbie 9 01-15-2006 08:30 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:32 PM.

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