Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Grub Dual Boot Question

Posted on 2002-07-13
6
Medium Priority
?
519 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 200 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

636 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