Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 04-18-2004, 09:52 AM   #1
Registered: Dec 2003
Posts: 39

Rep: Reputation: 15
debian grub problem on install


i have 2 boxes.. one to test bits and break them (i do this often unintentionally) and my normal box. i installed debian (27march04) release on the test box and all was fine so i fiigured it was time to get rid of suse on the main box and move to debian.

so far... not so good. while the install on the test box was ok... the install on the other one has been a nightmare!!!

i can't get passed the first reboot!!

it reboots and before it even gets to the grub menu i get GRUB GRUB ... all the way down the screen repeating infinitely - and thats it.

i've tried a myriad of combinations to no avail.

i have a 120gb HD and figured perhaps it doesn't like big drives (though the test one was on a 40gbHD). so i did the following:

#1 primary 98.9MB /boot
#5 logical 118.7 /
#6 logical 1.2 swap

all looks fine until i reboot. i went into the /boot/grub directory (using the console tool in the installer) and it looked fine as far as i could tell.

i've tried all on one partition, a change here, another ther... nothing!!

i'm totally stumped here!!!

would someone please have some suggestions as to how i may fix this problem

thanks heaps

Old 04-26-2004, 09:28 PM   #2
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 18/ TC64
Posts: 5,301

Rep: Reputation: Disabled
firstly heres the link to manual

I am not familiar with grub echoing on screen b4 the grub boot loader option screen .

grub can be installed onto a floppy as a bootable GRUB shell like command. You can then use it to test what grub is missing. You will have to download a source file to your working computer but lets try something easier eh?

You mention you can boot to the messy computer and navigate to the /boot folder.

Even tho you say it looks fine, can you do a command like
cd /boot
ls -lRh (that is ls is short for list space hypen lowercase l for list uppercase R for recursive and lowercase h for human readable.

if you can mount a floppy, you can be snazzy and send the output to a text file you can then send to us.

ls -lRh > /mnt/floppy/output.txt

NOW ITS not important you send it us, but compare it to your working one, you may spot files missing and or the sizes are not right.

When you get a chance see if they are different.

Lets leap ahead and assume they are........
if you have a file missing you copy the file to floppy if small enough or compress it hopefully then mount and cp the files to your bad /boot folder

And you may need to rerun grub to confirm its truly in mbr

BEST way to load to mbr is not to use the command grub-install /dev/hda as others posted it does not always work.

Instead on the bad box, at the console command prompt, type su to get root privilege the type your password then type grub.

GRUB then becomes the prompt b4 > like this

You then enter commands in this grub command shell like this
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

crash course, grub counts from zero so if you have only one hard drive its (hd0)
partitions also count from zero so /dev/hda1 (your boot folder) is (hd0,0)

IF THIS FAILS, see the manual for the text
Creating a GRUB boot floppy

It does not hurt to have one, as floppies fail I have 2 but what the heck.

post back with what you try and won't try and I will or others will try to help you. Please understand that I consider myself a grub man and not a Debian man
Old 05-08-2004, 11:16 AM   #3
Registered: Dec 2003
Posts: 39

Original Poster
Rep: Reputation: 15
ok... here is my slow progress to date

i installed minimal suse9 which installed a working entry in the mbr.

i then installed debian removing the suse install but fudged the grub mbr install in the debian setup so it doesn't overwrite the suse one. i figured the mbr entry would not care if suse is still there or not, it would just look at the system. ... and it worked!!

all was well until i did something stupid - booted a linux eval cd onto the machine and since then its all been stuffed again. the eval cd was not supposed to touch the system - or so it said. i knew i would have to revisit this issue but sheesh... what a headache.

ok.. so now i'm back where i started... GRUB GRUB all over the place repeating infinitely.

i have checked the files in /boot and /boot/grub against the other box and they look fine.

i have since booted into the system using a grub boot disk.

i have also done the following from grub console:
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

it said all was well.

but rebooting again, i get the same problem.
running fdisk:
Device Boot Start End Blocks Id System
/dev/hda1 1 146 1172713+ 82 Linux swap
/dev/hda2 * 147 14593 116045527+ 83 Linux

so the correct drive is set bootable.
again from grub:

grub> find /boot/grub/stage1
grub> quit

so it can find where everything is.

all would seem fine... but it still isn't working.
i have tried grub install options such as lba and other bits... still no go.

any suggestions would be appreciated.


Old 05-08-2004, 08:15 PM   #4
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 18/ TC64
Posts: 5,301

Rep: Reputation: Disabled
according to GRUB your find found (hd0,1) which means /boot folder is on /dev/hda2 and not hda1. Your post also says swap is on hda1.

so change your grub line to

grub> root (hd0,1)

and the rest as above and you should now be sweet
Old 05-08-2004, 11:47 PM   #5
Registered: Dec 2003
Posts: 39

Original Poster
Rep: Reputation: 15

thanks again for your response.

i tried that... same problem.

i have seen other posts around some lists with this issue. none seemed to be resolved or the user never posted their final outcome.

in any case... still stuffed

any other suggestions would be appreciated.

Old 05-09-2004, 01:43 AM   #6
Registered: Sep 2003
Distribution: Slackware 12
Posts: 52

Rep: Reputation: 15
Post your exact partition setup and your grubconfig for us to see. I have messed around with grub quite a bit I will see if I can help.
Old 05-10-2004, 04:02 PM   #7
LQ Newbie
Registered: May 2004
Posts: 2

Rep: Reputation: 0
That particular symptom occurs at least when [for whatever reason] the stage1
(and in your case, also the MBR) bootloader loads a sector that has the same
contents as the MBR and jumps to it, leading to that sort of loop.

grub-install will try to place the first sector of the stage1.5 bootloader on sector 2,
but I'm speculating that something odd about your setup is causing both
sector 1 (MBR) and sector 2 to become identical.

Do you have any BIOS drive management turned on, say some funky
virus checker that might backup the MBR onto the second sector,
or something which changes the sector mapping like OnTrack DriveManager
or EZBios?

Also check for strings like EZD, DM6:xxx or PTBL in dmesg after you manage to
(somehow :-) boot into that machine. Those strings will indicate the
presence of some kind of geometry translation; maybe that's somehow confusing

[In theory, I think grub atleast detects EZBios, but maybe there's some
oddness here that GRUB doesn't correctly handle.]
Old 05-11-2004, 09:39 AM   #8
Registered: Dec 2003
Posts: 39

Original Poster
Rep: Reputation: 15

first, finally fixed!!

quick recap for context.

fstab entries:
/dev/hda1 none (120GB)
/dev/hda2 /
/dev/hdd1 /backup (80GB)
/dev/hdb1 /home (120GB)

drive setup for hda from fdisk was as follows:

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 146 1172713+ 82 Linux swap
/dev/hda2 * 147 14593 116045527+ 83 Linux

so it all looked fine. drive bootable, grub where it should be etc etc.

the error i was getting was GRUB GRUB GRUB printed all over the screen infinitely. i first started with grub v0.93 then later (recently) moved to v0.94. i don't think the version made a difference here however as the error was noticed on both (though 0.94 has my splash images working ).

i had tried the following all with no joy:
from a terminal: grub-install ...
it said all was ok and again it looked fine with relevant files in /boot/grub.
this didn't work.

from a grub terminal:
root (hd0,1)
setup (hd0)

again it said all was ok but it didn't work.

i then noticed that the geometry reported by grub (and fdisk above) was not what was in the bios. so again from grub i did the following with values from the bios:

geometry (hd0) 57461 16 255
root (hd0,1)
setup (hd0)

that didn't work either.

i tried the above with varying combinations and switches many many many times over all to no avail. btw, i was getting into the system with a boot disk.

by this time i has also read the grub manual about 5 times and had gone through dozens of forums, mail lists and chats. others had in fact posted similar errors but none saw it through to post the result in the end - if any (which is half the point of this post).

it was determined by this time that grub could not move to stage 2 as was suggested by some yet when running 'find' from grub it found everything with no problem.

for whatever reason grub was not properly installing in the mbr.

anyway, i'll cut to the chase:

i finally started playing with the more complex 'install' command from the grub console. by this point i had also stopped using the grub console from within linux (after i had booted) as i also read in the manual that there may be issues with installing on mounted drives.

i tried many combinations using install - partly because of its complexity and partly because i wasn't really sure what i was doing.
finally this worked:

root (hd0,1)
install /boot/grub/stage1 d (hd0,1)/boot/grub/stage2 p (hd0,1)/boot/grub/menu.lst

the d option tells it explicitly where stage 2 is.
the p option and config file was added after it was finally booting but going to a grub prompt only.

the above would suggest that the grub install (any i had tried so far) was actually not locating or addressing correctly the location of the stage files using the default or simpler installation techniques.

anyway, problem now sorted - for me. the debian installer would perhaps want to cater for this somehow (other distros on same system did not have this problem).

thanks to all those who put in the time to help me out with this. the linux (and especially debian) community is great when it comes to this sort of thing.

anyway, now to actually start using my machine again.

Many thanks to all.

Old 05-13-2004, 03:58 PM   #9
Registered: Apr 2003
Location: Greenwood Mississippi
Distribution: Debian, LMDE, n some untus
Posts: 215

Rep: Reputation: 30
someone tell him and I how to replace it with lilo, i like it pretty good but will use Grub now that i will look to their manual. Gotta do a lil studying.

Can i use woody 3.0r1/bf24 CD to replace that partitions grub with lilo without problems? I use an external boot loader (bootmagic 8.0) that also loads bsd from hdc2 when present, hda1 & hda2 (xp pro and home respectively), hd7 (suse 8.2 pro), a bunch of debians (morphix, knoppix, SID's old and new)

THink i can.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GRUB + Debian install AlessPT Linux - Software 3 12-17-2004 09:47 AM
How can I re-install grub from debian-sarge cd rosariowong Debian 3 12-13-2004 01:43 PM
re-install grub from the cd of debian sarge hraposo Debian 1 11-04-2004 07:13 AM
Debian Experimental Install problem with grub buyer262000 Debian 3 05-03-2004 04:32 PM
How to Install Grub in Debian? velan Debian 2 04-16-2004 12:34 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration