LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-30-2004, 11:08 PM   #1
sicone
LQ Newbie
 
Registered: Jan 2004
Posts: 27

Rep: Reputation: 15
Grub help


I need help re-configuring grub ,it wont boot my xp hard drive.It is on a seperate hard drive with fat32 ,I can mount it when I am booted into linux but I cant boot from to it without
unhooking my *nix HD I attempted to edit the grub boot chainloader ...but I didnt know what i was doing soo...any help
 
Old 01-31-2004, 12:30 AM   #2
Breezwell
Member
 
Registered: Apr 2001
Location: Chicago
Distribution: Gentoo 1.4
Posts: 214

Rep: Reputation: 30
Assuming your Linux is the primary master and WinXP is the primary slave, try the following:

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

# Linux Drive
title=Linux
root (hd0,0)
kernel (hd0,0)/boot/bzImage root=/dev/hda3

# Windows
title=Windows XP
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader+1

Make sure that the partition location of your kernel image (bzImage) is specified correctly in in following line:

root/dev/hda3

Also make sure that the name you gave your kernel image is correct. My example shows it to be bzImage, but you can name it anything you like.

This will only work if you make the Linux drive the primary master and Windows the primary slave.
 
Old 01-31-2004, 12:36 AM   #3
sicone
LQ Newbie
 
Registered: Jan 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Do i even need to modify the Linux info it boots with no problem and when I mount windoze in Linux it is hdb1 does that make a differnce ? And can i modify grub from in Linux without having to reboot? thanks
 
Old 01-31-2004, 09:45 AM   #4
Breezwell
Member
 
Registered: Apr 2001
Location: Chicago
Distribution: Gentoo 1.4
Posts: 214

Rep: Reputation: 30
You do not need to modify the Linux portion of GRUB if it is booting Linux properly.

hdb1 is telling you that Windows is on the first partition ( probablly only partition unless you have multiple operating systems on the drive) of the second drive ( secondary master). In your Windows section, the line that reads:

root (hd1,0)

is telling GRUB to look at driver number 2 ( primary slave), partition 1. GRUB uses its own numbering system when dealing with devices starting at 0.

The example I gave you should allow you to boot Windows as long as you follow the primary master and secondary master scheme I described in my first response.


GRUB typically installs itself in /boot/grub/grub.conf
You will need to reboot to make sure it works after editing the file. One of the really nice things about GRUB is that it will allow you to pass options to the actual grub.conf file at boot time if you have any problems. If GRUB fails on a boot attempt, reboot and when presented with your choice of booting options, press 'e' and you should be able to manually control the grub.conf file from a prompt. Make sure and record whatever changes you make to GRUB while doing this so you can permanently change the actuall grub.conf file when you have successfully booted.
 
Old 01-31-2004, 07:57 PM   #5
sicone
LQ Newbie
 
Registered: Jan 2004
Posts: 27

Original Poster
Rep: Reputation: 15
It didnt work this is my grubconf
Code:
 
# 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 (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/hda2
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
	root (hd0,0)
	kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
	initrd /initrd-2.4.20-8.img
#Mshit 
title =Mshit 
root (hd1,0)
map  (hd0)(hd1)
map  (hd1)(hd0)
chainloader +1
 
Old 01-31-2004, 09:01 PM   #6
bhob
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Rep: Reputation: 0
Re: Grub help

Quote:
Originally posted by sicone
I need help re-configuring grub ,it wont boot my xp hard drive.It is on a seperate hard drive with fat32 ,I can mount it when I am booted into linux but I cant boot from to it without
unhooking my *nix HD I attempted to edit the grub boot chainloader ...but I didnt know what i was doing soo...any help
Edit the following file: /boot/grub/menu.lst
and add:

title windows
root (hd1,0)
map (0x81) (0x80)
map (0x80) (0x81)
makeactive
chainloader +1

here is part of mine:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timeout 10
color black/cyan yellow/cyan
i18n (hd0,0)/grub/messages
keytable (hd0,0)/us.klt
altconfigfile (hd0,0)/grub/menu.once
default 3

title gnu/linux
kernel (hd0,0)/vmlinuz root=/dev/hda5 devfs=mount hdd=ide-scsi vga=788


#this is the line that tells grub to boot the 2nd harddrive
# and lie to windows that
#it is the 1st drive

title windows
root (hd1,0)
map (0x81) (0x80)
map (0x80) (0x81)
makeactive
chainloader +1
~~~~~~~~~~~~~~~~~~~~~~~~~~
Make a copy of this file before you modify it (cp menu.lst menu.lst.old)
Also is a good idea to put comments into the file where you made modifications
Grub is actually very easy to use & modify. If you have any boot floppies you made you might want to update your changes to this file also.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting of raw ISO from GRUB/LILO (though preferably GRUB) Orkie Linux - Software 28 12-15-2013 09:37 PM
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM
1st HDD = RH9.0 (grub) ... How do I modify grub when adding 2nd hard disk ? Onyx^ Linux - Software 1 09-05-2003 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:48 PM.

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