LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GRUB dual boot problem: Boot "other" (windows) just restarts GRUB! (https://www.linuxquestions.org/questions/linux-software-2/grub-dual-boot-problem-boot-other-windows-just-restarts-grub-430643/)

stevod333 04-01-2006 10:02 AM

GRUB dual boot problem: Boot "other" (windows) just restarts GRUB!
 
Hi there,

This is my first ever Linux question post. I am a bit of a newcomer to Linux, and it is near 2 o'clock AM at the moment - I'm tired and frustrated, so please excuse me if I'm not too clear in my descriptions.

A week or two ago, I downloaded and installed Fedora Core 5. With my same system and drive setup, I have in the past installed Fedora Core 3 (using GRUB as the bootloader) with no problems at all.

This time however with core 5, on the first install, GRUB did not seem to install correctly - first of all, when the system was first rebooted after finishing installation, all I got was a GRUB prompt. After some research I figured out how to use the command "configfile" which gave me the menu and allowed me to load Fedora with no problems. However, If I chose from the menu to boot "other" (Windows), the screen would blank for a moment, then come straight back to the GRUB menu of OS's to load.

This is how I have (had) my drives / partitions setup-

Drives:
hd0 (hda) - 30Gb, Seagate (master)
hd1 (hdb) - 120Gb, Seagate (slave)

Partitions:
---------------
hda1 - 20Gb, FAT32, used for general storage (MP3's, downloads, email storage, drivers etc...)

hda2 - 10Gb, NTFS, devoted to Windows XP installation.
---------------
hdb1 - 30Gb, NTFS, windows programs get installed here, used for video storage, video (TV) captuting, photos, etc...

hdb2 - 30Gb, NTFS, more video storage, not much else.

hdb3 - 10Gb, NTFS, empty.
---------------

everything leftover on hdb (hd0) is for Linux (if it is of any importance, /dev/hdb5 mounts as /boot).

I have tried so many different things to fix the boot problems - reinstalled Fedora, manually installed GRUB, but things just seem to keep getting worse.

I have seen so much info on setting BIOS HDD options (mostly to use LBA or some say LARGE options), but this has been little help.
One piece of advice I found was to create a small partition as the first one on the boot drive and install grub there, thus at the moment I have 3 partitions on hd0 - 256Mb (FAT32 - for GRUB), 15Gb (FAT32 - for files that I will need to access from both OS's) and approx' 12Gb (NTFS - where I want windows to reside on it's own so I can make a ghost image for easier re-install).
After re-installing windows, I have just tried to reinstall GRUB again manually onto the 256Mb partition and now the best I can get when trying to load either OS is a nasty message saying "Error 18: selected cylinder exceeds maximum supported by BIOS". No BIOS settings seem to change this, except that setting hd1 to CHS causes GRUB to give a "disk read error" type of message.

In each attempt to get windows going again, I've had to use a utility from Seagate to wipe the MBR on hd0 so that windows could write its own boot info again. This utililty however destroys all partitions on the drive.

I guess I have two questions:
1 - what is going wrong with the dual boot setup - how can I make this work???!!!
2 - can anyone suggest another way of wiping the MBR clean after a failed GRUB instalation - I'm getting sick of FDISKing and formatting this drive.

Whoever can help me with these problems will be forever in my debt.

Regards,
Steve.

Randux 04-01-2006 04:18 PM

Sorry man, I don't use Grub but it should be piece of cake. Guys are multibooting without any issues.

Here is a link to some (much) info from the boot King hisself:

http://www.justlinux.com/forum/showt...hreadid=143973

PTrenholme 04-01-2006 04:43 PM

It would help if you could post your /boot/grub/grub.conf file.

I suspect that your XP boot section looks like this:
Code:

title WinXP
        rootnoverify (hd0,0)
        chainloader +1

If it does, the rootnoverify line should probably be rootnoverify (hd1,0) since the XP loader is (presumable) on hdb

stevod333 04-01-2006 09:24 PM

I can't get the grub.conf file just now (system is currently unusable - MS-windows won't boot at all and X-windows (KDE atleast) keeps hanging. I'm using my laptop to write this), but yes the entry is something like...

title Other
rootnoverify (hd0,0)
chainloader + 1

...which would seem to be correct, as windows is installed on hd0,1 but installs its boot info to the MBR which is on hd0,0.

I've just reinstalled Fedora again and installed Gnome this time, so will try to get into the system that way and post the entire grub.conf file.

I'm suspecting the problem of GRUB reloading from the beginning if I choose the hd0,0 system to boot might be something to do with the chainloader option. If I can get GRUB to work again at all from the hard disk, I might try to play around with that a bit.

I'm just about at my wits end. I have created a GRUB boot floppy, which will boot Fedora without any problems, but thats not really the optimum solution. Another bizzare thing - if I boot from the floppy and choose Fedora first up, it boots fine. If I choose to boot other (windows) first, I get the "...cylinder exceeds max supported by bios" message - if after that I then select Fedora I get the same message! I then have to reboot again and start from the begining if I want to load Fedora ?!?!?

The biggest problem right now though is that trying to boot either system when using GRUB installed on hd0 gives the message "...cylinder exceeds max supported by bios".

Also still can anyone suggest how to wipe the MBR clean and completely remove GRUB? I might have to start a seperate thread for that one.

One thing that could really save me some time though - does anyone know how I can change the runlevel at boot-time? another problem I'm having is X-windows (KDE) hanging, even if I choose a failsafe terminal session. I keep having to boot from the Fedora install disk and enter "linux rescue" mode to get a text based command prompt, which is a rather time consuming excersise.

nutbag 04-01-2006 09:52 PM

According to what you posted, root for XP is (hd0,1). First hd is 0, second is 1... First partition is 0, second is 1...
Grub should reinstall to the mbr when you reinstall FC5. It should overwrite what was there.
so XP should boot with
rootnoverify (hd0,1)
chainloader +1
boot
If it doesn't try
makeactive
after the chainloader command.

If this is successful check /boot/grub/menu.lst and edit it.
Add
title Windows XP
rootnoverify...

kg4ysy 04-02-2006 01:13 AM

title=Winders
rootnoverify (hd0,n<--Change this)
chainloader +1
makeactive


n == partition of windows - 1

Randux 04-02-2006 01:46 AM

Quote:

Originally Posted by stevod333
I can't get the grub.conf file just now (system is currently unusable - MS-windows won't boot at all and X-windows (KDE atleast) keeps hanging. I'm using my laptop to write this), but yes the entry is something like...

I'm just about at my wits end. I have created a GRUB boot floppy, which will boot Fedora without any problems, but thats not really the optimum solution. Another bizzare thing - if I boot from the floppy and choose Fedora first up, it boots fine. If I choose to boot other (windows) first, I get the "...cylinder exceeds max supported by bios" message - if after that I then select Fedora I get the same message! I then have to reboot again and start from the begining if I want to load Fedora ?!?!?

Relax man, it's not that bad. Get yourself a good live CD if you don't already have one. You can boot these from CD and do whatever you need, including looking into your linux and win filesystems, running lilo, grub, etc. even if your HD systems aren't bootable.

I recommend Kanotix and Slax, in that order. There are others.

Wiping MBRs isn't a good idea unless you like installing stuff again and again for no good reason. Just give the guys here the info they need and they will get you fixed up. In the meantime, if you need to boot win and you have a real win installation cd, you can boot into the recovery console (i haven't done this, but it's a standard deal) and trample the boot loader in the MBR. Your linux will become unbootable, but almost anything can be fixed with a live CD.

Usually the only thing wrong is grub/lilo config, and the other installed stuff is just fine. Take your time and understand what you did wrong and how to fix it and this will be a breeze next time. We've all been there :p

stevod333 04-03-2006 05:47 AM

Quote:

Originally Posted by kg4ysy
title=Winders
rootnoverify (hd0,n<--Change this)
chainloader +1
makeactive


n == partition of windows - 1


I've tried this - it helps, but all I get from WinXP is "NTLDR not found" I've tried copying NTLDR (and all other boot files) to the windows partition, and editing boot.ini, but with no added success.

Thinking about trying LILO.

You're right Randux, wiping the MBR seems like a bad thing to do. I can use the boot floppy, and if all else fails, that may be the only option left for me :cry:

If anyone has any further suggestions, I'd be glad to hear them. Either way, I'll post my final results and let you all know how it goes.

kg4ysy 04-03-2006 08:36 AM

It sounds like your windows partition is hidden. Either load knoppix or your own linux partition, and install qtparted. You can use other programs, but qtparted has a nice gui. Have it look at your main hard drive and check to see if hidden is a property of your windows partition. If it is, unhide it. When the windows partition is hidden, it will boot until the boot screen goes away. It then pops up the sorta bluescreen of death and says that it can't find anything. Give this a shot and see if it works.

http://qtparted.sourceforge.net/

Randux 04-04-2006 09:33 AM

Quote:

Originally Posted by stevod333
I've tried this - it helps, but all I get from WinXP is "NTLDR not found" I've tried copying NTLDR (and all other boot files) to the windows partition, and editing boot.ini, but with no added success.

Thinking about trying LILO.

You're right Randux, wiping the MBR seems like a bad thing to do. I can use the boot floppy, and if all else fails, that may be the only option left for me :cry:

If anyone has any further suggestions, I'd be glad to hear them. Either way, I'll post my final results and let you all know how it goes.

Getting an NTLDR not found message is not very good news. I don't know what happened but it sounds like more than a boot problem now. Hopefully, I'm wrong.

If you can boot your Windows from a floppy, then it can't be all bad. Just remember to be careful about updating any filesystem when your boot management isn't working. You can recover almost anything, even a totally wiped MBR, if you don't touch the underlying filesystems (don't ask me how I know!)

If I misunderstood what you wrote, and you can't boot Windows at all, I'd like to know how you're copying in NTLDR and boot.ini files to that partition. You should compare the contents of these files with known good files.

PTrenholme 04-04-2006 08:47 PM

I believe that the "NTLDR not found" message is telling you the the loader is not on the partition you're trying to boot. In other word, try a different number in the rootnoverify (hd0,?) line.

If you're using GRUB, just press an "e" key to edit the boot block, another "e" with the root line highlighted, make the change, press "Enter", and then "b" to try the change boot. (The edit takes place in the core image, not the config file, so any change is temporary.)

In other words, play around 'till something works.

Randux 04-05-2006 04:20 AM

Quote:

Originally Posted by PTrenholme
I believe that the "NTLDR not found" message is telling you the the loader is not on the partition you're trying to boot. In other word, try a different number in the rootnoverify (hd0,?) line.

I like your explanation better. I was thinking he was reporting a message from Win, which would indicate that a lot more was wrong than the MBR...

The PC world (including *NIX) really needs to do a better job with error messages.

stevod333 04-06-2006 04:32 AM

Problem solved...
 
Note to Randux: I was booting from the WinXP install CD and selecting repair mode in order to copy the NTLDR and other boot files.

I have solved the problem by re-partitioning (again) and installing windows at hd0,0. Grub boots both OS's with no problems now. I'm not too happy about it, as within the Windows environment my typical old "C" drive now belongs to windows and "D" is now my general storage drive. I just hope that if (or when) I have to rewrite the ghosted Windows partition of hd0,0 that it doesn't stuff up GRUB.

I still don't understand why it wouldn't work with WinXP installed at hd0,1 (as it worked when I installed Fedora Core 3) but them's the brakes.

Thank you all very much for your help in this issue.

Regards,
Steve.

Randux 04-06-2006 05:26 AM

Glad you got it fixed, thanks for letting us know! Don't worry about Grub, it is supposed to be pretty adaptable. Remember, Win doesn't like sharing the PC, it usually wants to be the 1st (only) thing on the box. Not to say you can't get it to work, next time we can do a little more planning and analysis. It's always better that way than trying to fix something that's broken.


All times are GMT -5. The time now is 04:59 PM.