Solved

Grub Dual Boot Question

Posted on 2002-07-13
6
490 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…

685 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