LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-07-2003, 06:48 PM   #1
TheDewAddict
LQ Newbie
 
Registered: Sep 2003
Posts: 19

Rep: Reputation: 0
Using GRUB for a dual-boot XP/RH9


Hello all,

I'm new at this, so forgive me if this has been answered before.

I have Win XP on my machine, and used Partition Magic to create a Linux partition, and a SWAP partition on my drive. Everything went OK, and I installed Linux with few problems. However, once I restart my computer, GRUB only shows Linux as the available operating systems to boot into. I went into XP's Recovery Console and tried a fixmbr, and now when I start up, I just get the message "No operating system found." What can I do to get them back? I know XP is still there, because I can go back into the recovery console, and all the files are there. I just can't boot. I didn't make a boot disk upon installation because my floppy drive does not work. Thanks!
 
Old 09-07-2003, 06:56 PM   #2
mi6
Member
 
Registered: Jun 2003
Distribution: Fedora 9 64bit, RHEL 4.6
Posts: 96

Rep: Reputation: 15
since you made no rescue floppy, I don't know many ways to rescue your linux system.

You could use a "live CD" like Knoppix to rewrite grub.conf is you have one available.

As for "No OS found". I always use a win98 startup disk (even on my NT machines) and do a fdisk /mbr to rewrite the windows MBR and it hasn't failed yet.
 
Old 09-07-2003, 07:14 PM   #3
TheDewAddict
LQ Newbie
 
Registered: Sep 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Reovery console won't let me type fdisk /mbr. It says that command is not recognized. I then tried fixboot C:, and it wrote a new MBR to the C: drive, but that didn't help either. I'm not so worried about getting Linux back, as I just installed it, but I would like to get XP back, so I can try again.
 
Old 09-07-2003, 07:42 PM   #4
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
You can use the RedHat9 CD to boot into Rescue Mode.

Booting into Rescue Mode
http://www.redhat.com/docs/manuals/l...mode-boot.html

Once booted, you can install GRUB back into the MBR.
Code:
/sbin/grub-install /dev/hda
If you want winXP to appear in the GRUB menu, you will have to edit /boot/grub/grub.conf
For example:
Code:
title WindowsXP
        rootnoverify (hd0,0)
        chainloader +1
 
Old 09-07-2003, 09:21 PM   #5
TheDewAddict
LQ Newbie
 
Registered: Sep 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks Mathieu!

I've got Linux back and working now, but when I select WindowsXP, I get a message saying "NTLDR is missing. Press any key to restart." I'm hesitant to do anything for fear of losing Grub again. Any ideas?
 
Old 09-07-2003, 10:28 PM   #6
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
go in the xp recovery console again do you see NTLDR in root(C:\)?
actually can you describe how your harddisk is partitioned now?
 
Old 09-07-2003, 10:35 PM   #7
TheDewAddict
LQ Newbie
 
Registered: Sep 2003
Posts: 19

Original Poster
Rep: Reputation: 0
I have a 120GB hard drive, partitioned with a 80GB NTFS Windows XP partition, then a 500MB Linux SWAP partition, followed by a 35GB Linux partition.
 
Old 09-07-2003, 10:38 PM   #8
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
this is offtopic - but im jealous of the 120g hd u have.
 
Old 09-07-2003, 10:40 PM   #9
TheDewAddict
LQ Newbie
 
Registered: Sep 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by h/w
this is offtopic - but im jealous of the 120g hd u have.
Haha dont be. I had an 80 Gig drive that I lost to a power surge, so then I bought a 100 Gig drive that I lost to another power surge (2 months after the first), so I went out an bought a UPS and this 120 Gig drive (on sale at Circuit City for $100), and then another power surge hit, and my stupid UPS blew out my cpu power supply....ergh!!!
 
Old 09-07-2003, 10:42 PM   #10
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
maybe u should resolve ur power issues b4 all this? hehe
wht r those things called that u need? surge-protectors?
 
Old 09-08-2003, 05:17 AM   #11
oobe
Member
 
Registered: Sep 2003
Distribution: slackware
Posts: 85

Rep: Reputation: 16
im am new to linus so i'll be humble and keep this brief but i fhave had hours of fun with windows bootloader that dont work stick with grub or change to lilo linux can recognize windoze but windoze cant recognize linux. any the problem with missing NTLDR is not ntdlr but the boot.ini is confused somehow or over written it happened to when i first started partitioning a lot when dual booted xp pro and win2k3 two nt systems dont work that well either. so anyway try fix / mbr again from recovery console, then check windows will boot then use your linux distro cd to setup lilo or grub i have never used grub so cant say if its better or worse but i can say that lilo is quite good at recognizing windoze

hope this helps

Last edited by oobe; 09-08-2003 at 05:19 AM.
 
Old 09-08-2003, 05:57 AM   #12
Umasankar
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Rep: Reputation: 0
How many primary partitions do u have?

If it is more than one, use the grub command 'hide' to hide all but one primary partition(c.
 
Old 09-08-2003, 09:39 AM   #13
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
I have encountered this particular problem under circumstances not unlike those you describe. In my case, the damaged system was Windows NT. It took awhile, but I finally discovered that I had a problem with the volume boot record (not the master boot record) which - IIRC - had the wrong block size in it. As a consequence, I could not boot using the hard drive, but I could boot using a boot floppy.

You should construct an XP boot floppy. To do this you have to get into XP (I think). If you can't get into your XP, get into someone else's. You can also use Win NT or Win 2000.

Open a command line window, insert a floppy into the drive, and type this command:

format a:

This will write the proper XP volume boot record to the floppy.

Then, copy these files from the boot partition of YOUR Win XP system to the floppy:

boot.ini
ntldr
ntdetect.com

If you can't access the XP partition from XP, then mount it from Linux (you will need ntfs support in your kernel probably) and copy the files that way.

After you have done this, reboot your machine and make sure BIOS is set so that you boot first from floppy. Insert your boot floppy.

If everything goes well, the system will boot the floppy, transfer control to your XP system, and up it will come. If this works, then it absolutely confirms that your XP volume boot record is bad.

Once you have established this, you will need to obtain DiskProbe from here:

http://www.dynawell.com/support/ResK....asp#DiskTools

Using DiskProbe you will be able to recover your NTFS volume boot block, if you know how. It might work to copy the backup boot block from the end of the NTFS partition to the beginning. If that doesn't work, you will have to manually edit it. This can be painful, but I can help you with it if you get to that point.
 
Old 09-10-2003, 09:36 PM   #14
TheDewAddict
LQ Newbie
 
Registered: Sep 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Well, I tried all of the above, and XP is being bitchy. It won't format ("you cannot format removable media"), and it won't copy anything to my A: drive ("access is denied"). My laptop has XP, but I don't have a floppy drive to use. Is there a way I can make a boot CD on my laptop, and use that on my desktop (where the problems are?). I'll look into adding NTFS support to Linux via the kernel, but Im still very new to Linux, so I'm pretty apprehensive about playing with the kernal.
 
Old 09-10-2003, 10:11 PM   #15
TheDewAddict
LQ Newbie
 
Registered: Sep 2003
Posts: 19

Original Poster
Rep: Reputation: 0
I installed the NTFS support-driver, and was able to copy boot.ini, and ntldr to my floppy (can you format a windows floppy in Linux?), but it would not let me copy ntdetect.com. It kept saying that it did not have read-write privlages. I'm about to give up, this is beyond annoying now!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
frozen grub on xp/rh9 dual boot dave37 Red Hat 3 08-19-2005 05:56 AM
grub setup to dual boot XP and RH9 eraaen Linux - Newbie 3 02-27-2004 06:02 PM
Removed Second HD with Dual-Boot RH9/XP Box; Now Grub Won't Load MadFunk Linux - General 1 01-05-2004 06:29 PM
I need help with grub and trying to dual boot rh9 and winxp pro slicker Red Hat 2 08-30-2003 10:44 AM
Trying to dual-boot XP and RH9 with GRUB...GRUB stops right after BIOS EvilYoda Linux - Newbie 5 06-20-2003 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:39 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