Question

After removal of Linux hard drive, XP will not boot

Asked by: richardwilkins

I'm new to Linux and after installing CentOS on a second hard drive, grub.conf allows me to boot from either drive.  But when I removed the Linux HD, I got a message when trying to reboot with XP : "GRUB hard disk error" and it died.  Returning the HD brought back both OSes.

Can anyone help me to fix this?  Isn't there a way to temporarily alter the XP files to skip Grub?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-02-14 at 13:21:29ID21736713
Tags

centos

,

grub

Topic

Linux Setup

Participating Experts
3
Points
500
Comments
20

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. grub.conf / dual boot redhat 9 and WinXP
    Hello, My guess is that this question has been asked hundreds of times and will thus be an easy 250 points for someone :) Enjoy. Here is my hard drive configuration (view in monotype font for better readability) ============================================================...
  2. GRUB
    Hi all I have the following setup: XP on SATA (sda1 & sda2) Linux on ATA IDE Bios setting: boot ATA (hdb1 & hdb2) [root@ramses dell]# fdisk -l Disk /dev/hdb: 123.5 GB, 123522416640 bytes 255 heads, 63 sectors/track, 15017 cylinders Units = cylinders of 16065 * 51...
  3. grub.conf
    I trying to edit grub.conf but can't locate the file in /boot/grub in ubuntu(warty). Any thoughts on where to find it?
  4. Change grub.conf from Windows
    Here is an interesting one. I have been researching and trying to find a way to access an ext3 partition from Windows. The reason I am wanting to do this is so that I can switch between Windows XP and CentOS remotely. At this point I have made init 5 runlevel change grub.con...
  5. Boot linux and stop at grub
    when I boot Linux it show Grub and do notthing How can I fix this i use redhat

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: richardwilkinsPosted on 2006-02-14 at 13:35:31ID: 15955128

And rebooting in XP I notice that there's nothing in autoexec.bat and boot.ini has only the XP system.  Where is the Grub coming from when booting?

 

by: Cyclops3590Posted on 2006-02-14 at 17:57:19ID: 15957030

you have to do a
fdisk /mbr
but that would overwrite the grub loader so you wouldn't be able to get to the CenOS installation after that.
As far as I understand it, the system will only go to one hard drive (i'm sure there are system out there that can look at multiple hard drives, but most PCs don't do that; not that i'm aware of anyway) for the boot sector on the primary hard drive.  This record is most likely pointing to the second hard drive looking for the rest of the grub loader and cannot see it.

why do you want to remove the hard drive anyway if you already have dual boot configured.

 

by: jbfstplkPosted on 2006-02-14 at 19:28:59ID: 15957470

Got to go to the office tomorrow, but what is the fdisk/mbr command in XP?  I've tried it and it doesn't work at all.  In answer to your question,  I need to know how to do this as we don't have that many computers to play with.

Sincerely, we want to know how to do these things.

 

by: xberryPosted on 2006-02-15 at 00:13:34ID: 15958380

In Windows XP, you can uninstall GRUB as follows:

Boot from the Windows XP CD and press the "R" key during the setup in order to start the Recovery Console. Select your Windows XP installation from the list and enter the administrator password. At the input prompt, enter the command "FIXMBR" and confirm the query with "y". The MBR will be rewritten and GRUB will be uninstalled. Press "exit" to reboot the computer.

This is from:

http://portal.suse.com/sdb/en/2002/09/fhassel_deinstall_grub.html


 

by: xberryPosted on 2006-02-15 at 00:24:10ID: 15958419

Just noticed, you wrote something about "temporarily skipping GRUB".
Well if you remove your second harddisk,
the GRUB as it has been set up for booting
both harddisks won't be usable any longer
anyway. If for any reason you'd like to
use GRUB as it was, again, at a later time
then I recommend to put GRUB with it's recent
configuration onto a floppy before you fix your
master boot record (which is the place on first HD where
your GRUB resides at the moment).

By the way, the error message, that you get
after having removed the second HD, is simply
because GRUB needs to load 1.5 & 2.0 stage
loader information from the Linux OS on second HD.
So, since GRUB can't determine second HD, it
generates that error message.


 

by: Cyclops3590Posted on 2006-02-15 at 04:38:57ID: 15959654

i could be wrong but what i said about "fdisk /mbr" and xberry said about "fixmbr" are the same thing.  It just has XP overwrite the boot sectore with XP's boot loader. but you do this by going to the recovery console the same way like xberry described.  

Also, you can't uninstall a boot record, you can only overwrite it.  Kinda like you can't uninstall the formatting of a partition.  You can only overwrite the formatting with new formatting.

 

by: xberryPosted on 2006-02-15 at 05:14:39ID: 15959852

Hi Cyplops,

> i could be wrong but what i said about "fdisk /mbr"

as you pointed, did the same thing (Rewriting mbr)
using the 'good old' DOS tools. ; ))
However as far as I know
you can USE the DOS fdisk /mbr command only with older Windows OS versions, but
not with Windows XP or Windows 2000, since
they format the HD in a way which can't be modified by DOS fdisk,
at least I've never heard that possible. So with XP & 2000
he should try the way suggested. (By the way, similiar problem has been solved before, I only
had to copy/paste from my own answering history (Hehehe ;)) :

http://www.experts-exchange.com/Operating_Systems/Linux/Linux_Setup/Q_21067077.html

 

by: Cyclops3590Posted on 2006-02-15 at 06:31:51ID: 15960439

been so long since I dual booted and did the fdisk method I don't really remember I thought I did it on a W2K Pro box and thought I saw the option in XP recovery console, but can't remember for sure.  I don't have a test machine to verify so really can't tell ya.

at any rate richard, go into recovery console.  you'll find what you're looking for in there.  Then after you do that, unplug the windows hard drive and boot with the CentOS discs.  run an upgrade (which will do nothing really), and take the upgrade thru to the end.  Towards the end it will write the boot sector again allowing you to boot to CentOS again.

This way you can boot to either XP or CentOS, but each disc is treated separately so you'd have to swap hard drives each time you want to swap OSs.  I have that setup at work on my test machine, but really don't recommend it  (I just very rarely use the machine and often slave other hard drives for reclaimation and need that other IDE connector meaning only one primary hdd can be connected)

 

by: jbfstplkPosted on 2006-02-15 at 08:17:06ID: 15961652

richard, I too have two hard drives, one with XP with the ntfs file system and the second with Fedora Core 4.  And of course, neither can see the other.  But shortly I will try what these guys say so that I can simply move the primary IDE cable from one to the other when I want to use that OS.  I'll recover the XP disk in order to overwrite the mbr (I wonder if anyone knows whether the dual boot mbr can be backed up -- I doubt it.)  I believe I can rename grub.conf and create a new single boot conf file. This is probably not necessary as you simply could not select the "Other" OS -- XP which is no longer there.  Right now I have three Fedora kernels to select from.   But going back to dual boot may not be possible.

Does anyone think you can without reinstalling Linux?

 

by: xberryPosted on 2006-02-15 at 08:40:49ID: 15961982

> But going back to dual boot may not be possible.

WEll, if you put back both HD's after that IDE cable-swithing experiment, you would of course have
two separate GRUB 1st stage boot loaders in two seperate HD's master boot records.
I have no experience whatsoever if it would interact disturbingly with MBR on disk TWO,
when booting from MBR on first HD, which it normnally does.

Provided that MBR on disk ONE is given priority & no influence from MBR on disk two, then
you would have to prepare booting by copying back the renamed(saved) /boot/grub/menu.lst file (or editing it)
from your original dualboot configuration.

 

by: xberryPosted on 2006-02-15 at 08:55:44ID: 15962199

Adding here:
So, before ending up with possible conflicts
when having master boot on two HD's, to overcome possible MBR conflicts or
avoiding the update business
then why not simply migrate the GRUB boot loader completely on to one single
boot floppy & have booting your system from it until you decide which configuration
to keep.  

 

by: richardwilkinsPosted on 2006-02-15 at 10:04:27ID: 15962890

Well, I certainly appreciate the advice you all are giving.  It will be a while before I can go back and try some of these things, but I have one very basic question:  I have successfully formated a couple of floppies in Linux, but simply do not know exactly how to copy GRUB and its current configuration to one.  Can any of you help me, maybe in baby talk?

 

by: jbfstplkPosted on 2006-02-15 at 11:07:27ID: 15963545

I just now gave a try to booting with, first XP, and got the same message rich got.  Then I connected the Linux HD and got a similar message, "missing operating system".    Reconnectisng both was OK.

So I'm wondering, why you want to do this anyway, particularlysince is seems so difficult to recover both operating systems.   And after reading xberry's comment,  "why not simply migrate the GRUB loader completely on to one single boot floppy" would you tell us how to create a bootable floppy on which to migrate Grub boot loader to?

 

by: xberryPosted on 2006-02-15 at 14:16:18ID: 15965667

For the GRUB-floppy:

Login as superuser

Then simply:

# grub-install /dev/fd0

which puts GRUB on your floppy drive, using the grub shell.

BEWARE: This is only saving you from using GRUB from the master boot record on harddisk, so after GRUB won't exist on MBR of harddisk any longer
(let's say for your purpose of removing one HD and booting XP in standard mode) then you'll later still be able to boot your original configuration
(dual boot on two disks) as was. THOUGH, IF you would modify your Linux System on second HD in a way that GRUB won't be able to locate
and read root system/boot information any longer (changing filesystem partitions, reinstalling, . . .) then you won't get anywhere with your GRUB floppy.
. . . So if you do need to do any boot modifications in your Linux while logged in (for instance modifying your grub/menu.lst) then it would be a good idea
to rerun the grub-installer for your floppy.

You may get more info about GRUB from your Linux console:

# info grub


 

 

by: jbfstplkPosted on 2006-02-15 at 14:37:37ID: 15965890

This is what I get:

Wonder why!

[root@localhost ~]# grub-install /dev/fd0
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Unknown partition table signature
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda

 

by: xberryPosted on 2006-02-15 at 15:01:32ID: 15966123

Try if it works

 

by: xberryPosted on 2006-02-16 at 11:19:07ID: 15974152

Sorry jbfstplk,

was a bit in a hurry yesterday, so only did look at your posting in a flick of a moment,
what I actually thought was you could simply see if booting from your GRUB floppy works already.
ONE thing I did miss though:  in the device map generated, there is only one harddisk recognized
(hda), but of course you do have two HD's, so that can't be right then.

When it says "unknown partition table signature" I strongly assume that it does refer to
your second harddisk, that's why it isn't mentioned in the device map any more.

So I wonder what you actually did change ? Did you only remove your HD from IDE slot & put it back exactly as it was
or did you do anything else to it or your operating system ? Hopefully you didn't swap the IDE position physically,
cos that's what Windows wouldn't like: Windows & Linux only cooperate together as dual boot, if Windows can have the
IDE one (Windows on hda, first disk) . . .  

 

by: jbfstplkPosted on 2006-02-16 at 12:09:30ID: 15974671

xberry, I certainly appreciate your efforts to assist me and richard, too.  But it is so complicated that I'm going to leave both drives in the test machine, and continue to research and study Linux.

And I notice that richard has not responded, making me recommend that, unless he has been successful that he do the same.  My machine works in both OSes just fine.  When I get more familiar with Linux, I will post my own questions.

Joe

 

by: xberryPosted on 2006-02-16 at 12:43:49ID: 15974989

> But it is so complicated

Well, we certainly should have left it with the original issue . . .  Cyclops3590 and I tried to give some more
insight & additional ideas   . . . but -  this is my experience - anything around the boot process
needs just lots of knowledge & understanding starting form hardware involved, including the BIOS, up to the levels where
the OS related issues fit into the whole puzzle -

i recommend - if you like and have some time then read anything about GRUB . . . !

 
. . .  

 

by: richardwilkinsPosted on 2006-02-16 at 13:24:55ID: 15975383

I'm just too new to Linux to really get deep into these things, but I did appreciate the work of you three.  The issues between xberry and jbfstplk were helpful to me and have resulted in my stopping my current effort to remove either of the two drives.

Thanks much!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...