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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-13-2005, 11:16 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2005
Distribution: Slackware 10.1 /Gentoo
Posts: 13
Rep:
|
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!!!!
|
|
|
|
07-13-2005, 07:56 PM
|
#2
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,570
|
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.
|
|
|
|
07-13-2005, 08:32 PM
|
#3
|
|
LQ Newbie
Registered: Jan 2005
Distribution: Slackware 10.1 /Gentoo
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
|
07-13-2005, 08:39 PM
|
#4
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,225
|
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;
|
|
|
|
07-13-2005, 09:06 PM
|
#5
|
|
LQ Newbie
Registered: Jan 2005
Distribution: Slackware 10.1 /Gentoo
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
|
07-13-2005, 09:54 PM
|
#6
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,570
|
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.
|
|
|
|
07-13-2005, 10:53 PM
|
#7
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,225
|
Comment out the splash line (put a # in column 1), and try "vga=normal".
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:34 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|