LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 07-13-2005, 11:16 AM   #1
jonny bravo
LQ Newbie
 
Registered: Jan 2005
Distribution: Slackware 10.1 /Gentoo
Posts: 13

Rep: Reputation: 0
Question need a little info on setting up grub


I am very close to finishing a dual boot windows xp (fat32) and Gentoo stage1 install.
I have 2 hard drive's a 5 gig /dev/hda being windows, and the second a 160 gig set up for Gentoo as follows /dev/hdb1 boot , /dev/hdb2 swap , and /dev/hdb3 root. I would like to overwrite the mbr for grub to boot windows or Gentoo, do I still follow the grub setup as
grub > root (hd0,0)
grub > setup (hd0)
grub > quit

and my configuration as-
default 0
.
timeout 30

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.12-r4

root (hd1,0)
kernel /kernel-2.6.12-gentoo-r4 root=/dev/hda3

title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1

Hopefully I've got this right any help with this or advice would really be apreciated, as I'm very close to setting up grub just waiting on a few last emerges. thanks!!!!
 
Old 07-13-2005, 07:56 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,695

Rep: Reputation: 286Reputation: 286Reputation: 286
Your proposed grub setup won't work. There are several reasons why.

Start with the basics. Grub numbers disks and partitions starting with 0.
hda = 0
hdb = 1
first partition = 0
second partition = 1
third partition = 2

Now. You have Linux root in /dev/hdb3 (grub numbers: hd1,2), and windows in /dev/hda1 (grub numbers: hd0,0); Linux boot in /dev/hdb1 (grub numbers: hd1,0).

quote:
grub > root (hd0,0)
grub > setup (hd0)
grub > quit
endquote:

This won't work because, after grub is installed and you try to boot, grub will look into the windows partition for the grub stages and menu. Change root (hd0,0) to root (hd1,2) to point to the Linux root.

Setup (hd0) is correct if you want grub to write to the MBR and be the bootloader for Linux and windows. The reason for leaving setup at hd0 is that the first hard disk is the master; the second is the slave. The MBR of the master is the one that will be in charge at boot time. Telling grub that the root of the Linux partition is (hd1,2) tell grub where the root of the Linux filesystem is located. Telling grub where to /boot directory is (in the kernel line) tells grub where to find the kernel image to boot.

Splashimage (hd0,0) won't work; the splashimage should be (hd1,2).

The rest seems OK. However, you may have to edit the Linux kernel line to get it to work. Something like: kernel (hd1,0)/kernel-2.6.12-gentoo-r4 (to point grub to the kernel image in /boot).

Last edited by bigrigdriver; 07-13-2005 at 08:01 PM.
 
Old 07-13-2005, 08:32 PM   #3
jonny bravo
LQ Newbie
 
Registered: Jan 2005
Distribution: Slackware 10.1 /Gentoo
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks!!!! Ive never setup a dual boot with Linux when I first started learning I took that leap of faith without a dual boot and just ran Linux, but have since found there are a few programs that I need in Windows that wine does'nt support. Setting up grub on a dual boot on two drives is new.
 
Old 07-13-2005, 08:39 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,801

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Close bigrigdriver - Gentoo generally uses /boot for grub, not the root.
jonny bravo change all (hd1,2)references in bigrigdrivers post to (hd1,0) and you should be right.
With the root(hd1,0), you also don't need the suggested update to the kernel line - but it also won't do any harm. However you will need to update it for the root= keyword to;
Code:
root=/dev/hdb3
 
Old 07-13-2005, 09:06 PM   #5
jonny bravo
LQ Newbie
 
Registered: Jan 2005
Distribution: Slackware 10.1 /Gentoo
Posts: 13

Original Poster
Rep: Reputation: 0
I think I borked it I can get it to boot but no menu listing it's just booting into Gentoo by default from the timeout setting. When it comes up the screen is all obscure. I know from experiance where my login is , I login as root and
then exit and the screen resorts back to normal (legible) I think I may have corrupted something here, but it seems as if Gentoo is ok once I log back in.
 
Old 07-13-2005, 09:54 PM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,695

Rep: Reputation: 286Reputation: 286Reputation: 286
Take another look at the kernel line. You are having graphics probs. You can add a vga= option to boot into a default graphics option.

I have this in my grub menu.lst (SuSE) but it should work for any distro using grub. vga=0x31a (that's zero x 31 a). There are other options if you want to google them up.
 
Old 07-13-2005, 10:53 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,801

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Comment out the splash line (put a # in column 1), and try "vga=normal".
 
  


Reply


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
request for GRUB with RAID devices only info aus9 Linux - Software 15 10-08-2005 11:38 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
Can someone give me grub boot info? alphster Slackware 1 01-05-2005 11:38 AM
Monitor Setting Info JoshSmith41 Linux - Hardware 3 01-07-2004 04:00 PM
Need Info for setting up high availability network Viper Linux - Software 4 08-26-2003 09:31 PM


All times are GMT -5. The time now is 07:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration