Red Hat Topics - GRUB configuration to dual boot Windows XP w/FC3

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > June 2005 > GRUB configuration to dual boot Windows XP w/FC3





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author GRUB configuration to dual boot Windows XP w/FC3
Andrew Falanga

2005-05-05, 8:45 pm

Hi,

I really hope this time this message gets to the group. Anyway, I'm
having difficult getting the right commands in my grub.conf file to
chainload Windoze. I'll provide, below, my grub.conf file. Basically,
the way I have it now results in the boot process simply stopping after
grub dumps the Windows XP section to stdout (or stderr). As you'll see,
I've commented the lines that remap my hard drives. I have my BIOS
setup to use my SATA drive (with Linux) to be drive 1 and my EIDE drive
to be drive 2 (after reading the grub manual, I thought I'd need them).
However, with the map commands, the boot process still hangs and in
addition to dumping the Windows XP section, I see "GRUB" on the screen.
So, what gives? What am I missing? Below is my grub.conf.

Andy

# 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
#boot=/dev/sda1
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-1.667.img

title Windows XP (Home Edition)
# map (hd0) (hd1)
# map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader +1
boot

----== Posted via webservertalk.com - Unlimited-Uncensored-Secure Usenet News==----
http://www.webservertalk.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Kill Bill

2005-05-09, 7:45 am

Andrew Falanga wrote:
> Hi,
>
> I really hope this time this message gets to the group. Anyway, I'm
> having difficult getting the right commands in my grub.conf file to
> chainload Windoze. I'll provide, below, my grub.conf file. Basically,
> the way I have it now results in the boot process simply stopping after
> grub dumps the Windows XP section to stdout (or stderr). As you'll see,
> I've commented the lines that remap my hard drives. I have my BIOS
> setup to use my SATA drive (with Linux) to be drive 1 and my EIDE drive
> to be drive 2 (after reading the grub manual, I thought I'd need them).
> However, with the map commands, the boot process still hangs and in
> addition to dumping the Windows XP section, I see "GRUB" on the screen.
> So, what gives? What am I missing? Below is my grub.conf.
>
> Andy



Are you able to boot to linux? Or you are not able to boot to any of the
OSes?

>
> # 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 (hd0,0)
> # kernel /vmlinuz-version ro root=/dev/sda3
> # initrd /initrd-version.img
> #boot=/dev/sda1
> default=0
> timeout=5
> splashimage=(hd0,0)/grub/splash.xpm.gz
> hiddenmenu
> title Fedora Core (2.6.9-1.667)
> root (hd0,0)
> kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
> initrd /initrd-2.6.9-1.667.img
>
> title Windows XP (Home Edition)
> # map (hd0) (hd1)
> # map (hd1) (hd0)
> rootnoverify (hd1,0)
> chainloader +1
> boot
>


I am not sure if this will help or not but I experienced that the SATA
driver messes up the disk notation. I remember I had to name them as
(E)IDE drives (i.e., /dev/hdaX, etc) in grub.conf but name it as SCSI
disks (i.e., /dev/sdaX) in /etc/fstab. In my case, I didn't have windoze
though. I guess that the SATA drive is recognised as an IDE device by
BIOS and its actual driver is an SCSI one (after initrd is loaded?). By
all means it helps using disk labels. Just that map, root and
rootnoverify commands don't support disk labels.

I also remembering that you may have to modify the file device.map
(change IDE-stype naming to SCSI-stype). For example, change "(hd1)
/dev/hda" to "(hd1) /dev/sda". Not sure if this is relevant since I
don't know if you are able to boot to linux.

Good luck,

KB


> ----== Posted via webservertalk.com - Unlimited-Uncensored-Secure Usenet
> News==----
> http://www.webservertalk.com The #1 Newsgroup Service in the World! 120,000+
> Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption =----


--
NT stands for New Technology. Windowds NT(NT4.x)/2K(NT5.0)/XP(NT5.1)
was built on NT Technology. Anyone understands what "new" means, so
everyone knows M$ Windows NT/2K/XP/Whatever is a *real* innovation.
MrSpiffy

2005-06-11, 5:46 pm

On Mon, 09 May 2005 13:20:45 +0100, Kill Bill wrote:
[vbcol=seagreen]
> Andrew Falanga wrote:
>
>
> Are you able to boot to linux? Or you are not able to boot to any of the
> OSes?
>
>
> I am not sure if this will help or not but I experienced that the SATA
> driver messes up the disk notation. I remember I had to name them as
> (E)IDE drives (i.e., /dev/hdaX, etc) in grub.conf but name it as SCSI
> disks (i.e., /dev/sdaX) in /etc/fstab. In my case, I didn't have windoze
> though. I guess that the SATA drive is recognised as an IDE device by
> BIOS and its actual driver is an SCSI one (after initrd is loaded?). By
> all means it helps using disk labels. Just that map, root and
> rootnoverify commands don't support disk labels.
>
> I also remembering that you may have to modify the file device.map
> (change IDE-stype naming to SCSI-stype). For example, change "(hd1)
> /dev/hda" to "(hd1) /dev/sda". Not sure if this is relevant since I
> don't know if you are able to boot to linux.
>
> Good luck,
>
> KB
>
>

2 things, yes you probably have to swap the drives and you have to maker
t the partition active:

DOS/Windows

GRUB cannot boot DOS or Windows directly, so you must chain-load them (see section Load another boot loader to boot unsupported operating systems). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To
overcome the problems, GRUB provides you with two helper functions.

If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command @command{map} (see section map), like th
is:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)

This performs a virtual swap between your first and second hard drive.

Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.

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 section hide), DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition (see section unhide), DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or W
indows) 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


Dr. Grok

2005-06-11, 8:46 pm

In article <pan.2005.06.11.13.51.36.666283@here.net>, MrSpiffy <me@here.net> wrote:
>On Mon, 09 May 2005 13:20:45 +0100, Kill Bill wrote:
>
>
>2 things, yes you probably have to swap the drives and you have to maker
>t the partition active:
>
>DOS/Windows
>
>GRUB cannot boot DOS or Windows directly, so you must chain-load them (see
> section Load another boot loader to boot unsupported operating systems).
> However, their boot loaders have some critical deficiencies, so it may not
> work to just chain-load them. To overcome the problems, GRUB provides you with
> two helper functions.
>
>If you have installed DOS (or Windows) on a non-first hard disk, you have to
> use the disk swapping technique, because that OS cannot boot from any disks
> but the first one. The workaround used in GRUB is the command @command{map}
> (see section map), like this:
>
>grub> map (hd0) (hd1)
>grub> map (hd1) (hd0)
>
>This performs a virtual swap between your first and second hard drive.
>
>Caution: This is effective only if DOS (or Windows) uses BIOS to access the
> swapped disks. If that OS uses a special driver for the disks, this probably
> won't work.
>
>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 section hide), DOS (or Windows)
> will ignore the partition. If GRUB unhides a DOS (or Windows) partition (see
> section 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
>
>

It is interesting to note that the "hide" and "unhide" functions in Grub are
persistant. That is to say that if you use the sequence of commands above the
(hd0,1) partition stays hidden and (hd0,0) stays unhidden until you
explicitally change them So if you power down and want to again boot from the
first partition you could omit the hide and unhide commands. But you must use
unhide (hd0,1) to even see, let alone boot from the second partition.

Dr. G.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com