Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
newbie posting - could use some help with grub
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
robc
n00b
n00b


Joined: 06 Aug 2002
Posts: 3

PostPosted: Tue Aug 06, 2002 2:10 pm    Post subject: newbie posting - could use some help with grub Reply with quote

I was given a copy of gentoo by a friend and I've been working for the past few days to get it running. I've followed the gentoo install documents I pulled off the gentoo.org site and after getting everything setup I thought I was in the clear. However, when I try to boot the system I just get the words "GRUB GRUB GRUB GRUB" all the way across the screen from top to bottom and the hard drive is going nuts. I have no idea what's going on and neither does the guy who gave me the copy of gentoo. Here's some info about the system and how I've been working on it.

AMD 1400 Mhz Athlon, 256 MB RAM, 2 HDD's (one 40 GB with Windows 98 SE - Master on IDE1), and one 27 GB with Gentoo (Slave on IDE1). When I set up the slave drive (27 GB) using fdisk it came up as hdb, so in /etc/fstab I have listed /hdb1 as the boot (ext2), /hdb5 as the swap (swap), and /hdb6 as the root (ext3). When I setup grub's menu.lst, I have root as hd1,0 and I also setup grub on hd1,0 (boot partition of hdb).

Now when I want to attempt to boot the slave drive I do have to swap them in the bios to tell it to boot from that drive instead of the master. Otherwise it just boots into Win98SE. But, when I swap them all I get is the GRUB GRUB GRUB lines that fill up my screen. I have no clue what's going on. BTW, I have not remapped hd1 as hd0 and vice-versa. I didn't think I'd have to do that since hd0 is the win98 drive and hd1 is the gentoo drive. Does swapping them in the bios of which to boot to make grub think that the slave drive is now hd0 instead of hd1, even though according to the ide controller it's still the slave?

Any help would be appreciated as I'd love to get this working, but I'm just getting frustrated with it. If you need more info just ask and if I can't remember what I put for certain values I'll let you know this evening.
_________________
- Rob
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Tue Aug 06, 2002 2:28 pm    Post subject: Reply with quote

I think you hit the nail on the head already. I have seen this strange behavior on one of my systems. Grub is really quite freaky about hard drive numbers. I have an Abit BE6-II which has an additional IDE controller from HighPoint and had my large disk (10GB) on the Highpoint controller and had a small (1.2GB) disk on my onboard intel 440BX controller. Turns out the small 1.2GB drive died, so since I had nothing for Gentoo on it anyway, I yanked it. Long story short the way Grub counts drives (hd1 vs. hd0) is not anywhere near how you address them in linux (/dev/hdxx). So I am sure that for whatever bizarre reason Grub is now considering your slave drive to be hd0 since the BIOS is booting directly to it. I would simply install Grub on your MBR on your master drive. I have done this many times and it will not hurt your existing OS (Win98SE)--if at some point you remove Gentoo and you need to clean out your MBR to boot into Windows98 without grub you will need to use a Win98 boot disk and fdisk the mbr. If you were using WinNT or Win2000/XP you could use this thread to get you going, maybe still worth a read anyway though.

Good luck!

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
robc
n00b
n00b


Joined: 06 Aug 2002
Posts: 3

PostPosted: Tue Aug 06, 2002 2:38 pm    Post subject: Reply with quote

Could I just do the map (hd0) (hd1) map (hd1) (hd0) lines in the menu.lst file to do the same? I'm not real comfortable with hacking on the MBR of the Windows drive yet (call me gunshy, but I'm not a linux convert - yet).

If I can't get that to work, (and I get a little more brave about hacking up the MBR of the windows drive), how do I go about loading grub on there? I thought it was only a Linux thing. I can't run "emerge grub" from a DOS prompt as it would have no clue what to do. I've tried finding downloads for GRUB on the web and all it's been listing is downloads of redhat or other Linux OS, but nothing with just grub binaries or installation files.
_________________
- Rob
Back to top
View user's profile Send private message
mwahl
n00b
n00b


Joined: 04 Aug 2002
Posts: 35

PostPosted: Tue Aug 06, 2002 3:13 pm    Post subject: Reply with quote

GRUB also caused me some problems.
Just a warning - the map feature of GRUB isn't working in some configurations. I have 2 IDE drives and 1 SCSI drive with the BIOS booting from the first IDE drive. Win9x is sitting on the SCSI disk and therefore I had to exchange hd0 with hd2, but I couldn't persuade GRUB to handle it.

Tried Lilo and everything worked fine...

Check some of the GRUB HOWTOs, I remember reading something about a screen full of GRUBs. It's an error code ...
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Tue Aug 06, 2002 3:25 pm    Post subject: Reply with quote

If you do want to try and install grub into the MBR of your Win98SE disk simply follow the directions outlined in the Build Document you used earlier but this time specify HD0 instead of HD1.

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
robc
n00b
n00b


Joined: 06 Aug 2002
Posts: 3

PostPosted: Tue Aug 06, 2002 3:48 pm    Post subject: Reply with quote

It won't have any trouble writing to a FAT32 partition? Or does that not matter?

Sorry if this is a stupid question, but like I said at the beginning - I'm new at this.
_________________
- Rob
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Tue Aug 06, 2002 4:20 pm    Post subject: Reply with quote

The MBR is a "special" zone on your hard disk that is not really a part of the partition table, therefore it is not a fat32 file system. You will have no problems installing it there from Linux. You might want to go to webopedia or something similar and read up on the MBR.

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
michaelb
l33t
l33t


Joined: 06 Jun 2002
Posts: 686
Location: Ann Arbor, MI

PostPosted: Tue Aug 06, 2002 4:26 pm    Post subject: Reply with quote

Grub won't be writing anything to a FAT32 partition. This is explanation is *way* oversimplified, but I think it will help clear up your confusion. When you boot up a computer, the first thing the BIOS does is look for information at the very beginning of the disk to find out where to go to load an OS into memory. When you install, say, Windows on a hard disk, it writes a little piece of very simple code on the first track of the disk telling the BIOS where it lives and how to load it. Very unfriendly to other OS's that happen to share that disk. What GRUB does, and LILO for that matter, is overwrite that code with a little pointer so some more code that gives the end user a choice of what OS to load. I have no problems with my dual boot system using GRUB to choose between Gentoo and Win2000 pro. If you do have a problem tho, and can't boot anything, it's very easy to fix. Get yourself a Win9x boot disk (they're everywhere, just google if you don't already have one) and boot from it. Then:
Code:
A:\ fdisk /mbr

This will rebuild the master boot record (that first little area on the disk) with the windows version.

Hope this helps,
Michael
Back to top
View user's profile Send private message
Greven60
Guest





PostPosted: Tue Aug 06, 2002 5:06 pm    Post subject: Reply with quote

How would I use Lilo.... Grub hates me.
Back to top
michaelb
l33t
l33t


Joined: 06 Jun 2002
Posts: 686
Location: Ann Arbor, MI

PostPosted: Tue Aug 06, 2002 5:25 pm    Post subject: Reply with quote

Well, what exactly are you doing to GRUB to make it hate you? I find GRUB to be an improvement over LILO, myself, but if you want to give something else a shot, your first order of business would be:
Code:
# emerge sys-apps/lilo
# man lilo
Back to top
View user's profile Send private message
Greven60
Guest





PostPosted: Tue Aug 06, 2002 5:30 pm    Post subject: Reply with quote

Well.... I follow the Help files to the letter but grub never starts up... and now I can't get back into my linux.
Back to top
michaelb
l33t
l33t


Joined: 06 Jun 2002
Posts: 686
Location: Ann Arbor, MI

PostPosted: Tue Aug 06, 2002 5:34 pm    Post subject: Reply with quote

We're going to need some details here Greven. How many hard drives do you have? Are you running a dual boot, or does your Gentoo install have the entire disk(s)? What is your partitioning scheme? When you try to boot the computer, how far does it get? Any messages or anything?
Back to top
View user's profile Send private message
Greven60
Guest





PostPosted: Tue Aug 06, 2002 5:47 pm    Post subject: Reply with quote

Ok..... When It trys to boot it says,
"LI"

I have 3 HDD,
HDA = Windows and crap (Master IDE 1)
HDB = Games and more crap (Slave IDE 1)
HDC = Linux (Master IDE 2)
CD-Rom (Slave IDE 2)

When Try to get grub to place it's self in MBR it says that it's a fat and it stops. I would show you my grub but I can't get back in to gentoo.
Back to top
michaelb
l33t
l33t


Joined: 06 Jun 2002
Posts: 686
Location: Ann Arbor, MI

PostPosted: Tue Aug 06, 2002 9:05 pm    Post subject: Reply with quote

FWIW, the "LI" is the behavior of a b0rked LILO, not GRUB. To get into your Linux system, boot from the install CD. Once there, just create your /mnt/gentoo and /mnt/gentoo/boot mount points and mount the appropriate partitions. You should now be able to check your menu.lst which should look something like:
Code:
default 0
timeout 30
splashimage=(hd2,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (hd2,0)
kernel /boot/bzImage root=/dev/hdc3

title=Winblows
root (hd0,0)
chainloader +1
Note that in GRUB's menu root (hd#,#) is pointing to the boot sector of whatever OS you're trying to load at that point. Once you know your menu.lst is correct, try
Code:
# grub
grub> root (hd2,0)
grub> setup (hd0)
grub> quit
The root command is telling GRUB where to look for the menu.lst file, so it points to your /boot partition on the Linux drive. The setup command is telling GRUB where to put the inital pointer code I talked about way back earlier in this thread. You want that to be on the very first disk in your chain, because that's where the BIOS is going to look for boot information.

HTH,
Michael
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum