PDA

View Full Version : GRUB won't boot to Windows



dudess_on_a_mish
29-05-2004, 10:51 PM
Have done a clean install of Fedora Core 2 but GRUB will now not boot into Windows which is set as the default. It stops and goes no further when it gets to the following:

title Other
rootnoverify (hd0,0)
chainloader +1

I have no idea what the GRUB file used to look like when I had Fedora Core 1 so can someone please tell me what I need to do to get back into Windows?

GRUB file:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,4)
# kernel /vmlinuz-version ro root=/dev/hdb6
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd1,4)/grub/splash.xpm.gz
password --md5 $1$YLHQ.DA9$T3yXbOEVkcbTpi0Ip/HoB.
title Fedora Core (2.6.5-1.358)
root (hd1,4)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img
title Other
rootnoverify (hd0,0)
chainloader +1


NOTE: Fedora is installed on my second hard drive as follows:
/dev/hdb4
/dev/hdb5 /boot
/dev/hdb6
/dev/hdb7 swap

Windows is on hda1.

Jen C
30-05-2004, 08:36 AM
Hi dudess

Your grub.conf looks correct. There has been a few threads on non-booting Window partitions with Grub, and this one here (http://pressf1.pcworld.co.nz/thread.jsp?forum=1&thread=43990&message=240871&q=chainloader#240871) suggests that you should check to make sure your XP OS partition is still set to active. Perhaps make sure that is still correct first.

You can edit your grub.conf if you like so that the title reads something a bit more useful than "Other": :)
title Other <--------
rootnoverify (hd0,0)
chainloader +1

reads:
title Windows XP

Chilling_Silence
30-05-2004, 12:21 PM
If Windows XP isnt booting, Im going to question where its actually installed.

Is it your First HDD (Primary Master)? Is it the first partition?

(hd0,0) basically means "On the first Hard Drive you can find, its the first partition", so that's where its looking for WinXP. If its on the 2nd partition on your Primary Master, then it'd be (hd0,1).

Make sense?

Hope this helps


Chill.

agent
30-05-2004, 04:46 PM
Unless my short-term memory is stuffed, dudess said that /boot is on hdb, and Windows is on hda.

From painful personal experiences, I can tell you straight: GRUB needs to be installed in the MBR of your first harddrive (hda). This does not necessarily mean moving the partition where /boot is located to hda, but GRUB does need to be moved, and this will require your configuration file to be updated in order to reflect this change.

It took C_S quite some time to convince me that I wouldn't be able to boot Windows otherwise, but now it works, since I've done that change.

dudess_on_a_mish
30-05-2004, 05:19 PM
OK, well I've read through the thread that Jen pointed me to (thanks Jen - I had copied and pasted all that into you-know-what but it wasn't much help to me from here.... :p) but I have no idea how to check, let alone make Windows the active partition from within Linux. I thought that it was, but....

I really don't want to have to do what ChiefNZ did and reinstall Windows, it has been a big enough mission getting to this stage and Windows is required rather urgently tomorrow.

Graham's suggestion doesn't make much sense to me - what would I do with "man grub" or Linux fdisk? No way am I typing commands willy nilly without knowing how to get out of any trouble I get myself into. :D

Chill>
Two hard drives, as previously mentioned.
Windows XP installed on first hard drive - primary master
Fedora installed on second hard drive - primary slave

It looks like GRUB is correct but something is obviously wrong.

Agent>
If that is my problem some instructions would be good. :-)


Sorry if I'm not spending much time helping myself on this but I've had a rather physical kind of day which was probably not a good idea with the wretched lurgy I have. It was worth it though. ;-)

mark.p
30-05-2004, 05:20 PM
> Unless my short-term memory is stuffed, dudess said
> that /boot is on hdb, and Windows is on
> hda.
>
> From painful personal experiences, I can tell you
> straight: GRUB needs to be installed in the MBR of
> your first harddrive (hda). This does not necessarily
> mean moving the partition where /boot is located to
> hda, but GRUB does need to be moved, and this will
> require your configuration file to be updated in
> order to reflect this change.
>
> It took C_S quite some time to convince me that I
> wouldn't be able to boot Windows otherwise, but now
> it works, since I've done that change.

I've got grub on hdc1 and is called up by a third party bootmanager(XOSL) on hda1. Grub boots Linux or Win9x just fine from there.

Jen C
30-05-2004, 05:37 PM
>Windows is required rather urgently tomorrow.

Hi Dudess

If push comes to shove, and you don't have this sorted by tomorrow you may need to restore XP's MBR using the fixmbr option on the XP recovery console as a last resort.

BUT, before you do this, grab a spare floppy and put it in the FDD. Open up a console window and su - to root. Enter in:

[root@myth root]# uname -r [enter]
2.6.5-1.358
2.6.5-1.358 <--- this is your running kernel

Next enter in this:

[root@myth root]# mkbootdisk 2.6.5-1.358 [enter]
Insert a disk in /dev/fd0. Any information on the disk will be lost.
Press <Enter> to continue or ^C to abort:
20+0 records in
20+0 records out
[root@myth root]#

This will make a boot disk which you can get into Linux with after repairing the MBR. Fedora Core 2 also has the rescue disc which I assume will serve the same function. Best have the boot floppy just in case as well.

All all this, you will need to fix the grub.conf and reinstall it to the MBR so that you can boot normally back into Linux. :)

dudess_on_a_mish
30-05-2004, 05:55 PM
Thanks Jen, I'll do that now.

I did/do have another way to get back into Windows but since it meant radical surgery I didn't really want to have to do it that way. Your way is much kinder. :D

Jen C
30-05-2004, 05:58 PM
>what would I do with "man grub" or Linux fdisk?

man grub is a command that will bring up the manual on grub. Use page down/up to move up the down the page (pretty self explanatory that part :p). Enter q for quit to exit. I had a quick look at man grub, and I don't think it will help you at this stage .... apart from this switch option --no-curses
do not use curses
This may be too late for this option ... ;\
Try info grub instead ... use the arrow to select the topic on the index and enter to display it.

In general, man [application_name] will bring up the manual if there is one available.

You can also enter in [as root] fdisk -l which will show your current partitioning info and the * should mark the active partition (if it works like doze fdisk).

dudess_on_a_mish
30-05-2004, 06:06 PM
Yep, I have been looking in the "man" pages.... figured out what "man" was after making that post, duh! Did I mention that I wasn't thinking straight? :p :D

Anyway, as you said, the man pages don't hold anything useful for me and neither does Google so far. :-(

Have had a quick look through info grub but I'm not sure that is any help either.

Now the fdisk thing - does this make any sense?


Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 20321 10241406 c W95 FAT32 (LBA)
/dev/hda2 20321 155040 67898722+ f W95 Ext'd (LBA)
/dev/hda5 20321 65025 22531131 b W95 FAT32
/dev/hda6 65026 109730 22531131 b W95 FAT32
/dev/hda7 109730 155040 22836366 b W95 FAT32

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 20337 65041 22531162+ c W95 FAT32 (LBA)
/dev/hdb2 65041 109746 22531162+ c W95 FAT32 (LBA)
/dev/hdb3 109746 155056 22836397+ c W95 FAT32 (LBA)
/dev/hdb4 1 20336 10249312+ 5 Extended
/dev/hdb5 * 1 203 102249 83 Linux
/dev/hdb6 204 18256 9098680+ 83 Linux
/dev/hdb7 18257 20336 1048288+ 82 Linux swap

Partition table entries are not in disk order
[root@localhost root]#

agent
30-05-2004, 10:56 PM
I'm not sure about booting Windows 9x from GRUB, but to boot XP, I am adamant that GRUB must be on the same harddisk as the XP installation, so presumably this would apply for NT/2000 as well. Anyone can correct me if they know better, but I went through a number of GRUB entries to try and boot XP more than a few times - and none of them worked when GRUB was not on the same harddrive as XP.

Dudess, if you have Windows XP (or NT or 2000), you'll need to run the installation process of Fedora and choose to install the boot loader in the MBR of hda. I'm not sure if this would be plain old /dev/hda, but it could be listed as /dev/discs/disc0/disc. This may or may not actually mean a full reinstall of Fedora - I'm not sure about Fedora, but with the distro I've tried, you can skip right to the boot loader stage.

Your grub.conf file (or similar, naming may vary) will need to be updated - since the bootloader is running off hda, it will now detect this as hd0, and your second harddrive as hd1 - it should be a simple matter of switching these around.

agent
30-05-2004, 11:04 PM
Looking at your original posting, it would appear that GRUB is already installed on the first harddrive - it references to the Windows partition as (hd0,0).

If it's not, then I don't know how you can even boot Fedora correctly.

You could try adding the line:
makeactive

between rootnoverify (hd0,0) and chainloader +1.

Another thing to check out is whether the partition that Windows is installed on is marked bootable, which can be done via the partitioning program in some Linux installations. Again, since I don't use Fedora, I'm not sure if it's partitioner can do this.

Jen C
31-05-2004, 10:23 PM
Information update! ... might be a bit late now though.

There is apparently a bug with dual booting Windows XP and Fedora Core 2 that has been discovered. The hard disk geometry in the partition tables are incorrectly reported which results in XP being non-bootable. I think this is what has happened to you.

This will happen again if you reinstall Fedora, but there is a work-around for this issue.

More information here and work-around (http://lwn.net/Articles/86835/)

Additional information from the fedora-test-list (http://www.redhat.com/archives/fedora-test-list/2004-May/msg02114.html)

Bit of a major oopsie.

Mzee
06-06-2004, 02:01 AM
Firstly, I havn't had much luck with "Grub" but found "Lilo" to be trouble free.
Place the loader on the linux partition, and use a 3rd party boot manager, I use "Boot Magic" to handle it.

Chilling_Silence
06-06-2004, 08:15 AM
Really?

Ive never been able to get Lilo to do what I want.
Grub works fine every time for me (Bar when myself and Cyberchuck attempted to replace Lilo on Slackware - That was interesting).

Ive used Xosl and that was good for booting Windows, but I didnt really have enough time back when I trialled it to really play around. Personally I'd still rather Grub over xosl :-)

..Just my two cents worth