LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   6 OS Boot Issue (https://www.linuxquestions.org/questions/linux-newbie-8/6-os-boot-issue-511697/)

njellis 12-18-2006 03:30 PM

6 OS Boot Issue
 
I obviously am a linux newb. I have used it here and there, and work with computers reguarly - although that's typically always windows-based systems.

I'm trying to setup a test/learning system with the following:
Windows 98
Windows 2000
Windows XP
Windows 2K3 Server
Windows Vista

...and Fedora (Core 6)

Everything I had working fine up to Vista. I could boot into any OS without trouble. Once I installed Fedora6 w/ Grub I discovered I could no longer boot to any of the windows systems.

Problem: What happens is if I select any of the Windows OSes the system hangs at "Chainloader +1" and does nothing else.

My setup: P3800Mhz
1. 120GB HD IDE (nothing complex, no dual drives, SATA or anything like that.) That is set to LBA mode.

grub.conf looks like:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,9)
# kernel /boot/vmlinuz-version ro root=/dev/hda10
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,9)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,9)
kernel /boot/vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-1.2798.fc6.img
title Win-Vista
rootnoverify (hd0,8)
chainloader +1
title Win2003-AS
rootnoverify (hd0,7)
chainloader +1
title WinXP
rootnoverify (hd0,6)
chainloader +1
title Win2000
rootnoverify (hd0,5)
chainloader +1
title Win98
rootnoverify (hd0,4)
chainloader +1





I have tried reading around some. I though I had found the answer from the Grub 0.97 Manual which says:

"Another problem arises if you installed more than one set of DOS/Windows onto one disk, because they could be confused if there are more than one primary partitions for DOS/Windows. Certainly you should avoid doing this, but there is a solution if you do want to do so. Use the partition hiding/unhiding technique.

If GRUB hides a DOS (or Windows) partition (see hide), DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition (see unhide), DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition, do the following:

grub> unhide (hd0,0)
grub> hide (hd0,1)
grub> rootnoverify (hd0,0)
grub> chainloader +1
grub> makeactive
grub> boot
"




Finding that I tried to load Vista with:


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,9)
# kernel /boot/vmlinuz-version ro root=/dev/hda10
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,9)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,9)
kernel /boot/vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-1.2798.fc6.img
title Win-Vista
unhide (hd0,8)
hide (hd0,4)
hide (hd0,5)
hide (hd0,6)
hide (hd0,7)
rootnoverify (hd0,8)
chainloader +1

title Win2003-AS
rootnoverify (hd0,7)
chainloader +1
title WinXP
rootnoverify (hd0,6)
chainloader +1
title Win2000
rootnoverify (hd0,5)
chainloader +1
title Win98
rootnoverify (hd0,4)
chainloader +1



Unfortunately me trying to hide the other partitions didn't work.

Any help would be greatly appreciated.

Thanks :)

bigrigdriver 12-18-2006 09:19 PM

Windows is picky. If windows is not in the first partition of the first drive, it will refuse to boot. So, the technique to fool windows into seeing itself in the first partition/drive is to use the map lines, like so:

title windows
root (hd0,7)
map (hd0,7) (hd0,0)
map (hd0,0) (hd0,7)
makeactive
chainloader +1

Make one such entry in your grub.conf for each version of windows, changing the root and partition numbers to reflect the locations of windows, except if there is windows in hd0,0, then just the title, root, makeactive, and chainloader lines should be sufficient.

See the Grub manual for more discussion on the topic.

Oops! My bad. Forgot to mention. When you installed Fedora, you probably elected to install grub to the MBR, which overwrote windows ntldr. I'm suprised that Fedora did not write the grub.conf file correctly to allow continued booting of windows.

Be advised that, in future, when you re-instal windows, it will overwrite the MBR with ntldr, and grub will no longer function until you reinstall grub. A misnomer actually, it will still be installed in Fedora, you will just have to write the first stage to the MBR.

A good idea once you have grub and windows booting again, is to make a backup copy of the MBR (using the dd command; you can search these boards for discussion on that subject). Then restoring the MBR will be as easy as booting a liveCd or install Cd, and dd the copy back to the MBR. One command to fix it; otherwise, two or three commands to fix it. Your choice.


All times are GMT -5. The time now is 01:26 PM.