Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Grub] Repeating GRUB on boot
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
njlg
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 98
Location: Portland, OR, USA

PostPosted: Fri Jan 02, 2004 8:56 pm    Post subject: [Grub] Repeating GRUB on boot Reply with quote

(Sorry if I missed a post about this. There were several posts with this topic, but ended in a LILO vs. GRUB war.)

When I boot the system, after POST I get a screen with repeating GRUB, until I power-off.

I installed Grub
Code:

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


Partition Table
Code:

/dev/hda1  *  1   12   96358+     83 Linux
/dev/hda2     13  73   489982+    82 Linux swap
/dev/hda3     74  316  1951897+   83 Linux
/dev/hda4     317 2498 17526915   c    Win95 FAT32 (LBA)


grub.conf (do not think it matters)
Code:

timeout 10
default 0
splash (hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.4.22-r2
root (hd0,0)
kernel /boot/bzImage-2.4.22-gentoo-r2 root=/dev/hda3


hda is the first device to boot, according to my BIOS.

Someone else, having the exact problem I am, said that he changed PI Mode from 4 to 3 in his BIOS. My hda is set to use PIO Mode 4, but I cannot change it.

I used the floppy to try and boot the kernel. I set fd0 to be the first device to boot. Then
Code:

grub> root (hd0,0)
grub> kernel /boot/bzImage-2.4.22-gentoo-r2 root=/dev/hda3
grub> boot

..and everything booted up fine (except that I forgot to add RTC to my kernel =).

Does anyone know what I did wrong or how I can fix this?


Last edited by njlg on Sat Jan 03, 2004 6:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Fri Jan 02, 2004 11:44 pm    Post subject: Reply with quote

Only two things I can think of here.

The only difference betweent the boot sequence from the floppy and from the grub.conf is the splash image. Is it possible it's corrupt or not present? Try removing that line from the grub.conf and rebooting.

Also, did you already have a filesystem created on (hd0,0) when you installed Grub? If not, Grub might not have been able to determine which stage 1.5 file to load in the boot sector to be able to mount the partition. In this case Grub wouldn't be able to mount the root partition and read grub.conf. Since you can do this from the floppy obviously the files are there, so the only explanation is that Grub can't mount the partition.

Just for kicks I'd recommend booting from the Grub floppy, and re-running the setup commands. The setup commands you posted looked correct.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
njlg
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 98
Location: Portland, OR, USA

PostPosted: Sat Jan 03, 2004 12:26 am    Post subject: Reply with quote

I think the problem occurs before grub.conf is read. However, I changed the splash line and the I still got the repeating GRUB nonsense.

Yes, there was a fs on (hd0,0) when I installed Grub.

I tried several times to setup Grub from both the floppy and I had tried several times before I used the floppy (using the Live CD), with no luck.

It seems like it should work, but it does not. I wonder if it would work if I plugged it into another system.
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Sat Jan 03, 2004 1:15 am    Post subject: Reply with quote

The repeating GRUB means GRUB is trying to mount the root partition (the one you specified with the root command when installing GRUB) but it is failing for some reason. The fact that you can boot it from a floppy (with the same GRUB commands as in your grub.conf) means either grub is looking in the wrong place or doesn't have the right stage1.5 to load the specified partition.

Are you doing something in the BIOS to specify the boot drive? This could cause (hd0,0) to not be where Grub thinks it should be, and it could be in a different location when booting off a floppy vs booting off the disk. Do you have more than one drive on your system?

Edit: Since it fails from the CD, I am presuming your CD is IDE, and therefore may be affected by BIOS rearrangement, whereas your floppy may not. Thus the boot works from the floppy, but nothing else.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
vers_iq
Apprentice
Apprentice


Joined: 18 May 2002
Posts: 264

PostPosted: Sat Jan 03, 2004 1:29 am    Post subject: Reply with quote

Try something like this
Code:
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz

title Gentoo Linux 2.4.22-r2
        kernel (hd1,0)/bzImage-2.4.22-gentoo-r2 ro root=/dev/hda3

_________________
"You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the Swiss hold the America's cup, France accusing the US of arrogance and Germany doesn't want to go to war."
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sat Jan 03, 2004 1:36 am    Post subject: Reply with quote

To fix the "repeating GRUB" problem, try reinstalling GRUB using a corrected device.map
Look at this thread for more details :
https://forums.gentoo.org/viewtopic.php?t=120422
Back to top
View user's profile Send private message
njlg
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 98
Location: Portland, OR, USA

PostPosted: Sat Jan 03, 2004 2:57 am    Post subject: Reply with quote

vers_iq, I do not think grub.conf is the problem since I have removed the splashimage line and something would show up even if I had the kernel line incorrect.

cyrillic, I tried removing all drives except for hd0 from my system and still had the Grub problem. I can tell that hda (the one I think should boot first) is in fact booting as the first drive -- the POST states it as the first drive. Grub's device.map is correct as well.

I have never had problems with Grub before now. I guess I might try emerging LILO.
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Sat Jan 03, 2004 5:25 am    Post subject: Reply with quote

You removed all the drives except hd0 and re-installed Grub and still had problems? Or just removed all the drives?
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
njlg
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 98
Location: Portland, OR, USA

PostPosted: Sat Jan 03, 2004 6:45 pm    Post subject: Reply with quote

Both. First I removed my cdrom drive (cause I needed to put it back in the computer it came from). Then when I restarted the system, after POST, I only got a blinking cursor. (and it was trying to boot from the correct drive)

Then, I removed the other hdd. Exactly the same: blinking cursor in upper left-hand corner.

Used floppy to boot up and reinstalled Grub. Exactly the same thing.

I am so perplexed.
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Sun Jan 04, 2004 10:20 pm    Post subject: Reply with quote

The fact that you can succesfully boot it from the floppy with the commands you showed in your first post, yet on reboot Grub executes but can't load the root partition (can't get past stage 1) is a smoking gun for having an incorrect device map.

When you are in BIOS and it scans for hard drives, it finds the only drive you have installed as the master drive on the main controller?

Can you possibly get to a grub prompt with your machine booted from the drive rather than the cd or a floppy?

Here is my device.map:
Code:
(fd0)   /dev/floppy/0
(hd0)   /dev/ide/host0/bus0/target0/lun0/disc
(hd1)   /dev/ide/host2/bus0/target0/lun0/disc


cyrillic:
If I were having a boot device order problem, would I just change the hd0 to hd1 and vice versa or should the grub.conf be changed?
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
njlg
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 98
Location: Portland, OR, USA

PostPosted: Mon Jan 05, 2004 12:34 am    Post subject: Reply with quote

FreeFly42, I know it seemed that way. But I was sure that GRUB was pointing to the correct drive because the MBR on the second disk (which was unplugged most of the time any way) was undamaged and, maybe I do not understand the entire process all the way, the drive was I wanted was always in the first position according to all managers (BIOS, Grub, Linux Kernel).

I did however fix my problem. I feel silly now for not thinking of this earlier: the motherboard does not except disks larger than 4GB (or something). The disc I was using was 20GB. Thus I moved everything over to a 4GB harddrive and everything worked fine.

Originally, I thought that since the kernel / grub stuff was at the beginning of the disc it would not matter; but for whatever reasons it did not work out that way.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Mon Jan 05, 2004 1:07 am    Post subject: Reply with quote

FreeFly42 wrote:
cyrillic:
If I were having a boot device order problem, would I just change the hd0 to hd1 and vice versa or should the grub.conf be changed?

You would probably need to fix both device.map and grub.conf

GRUB's device.map is only needed when GRUB is being installed, so that the setup (hd0) command will correctly link GRUB's separate parts (stage1, stage1.5, stage2).

grub.conf is used every time you boot, and any references here to (hd0) will be to the harddrive you actually booted from (not necessarily the first harddrive in the machine).
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Mon Jan 05, 2004 1:50 am    Post subject: Reply with quote

Thanks for the education. I'm going to have to go looking for some goofy IDE combinations so I can break things now and see if I can fix them! :twisted:
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Mon Jan 05, 2004 2:45 am    Post subject: Reply with quote

FreeFly42 wrote:
Thanks for the education. I'm going to have to go looking for some goofy IDE combinations so I can break things now and see if I can fix them! :twisted:

:lol:
... sounds like something I would do.
Back to top
View user's profile Send private message
ashtong
n00b
n00b


Joined: 23 Jan 2003
Posts: 44

PostPosted: Mon Jan 05, 2004 12:44 pm    Post subject: Reply with quote

I had a similar problem to this recently. I emerge LILO and it just said "L 99 99 99 99 99 ..." instead of "GRUB GRUB GRUB GRUB".

In the end I tracked it down to LBA vs Normal mode in the BIOS. I'd just switched the drive in question from slave to master and the BIOS had defaulted to the wrong LBA/Normal setting for that drive.

Very irritating, but bears out what you've since discovered for yourself. Wish I'd seen your original post sooner! Sorry...
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