LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using GRUB for a dual-boot XP/RH9 (https://www.linuxquestions.org/questions/linux-newbie-8/using-grub-for-a-dual-boot-xp-rh9-90306/)

TheDewAddict 09-07-2003 06:48 PM

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!

mi6 09-07-2003 06:56 PM

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.

TheDewAddict 09-07-2003 07:14 PM

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.

Mathieu 09-07-2003 07:42 PM

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


TheDewAddict 09-07-2003 09:21 PM

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?

Demonbane 09-07-2003 10:28 PM

go in the xp recovery console again do you see NTLDR in root(C:\)?
actually can you describe how your harddisk is partitioned now?

TheDewAddict 09-07-2003 10:35 PM

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.

h/w 09-07-2003 10:38 PM

this is offtopic - but im jealous of the 120g hd u have. :)

TheDewAddict 09-07-2003 10:40 PM

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!!!

h/w 09-07-2003 10:42 PM

maybe u should resolve ur power issues b4 all this? hehe :)
wht r those things called that u need? surge-protectors? :)

oobe 09-08-2003 05:17 AM

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:newbie:

Umasankar 09-08-2003 05:57 AM

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:).

jiml8 09-08-2003 09:39 AM

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.

TheDewAddict 09-10-2003 09:36 PM

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.

TheDewAddict 09-10-2003 10:11 PM

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!


All times are GMT -5. The time now is 03:48 AM.