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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-30-2007, 09:15 AM
|
#1
|
LQ Newbie
Registered: Aug 2007
Posts: 3
Rep:
|
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 04:06 PM.
|
|
|
08-30-2007, 02:28 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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.
|
|
|
08-30-2007, 04:10 PM
|
#3
|
LQ Newbie
Registered: Aug 2007
Posts: 3
Original Poster
Rep:
|
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
|
|
|
08-30-2007, 09:53 PM
|
#4
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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.
|
|
|
08-30-2007, 10:04 PM
|
#5
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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.
|
|
|
09-04-2007, 10:32 AM
|
#6
|
LQ Newbie
Registered: Sep 2007
Posts: 2
Rep:
|
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?!
|
|
|
09-04-2007, 10:59 AM
|
#7
|
LQ Newbie
Registered: Sep 2007
Posts: 2
Rep:
|
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
|
|
|
09-05-2007, 12:28 AM
|
#8
|
LQ Newbie
Registered: Aug 2007
Posts: 3
Original Poster
Rep:
|
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-05-2007 at 12:29 AM.
|
|
|
All times are GMT -5. The time now is 02:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|