Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-06-2004, 05:47 PM   #1
LQ Newbie
Registered: Apr 2004
Location: Italy
Distribution: Debian
Posts: 6

Rep: Reputation: 0
Booting via GRUB from hdb and XP Boot-laoder

Hi guys:
I just installed GRUB and I'm able to boot from floppy.

I have decided to leave disk one untouched with Windows XP.
So I have my kernel on /dev/hdb2 and I can boot fine. Now I want to boot with a copy of the grub boot sector on the disk C:\ via XP boot loader, to get rid of the floppy.
But I get the grub error "Geom Error"

From what I have read the linux boot partition should stay on the same disk of the XP boot loader, but I dont want to shrink my xp disk to do so.

Is there a solution to this that can leave my windows disk unaltered?

thanks in advance
Old 04-06-2004, 05:53 PM   #2
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
you have to configure the /boot/grub/grub.conf file on the linux boot partiton.

my config file looks like
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
title Fedora Core (2.4.22-1.2115.nptl)
root (hd1,0)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.22-1.2115.nptl.img
title Windows
rootnoverify (hd0,0)
chainloader +1
just copy the "title windows" and 2 lines below it section... does that work ?
it workd for windows 2000.

rootnoverify sets the root disk and partiton.
and chainloader makes the boot loader on the root partion (in your case windows XP boot loader) do all the work.
Old 04-06-2004, 06:03 PM   #3
LQ Newbie
Registered: Apr 2004
Location: Italy
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
That I have done.
I have a menu.lst propely placed and working, I mangae to boot both linux and windows from grub when grub starts from the floppy. (Here grub call the Windows boot loader)

What I'm unable to get is: to get windows boot loader (from /hda) call grub on /hdb and grub boot linux on /hdb without using a floppy.

Last edited by amber66; 04-06-2004 at 06:04 PM.
Old 04-06-2004, 07:23 PM   #4
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
why ????

install GRUB on the linux hard drive (and linux hard drives MBR)
go into your bios, and set the bios to boot your Linux hard drive,
then let the GRUB on linux decide wether to boot windows or linux.
Old 04-06-2004, 09:50 PM   #5
LQ Newbie
Registered: Apr 2004
Distribution: Fedora Core
Posts: 1

Rep: Reputation: 0
Hi amber66, I am also trying to do something similar to you and I found this webpage, perhaps it may be of help.

The big and small of it is that your are going to be in linux and make a linux.bin file with info on where grub is, for booting. You'll save the file to a disk and reboot back to windows. Then you save the file to the windows drive and edit windows boot.ini to point to the linux.bin for loading linux.

When you next start your computer it should go into the Windows bootloader and give you a choice between booting to Windows and booting to Linux. This leaves the Windows bootloader as your main bootloader and since Windows can be picky about being "on top" this appears to be a good thing.
Old 04-07-2004, 05:09 AM   #6
LQ Newbie
Registered: Apr 2004
Location: Italy
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Ok I fixed it!
I know that page and extended that procedure.
I found an obscure option of grub install, that can be used only in the shell.

Instead of using the grub-install I use the install command inside the grub shell.
Essentially after setting the root in the grub shell one issues a command
like (assume you have you stuff in /boot/grub and /hda1 for windows and
/hdb1 for /boot):
root (hd1,0)
install /boot/grub/Stage1 d (hd1,0) /boot/grub/Stage2
this performs an install similar to the grub-install /dev/hda2 described in the howto (but pointing to /dev/hdb1 in this case).

Later the same command used there:
dd if=/dev/hdb1 of=/osshare/linux.bin bs=512 count=1
will produce a working boot sector that allows the NT Loader to boot from the second hard drive.

The key point behind this is the "d" letter in the statement "install" one
issues in the grub shell (and one cannot obtain the same from the command line).

The idea is that if you issue such command, the "path" to the Stage2 file of
the loader is considered absolute instead normally it is relative.
It is like adding a $ in a preadsheet formula, or / in front of a path!

The boot of grub nomally fails because it looks for the Stage2 file in the
same physical disk. With the new procedure it looks for it with an absolute path, i.e. in the second disk!

It took me a while to figure it out because it is documented in a hidden
subpage of grub documentation, that is even a bit hard to read the first

The result is: you don't need to repartition the first disk!

Last edited by amber66; 04-07-2004 at 05:20 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting more than one linux - GRUB and \boot partition questions rozoweskarpetki Linux - Newbie 8 05-25-2005 06:58 AM
machine doesn't boot now ... just GRUB in upper left; installed redhat9 on hdb ppayton Red Hat 2 11-19-2004 02:43 AM
How to boot win98 in /dev/hdb win GRUB shifo Linux - Software 1 03-02-2004 11:06 AM
Problems booting with GRUB on RH 7.3/ Win XP Dual Boot pasta4u2 Linux - Newbie 8 10-07-2002 11:22 PM
Trouble booting Red Hat 7.2 from hdb Chuk Linux - Newbie 10 10-02-2002 11:49 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration