[Techtalk] Re-installing GRUB, dual boot win2k

Hans Tegnerud hans_tegnerud at chello.se
Thu Jun 5 01:37:36 EST 2003


Please correct me if I'm wrong but it seems as if your three different Linux
kernels are configured to boot from your second disk (hdb0, primary slave
first partition) with 'root (hd1,0)' . I might be missing something here but
that shouldn't work when your /boot resides on hdd1.

That aside, W2k is configured to boot from the extended partition on your
first disk with 'rootnoverify (hd0,4)' whereas your W2k install most likey
put the W2k boot loader on hda1.

Also, if the makeactive command follows the same naming conventions as above
it sets hdb as active with 'makeactive 1'.

I would start by trying to change makeactive under WIN2K to 'makeactive 0'.
If that doesn't do the trick try changing rootnoverify just above it to
'rootnoverify (hd0,0).

Personally I would set the bootable flag on hda1 from within fdisk, either
the Linux or the DOS/Win version.


As a side note: Windows relies on the MBR to hold code that find the primary
partition marked with the bootable flag and then load and execute the code
from the first sector of that partition (which for W2k means finding and
executing the NTLDR from the root folder). When the GRUB or LILO is
installed in the MBR it must provide the same functionality (which in the
case of GRUB means setting the GRUB root partition with rootnoverify and
reading and executing the first sector of it with chainloader) if we want to
boot Windows again.

> I've looked at the GRUB documentation, which is very confusing to me
> with a lot of warnings in it.  Is it really as hard as they make it out
> to be?  How can I get GRUB back in the MBR to handle booting to Linux or
> win2k?

This might help:
http://www.gnu.org/manual/grub/html_mono/grub.html#Chain-loading


/Hans



> Here's my partition set up:
> ~~~~~~~
> /dev/hda1 /mnt/Win Windows 2000
> /dev/hda5 /mnt/Win2 Windows 2000
> /dev/hdd1 /boot
> /dev/hdd2 /home
> /dev/hdd5 /
> ~~~~~~~
>
> Here's my grub.conf:
> (yeah I have an extra kernel hanging around, the fallback for the
> current kernel, which I'll get rid of once I can run the newest!)
> ~~~~~~~
> # 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,0)
> #          kernel /vmlinuz-version ro root=/dev/hdd5
> #          initrd /initrd-version.img
> #boot=/dev/hda
> default=0
> timeout=10
> splashimage=(hd1,0)/grub/splash.xpm.gz
> title Red Hat Linux (2.4.20-13.8)
> root (hd1,0)
> kernel /vmlinuz-2.4.20-13.8 ro root=LABEL=/ hdb=ide-scsi
> initrd /initrd-2.4.20-13.8.img
> title Red Hat Linux (2.4.18-27.8.0)
> root (hd1,0)
> kernel /vmlinuz-2.4.18-27.8.0 ro root=LABEL=/ hdb=ide-scsi
> initrd /initrd-2.4.18-27.8.0.img
> title Red Hat Linux (2.4.18-26.8.0)
> root (hd1,0)
> kernel /vmlinuz-2.4.18-26.8.0 ro root=LABEL=/ hdb=ide-scsi
> initrd /initrd-2.4.18-26.8.0.img
> title WIN2K
> rootnoverify (hd0,4)
> makeactive 1
> chainloader +1
> ~~~~~~~



More information about the Techtalk mailing list