Solved

Grub Dual Boot Question

Posted on 2002-07-13
6
474 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now