Solved

Grub Dual Boot Question

Posted on 2002-07-13
6
493 Views
Last Modified: 2013-12-15
I just worked through the following process. I actually got something to work that I did not expect.

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=linuxsetup&qid=20309575

I was booting with grub into either win2k or rh7.3. I am now booting with the win2k boot manager into either win2k or rh7.3
The current boot boot.ini screen looks the same a a normal boot.ini but it has an extra line
C:\ = "RedHat 7.3"
Booting on that option takes me to grub which then boots RH.
What I want to know is what is the mechanisim that makes this work? Is there a 1st stage grub? Exactly what file is in the being pointed to in C:\

This is my partition structure.

Disk /dev/hda: 240 heads, 63 sectors, 776 cylinders
Units = cylinders of 15120 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1         2     15088+  a0  IBM Thinkpad hibernation
/dev/hda2   *         3       408   3069360    b  Win95 FAT32
/dev/hda3           409       758   2646000   83  Linux
/dev/hda4           759       776    136080    5  Extended
/dev/hda5           759       775    128488+  82  Linux swap

This is grub.conf
# 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,2)
#          kernel /boot/vmlinuz-version ro root=/dev/hda3
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default 0
timeout 3
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
title Red Hat Linux 7.3 (2.4.18-3)
     root (hd0,2)
     kernel /boot/vmlinuz-2.4.18-3 ro root=/dev/hda3
# title Windows 2000
#     rootnoverify (hd0,1)
#     chainloader +1


This is what i did to the best of my memory.
I used the superrescue disk to book and access the network etc.
Used dump to save hda3
Deleted hda3 with fdisk.
Noticed that win2k would not boot. No second stage grub any more.
Used console mode of win2k recovery console and ran one command either fixmbr or fixboot, don't remember which. Windows boots
Rebooted with superrescue and created hda3 again and restored with restore.
Ran grub-install
Now rh boots but windows does not.
Ran win2k recovery console and ran both command fixmbr and fixboot. Still boots with grub and windows does not boot.
Ran win2k recovey selected the option to recover manually selected.
Now win2k has two boot options one win2k one unknown OS.
Unknow OS runs the old grub rh works
I edited boot.ini to make it pretty and edit grub.conif to kill the broken windows load.

What is going on here. I like it that it works but I do not understand. I expected withdows fix options to completely destroy grub. I expected grub to see the windows boot and configure properly.
This line rootnoverify (hd0,1)I tried every number from 0 to 5 but could not get grub to boot windows.











 
Folloed











0
Comment
Question by:davidpm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:davidpm
ID: 7151950
This is the section i used to boot windows from grub origially.

 title Windows 2000
     rootnoverify (hd0,1)
     chainloader +1

I just read the docs it seems as though it needs a 4th line
boot
Yes?
Is that possibly all it was.

Still what file is ntloader using in c:\ to call grub.
0
 

Author Comment

by:davidpm
ID: 7152615
I changed:
title Windows 2000
    rootnoverify (hd0,1)
    chainloader +1

to:

title Windows 2000
    rootnoverify (hd0,1)
    chainloader +1
    boot

I was thinking that ntloader would give me two options, win2k an linux. I picked linux. grub gives me two options I pick win2k but with or without the boot line it just redisplays the grub menu.
0
 
LVL 3

Expert Comment

by:iharding
ID: 7152809
You installed grub on the begenning of the hibernation partition.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:davidpm
ID: 7153097
>>>
You installed grub on the begenning of the hibernation partition.
<<<

What does this mean?
0
 

Author Comment

by:davidpm
ID: 7153100
The way I understand it grub starts at 0.
Another interesting thing is that this is an HP notebook.
0
 
LVL 3

Accepted Solution

by:
iharding earned 50 total points
ID: 7153198
You can install grub anywhere you so desire.  The first thing that gets booted is off the MBR(master boot record).  If you install grub here, then it will be initialized before anything else(even the NT loader).

If the NT loader is installed in the MBR, then it will show first.

Grub looks like it is installed in the first partition of your hard drive.  This would be in the first sectors of the partition, and when that partition is given the boot command, grub would load and show the config screen.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question