LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-31-2002, 09:41 PM   #1
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Rep: Reputation: 30
Help me w/ Grub on Gentoo


This is my fiirst time configuring grub and I really hate it. I am at the grub configuration part of the Gentoo install and I am supposed to run grub, then type at the command prompt root (hd0,0) which designates my MBR of course. After doing that I receive no errors but the statement "Filesystem type unknown, partition type 0x7" After that I am supposed to type setup (hd0). Then I get "Error 17: Cannot mount selected partition" WTF? Is is because I'm dual booting and have XP on hd0 and Gentoo on hd1?
 
Old 05-31-2002, 09:48 PM   #2
sewer_monkey
Member
 
Registered: May 2002
Location: Toronto, ON, Canada
Distribution: Ubuntu, Debian, RedHat/CentOS
Posts: 624

Rep: Reputation: 31
Can you post:
  1. Your current grub config file?
  2. Your partition setup?
If you do, it'll help a lot. Thanx!
 
Old 06-01-2002, 05:33 AM   #3
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
root (hd0,0) is supposed to tell grub where it can find its loader programs stage1 and stage2. In this case, the error message is telling you it's the wrong partition. The stage1 and stage2 programs are located in the /boot/grub folder. Which partition has the /boot/grub folder? Do you have a separate /boot partition? BTW, (hd0,0) means hda1.

The setup (hd0) tells where to install grub. In this case, it's being put in the mbr of /dev/hda.
 
Old 06-02-2002, 03:18 PM   #4
IceNineJon
Member
 
Registered: Jun 2002
Location: Los Angeles, Ca, USA
Distribution: Mandrake 9.1
Posts: 82

Rep: Reputation: 15
I don't know if this will help but make sure you're running as root when you're installing GRUB. If you aren't, you'll get errors about not being able to write to devices, etc.
 
Old 06-02-2002, 04:48 PM   #5
pbharris
Member
 
Registered: Apr 2001
Location: chicago, IL
Distribution: debian, redhat
Posts: 280

Rep: Reputation: 30
hello,
try grub-install --root-directory=/boot/grub /dev/hda
 
Old 06-29-2002, 03:06 PM   #6
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Setup

I have 2 hard disks. 1st one is WinXP and 2nd is reserved for Gentoo. Linux partitions are 1 partition is /boot, 2nd is swap, 3rd is /. I really am getting frustrated w/ Grub. I would think that I need to run Grub, then run the command setup (hd0,0) so I can install Grub on the MBR of hd0. I do so and get "Error 12: invalid device requested" This:grub-install --root-directory=/boot/grub /dev/hda did not work. All I need is to install a fscking bootloader and I'd be enjoying freedom from RPM hell.
 
Old 06-29-2002, 03:10 PM   #7
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Tried running root (hd0) Got "Filesystem type unknown, partition type 0x7" Then tried running "setup (hd0)" Got "Error 17: Cannot mount selected partition" Did I mention I hate Grub?
 
Old 06-29-2002, 04:05 PM   #8
Dunkalis
Member
 
Registered: Jun 2002
Distribution: Debian Woody
Posts: 30

Rep: Reputation: 15
GRUB is so much better than LILO. Here we go:

Here's an example:

grub>root (hd0,0)
grub>setup (hd0)
grub>quit

I believe thats it. Then, just set up your menu config. They go something like this:

#default OS
default 0
#timeout before booting default
timeout 30

#make sure you put the xpm in there
splashimage=(hd1,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (hd1,0)
kernel /boot/bzImage root=/dev/hdb3

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

This config is from the Gentoo Linux documentation. I just customized it for your setup.
 
Old 06-29-2002, 04:17 PM   #9
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Running "setup (hd0)" produced Error 17:Cannot mount selected partition. I really want this to work and I appreciate all fo the help I'm getting
 
Old 06-29-2002, 04:21 PM   #10
Dunkalis
Member
 
Registered: Jun 2002
Distribution: Debian Woody
Posts: 30

Rep: Reputation: 15
Give us the EXACT commands you are typing in. That'll help.
 
Old 06-29-2002, 04:32 PM   #11
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
#grub
grub> root (hd0,0)
Filesystem type unknown, partition type 0x7
grub>setup (hd0)
Error 17: Cannot mount selected partition
 
Old 06-29-2002, 04:35 PM   #12
Dunkalis
Member
 
Registered: Jun 2002
Distribution: Debian Woody
Posts: 30

Rep: Reputation: 15
What did you format your partitions with. I'm assuming you used NTFS for your XP, but what did you use in Linux?
 
Old 06-29-2002, 04:44 PM   #13
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
The partitions are EXT3, leftover from a Redhat 7.3 install
 
Old 06-30-2002, 01:28 AM   #14
burzmali
Member
 
Registered: Jan 2002
Distribution: gentoo
Posts: 68

Rep: Reputation: 15
if gentoo is on the 2nd drive here is what you should type:

grub> root (hd1,0)
grup> setup (hd0)
grub> quit

root (hd1,0) means "my boot partition is the first one on my second drive"
setup (hd0) means "install the boot record on the MBR of the first drive"

try that and see if it works
 
Old 06-30-2002, 06:52 PM   #15
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=My example Gentoo Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/hda3

# Below needed only for people who dual-boot
title=Windows NT Workstation
root (hd0,5)
chainloader +1

I'm guessing I need to modify this to show where the location of the splahimage is which would be (hd1,0) right? My XP partition would be (hd0,1) right?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo... grub problems... "/boot/grub/stage1" exists... no halo14 Gentoo 5 02-06-2011 04:50 PM
gentoo : grub: The file /boot/boot/grub/stage1 not read correctly Boudewijn Linux - Software 3 05-21-2008 03:13 AM
grub on gentoo need help chiatello Linux - General 1 07-27-2003 02:30 PM
Grub and Gentoo CheeseManD Linux - Newbie 2 04-27-2003 12:48 PM
Gentoo and Grub Arleta Linux - Newbie 1 01-06-2003 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 AM.

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