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
Solved

Grub Dual Boot Question

Posted on 2002-07-13
6
488 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

840 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