View previous topic :: View next topic |
Author |
Message |
njlg Tux's lil' helper
Joined: 03 Jul 2003 Posts: 98 Location: Portland, OR, USA
|
Posted: Fri Jan 02, 2004 8:56 pm Post subject: [Grub] Repeating GRUB on boot |
|
|
(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 |
|
|
FreeFly42 l33t
Joined: 03 Nov 2003 Posts: 848 Location: Houston, TX
|
Posted: Fri Jan 02, 2004 11:44 pm Post subject: |
|
|
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 |
|
|
njlg Tux's lil' helper
Joined: 03 Jul 2003 Posts: 98 Location: Portland, OR, USA
|
Posted: Sat Jan 03, 2004 12:26 am Post subject: |
|
|
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 |
|
|
FreeFly42 l33t
Joined: 03 Nov 2003 Posts: 848 Location: Houston, TX
|
Posted: Sat Jan 03, 2004 1:15 am Post subject: |
|
|
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 |
|
|
vers_iq Apprentice
Joined: 18 May 2002 Posts: 264
|
Posted: Sat Jan 03, 2004 1:29 am Post subject: |
|
|
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 |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
|
Back to top |
|
|
njlg Tux's lil' helper
Joined: 03 Jul 2003 Posts: 98 Location: Portland, OR, USA
|
Posted: Sat Jan 03, 2004 2:57 am Post subject: |
|
|
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 |
|
|
FreeFly42 l33t
Joined: 03 Nov 2003 Posts: 848 Location: Houston, TX
|
Posted: Sat Jan 03, 2004 5:25 am Post subject: |
|
|
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 |
|
|
njlg Tux's lil' helper
Joined: 03 Jul 2003 Posts: 98 Location: Portland, OR, USA
|
Posted: Sat Jan 03, 2004 6:45 pm Post subject: |
|
|
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 |
|
|
FreeFly42 l33t
Joined: 03 Nov 2003 Posts: 848 Location: Houston, TX
|
Posted: Sun Jan 04, 2004 10:20 pm Post subject: |
|
|
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 |
|
|
njlg Tux's lil' helper
Joined: 03 Jul 2003 Posts: 98 Location: Portland, OR, USA
|
Posted: Mon Jan 05, 2004 12:34 am Post subject: |
|
|
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 |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Mon Jan 05, 2004 1:07 am Post subject: |
|
|
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 |
|
|
FreeFly42 l33t
Joined: 03 Nov 2003 Posts: 848 Location: Houston, TX
|
Posted: Mon Jan 05, 2004 1:50 am Post subject: |
|
|
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! _________________ Kent
Planes are dangerous, get out of 'em quick |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Mon Jan 05, 2004 2:45 am Post subject: |
|
|
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! |
... sounds like something I would do. |
|
Back to top |
|
|
ashtong n00b
Joined: 23 Jan 2003 Posts: 44
|
Posted: Mon Jan 05, 2004 12:44 pm Post subject: |
|
|
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 |
|
|
|