Re: XP and Redhat: dual boot problem

From: Frank Betten (
Date: 01/28/04

Date: Wed, 28 Jan 2004 22:46:23 +0100

joydeep roy wrote:

> Thanks for all the information. Very helpful indeed.
> I reinstalled with Redhat linux now running grub this time.
> However was not booting at all - hanging with "GRUB" display.

To install GRUB as bootloader it would have been sufficient to
install the corresponding RPM-package and then to configure/install
I don't know the installation process for RedHat, however, doing a
complete reinstall of Linux, my expectation would have
been that GRUB is installed and configured (to start Linux,
without "knowing" about Windows) automatically.
Does "hanging with GRUB display" mean, that you are in the GRUB shell,
i.e. can you enter something?
Otherwise, I guess the installation of GRUB failed and the "first stage"
in the MBR can not find the Linux partitions.

> After fdisk /mbr command got it back to bootint to XP as before.
> Then rebooting using the boot floppy, linux was brought up again.

This boot floppy, does it use LILO or GRUB? Was it generated during
first (LILO) or second (GRUB) installation?

> The df command was showing:
> File System Mounted on
> /dev/hdb3 /
> /dev/hdb2 /boot

This is in contradiction with "Hard Disk 2 has extended
Partition having 2 logical partitions" from your first posting.
The logical partitions should show up as /dev/hdb5 and /dev/hdb6.
It might be that you created one extended partition hdb1 and two
primary partitions hdb2 and hdb3.

> Ran dd if=/dev/hdb2 of=/boot/bootsec.lin bs=512 count=1
> copied bootsec.ini to C:
> edited boot.ini at C:
> C:\bootsec.lin="linux"
> Now after rebooting, system is giving the choice.
> I can switch to XP or linux from the choice, but when I
> select linux I just get blank screen and it hangs.

Ok, so at least XP "knows" about Linux.;-) I guess the "first stage"
of your bootloader (either LILO or GRUB) was not located in the
boot record of /dev/hdb2, so "bootsec.lin" is more or less an "empty"
To verify, have a look at it with an editor (e.g. Notepad for XP).
With a "normal" editor most symbols will be senseless, but as an
example my bootsector --- I am using GRUB --- contains the string
"GRUB GeomHard DiskRead Error". I would expect something similar
with LILO.
> I may be hitting 1024 cylinder limitation for BIOS.

I would agree, considering your posted error message.

"Warning: device 0x0345 exceeds 1024 cylinder capacity limit
Fatal: Sector 76558647 too large for linear mode ( try 'lba32' instead

But I cannot understand, how your boot floppy works in this case
(assuming you created it with the same LILO configuration).

> My hard disk 1 is 60 G having XP and Harddisk 2 is 80 G.
> The linux partition is at the second partition in hard disk 2.

What is the first partition on harddisk 2? How large is it?
If you have a problem with the 1024 cylinder limitation, it would only
affect LILO.

At this point you should decide, to use either LILO or GRUB.

When we use LILO, you must
   1) Install the RPM-package for LILO (if not done by your
   2) Edit the file /etc/lilo.conf as proposed by Michael C. in
      his posting, to solve the 1024 cylinder issue.
   3) Change the line boot=.... in this file to
      so your "first stage" will be written to this file, everytime you
      run the command "lilo". I forgot to mention this in my first
      posting. Sorry about that.
   4) Rerun lilo -v
   5) Copy the new "bootsec.lin" to your first harddisk, as explained in
      my first posting.

When you prefer to use GRUB, I would try to use the same trick
as with Lilo, to start the bootloader for Linux from XP. (Warning:
Don't know whether this will work at all.)
So for this case the file "bootsec.lin" should be the MBR
generated by a regular installation of GRUB.
I give only a scetch, what to do. When you want to try this
and need more details, post again.
 1) Edit the configuration file for GRUB --- should be something like
    or grub.conf in the directory /boot/grub --- to start Linux.
 2) Install GRUB from the GRUB shell to the MBR of your first harddisk.
    Command should be
     install (hd1,1)/boot/grub/stage1 d (hd0) (hd1,1)/boot/grub/stage2
     p (hd1,1)/boot/grub/<name of grub configuration file>
    everything entered in one line. (Have a look at info grub ;-))
 3) To test the installation: On rebooting you should be able to start
 4) Now copy (in Linux with dd) the "GRUB MBR" from the master boot
    record of harddisk 1 to "bootsec.lin" (in the Linux boot partition)
    and restore the MBR for Windows XP with fdisk /mbr (using a rescue
    for Windows XP?).
    Test: On rebooting XP should come up.
 5) Copy the "bootsec.lin" file to C: , i.e. the first harddisk.

Good luck,


Against software patents (not only) in Europe.
Visit and inform you!

Relevant Pages

  • Re: Grub not installing when Xubuntu installs
    ... it needs a copy of a Linux ... image for such an installation. ... there is no need to reinstall GRUB to ... the MBR or a partition after changes to the configuration file. ...
  • Re: XP and Redhat: dual boot problem
    ... > To install GRUB as bootloader it would have been sufficient to ... > been that GRUB is installed and configured (to start Linux, ... second installation. ... > Partition having 2 logical partitions" from your first posting. ...
  • Re: Fedora Core 5 Installation
    ... I think the first problem appeared when you chose not to let Grub handle the booting. ... do not forget to change "hd0" if your windows installation is not on the frist partition ... I have been using Red Hat Linux for a long while now, ...
  • SuSE 9.1: Problems booting GRUB or LILO
    ... hda3 - Linux swap ... At first I did a "default" installation accepting everything ... A third try with ext2 and LILO works OK for Linux ... (I get the LILO option screen can boot Linux) ...
  • Re: (K)Ubuntu Grup Installationsauswahl
    ... Bei der Installation konnte man keine Angaben dazu machen ob man nun ... Grub überhaupt haben wollte bzw. wo man ihn gerne hin installiert ... Da ich bereits ein anderes Linux installiert habe würde ich Kubuntu ...