Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB Read Error
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
denstark
l33t
l33t


Joined: 02 Jun 2003
Posts: 654
Location: sd.ca.us

PostPosted: Mon Jun 02, 2003 7:19 pm    Post subject: GRUB Read Error Reply with quote

Ok... heres the scoop. i am a super newb when it comes to linux. i had someone reccommend me to gentoo so i thought why not, ill give it a shot. i had had some previous expierence with redhat, but redhat is easy. so i followed the instructions on the gentoo linux install page (x86) EXACTLY. then after all that was done, i picked grub as my bootloader, because i had used it as my bootloader w/ redhat. i am not duel booting. then i unmounted my hard drive partitions, and then rebooted. i am brought to a screen which says "GRUB Read Error". i then got really mad :evil: So i put in the cd and mounted the hard drives, entered chroot, etc... and i reinstalled grub, same error. i then reentered the machine. i unmerged grub, and installed LILO. i got a similar error, it wouldnt boot. then i reinstalled the whole gentoo linux. then i reinstalled grub again... SAME ERROR. :( i searched the forums, and i saw this post: https://forums.gentoo.org/viewtopic.php?t=56825&highlight=grub+read+error i used Ifrits post and saw that i didnt copy my grub files. i then copied them, and SAME ERROR. lol i am really angry right now lol. please help if you can. here are my grub.conf file and fstab file:

fstab:

Code:

# /etc/fstab: static file system information
# $header4: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab, v 1.10 2002/11/18 19:39:22 azarah Exp $
#
# noatime turns of atimes for increased performance (atimes normally aren't
# Needed; notail increases performance of ReisersFS (at the expence of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely/

# <fs>           <mountpoint>             <type>         <opts>  <dump/pass>

# NOTE: if your BOOT partition is ReiserFS, add the notail option to ops.
/dev/hda1          /boot                         ext2           noauto, noatime   1 1
/dev/hda3          /                              reiserfs                    noatime    0 0
/dev/hda2          none                         swap               sw                  0 0
/dev/cdroms/cdrom0 /mnt/cdrom          iso9660      noauto,ro            0 0
proc                  /proc                           proc               defaults          0 0

# glib 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink). Adding the following
# line to /etc/fstab should take care of this:
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will use almost no
# memory if not populated with files)

tmpfs               /dev/shm                   tmpfs             defaults             0 0


GRUB.conf:

Code:

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo
root (hd0,0)
kernel (hd0,0)/boot/bzImage root=/dev/hda3
[/code]

sorry if its a little out of order
_________________
Blog
Code:
denstark> starbuck authorizes torture?
rokstar> sure they do, you tried their coffee?
Back to top
View user's profile Send private message
denstark
l33t
l33t


Joined: 02 Jun 2003
Posts: 654
Location: sd.ca.us

PostPosted: Mon Jun 02, 2003 10:10 pm    Post subject: Reply with quote

anyone?
_________________
Blog
Code:
denstark> starbuck authorizes torture?
rokstar> sure they do, you tried their coffee?


Last edited by denstark on Wed Jun 04, 2003 12:34 am; edited 1 time in total
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2803
Location: Richmond, BC, Canada

PostPosted: Mon Jun 02, 2003 10:35 pm    Post subject: Reply with quote

Where did you install grub to --- (hd0) or (hd0,0) ? (hd0) being the MBR

Did you install any other programs into the MBR (EZBios, smartbootmanager, or such)?

Did you zero out the first chunk of the hard drive before you partitioned & created your file systems? If not don't just zap everything & start over. It can probably be saved & fixed.

What is the hardware? (it may help)
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
denstark
l33t
l33t


Joined: 02 Jun 2003
Posts: 654
Location: sd.ca.us

PostPosted: Mon Jun 02, 2003 10:39 pm    Post subject: Reply with quote

ok.. i just installed grub by typing emerge grub while in the chroot. i have not installed any other programs into the mbr. my hardware is as follows:
Pentium 2 233 mhz
96 MB RAM
20 GB HD
ATAPI cd rom
anything else?
_________________
Blog
Code:
denstark> starbuck authorizes torture?
rokstar> sure they do, you tried their coffee?
Back to top
View user's profile Send private message
wilburpan
l33t
l33t


Joined: 21 Jan 2003
Posts: 977

PostPosted: Mon Jun 02, 2003 11:54 pm    Post subject: Reply with quote

After you installed grub, did you run grub and do
Code:
root (hd0,0)
setup (hd0)

Sorry to be pendantic, but if all you did was emerge grub, then the bootloader hasn't been installed yet.

Also, make a grub floppy ASAP.
Back to top
View user's profile Send private message
denstark
l33t
l33t


Joined: 02 Jun 2003
Posts: 654
Location: sd.ca.us

PostPosted: Tue Jun 03, 2003 12:11 am    Post subject: Reply with quote

ok, i have a hard time making a grub floppy. when i execute the commands:
Code:

# cd /usr/share/grub/i386-pc/
# cat stage1 stage2 > /dev/fd0

and i reboot, my screen says GRUB and i cant type anything.
Ok, so say i only emerged grub, what else do i have to do?
yes, i did run
Code:

root (hd0,0)
setup (hd0)

i may be a newb, but i can follow directions.

P.s. please dont be so rude next time. thanks.
_________________
Blog
Code:
denstark> starbuck authorizes torture?
rokstar> sure they do, you tried their coffee?
Back to top
View user's profile Send private message
wilburpan
l33t
l33t


Joined: 21 Jan 2003
Posts: 977

PostPosted: Tue Jun 03, 2003 12:42 am    Post subject: Reply with quote

I don't mean to be rude, and I don't think I was. However, you would be amazed at how easy it was for me to miss things in the install instructions when I was installing Gentoo for the 1st-4th times.

Some more questions:

1. So if I understand your current situation, when you boot off of your grub boot floppy you get a grub prompt but your keyboard fails to work?

2. More hardware details -- which IDE channel do you have your harddrive plugged into, and what kind of hard disk controller do you have?
Back to top
View user's profile Send private message
denstark
l33t
l33t


Joined: 02 Jun 2003
Posts: 654
Location: sd.ca.us

PostPosted: Tue Jun 03, 2003 1:40 am    Post subject: Reply with quote

i dont get a grub prompt, it just says "GRUB" and thats it, also i dont know which ide channel my harddrive is in, nor do i know what kind of controler it is... its an old comp so i dont know much :oops:
_________________
Blog
Code:
denstark> starbuck authorizes torture?
rokstar> sure they do, you tried their coffee?
Back to top
View user's profile Send private message
wilburpan
l33t
l33t


Joined: 21 Jan 2003
Posts: 977

PostPosted: Tue Jun 03, 2003 2:03 am    Post subject: Reply with quote

The purpose of the grub disk is to allow you to try to boot up your system manually using grub commands. So if you have the grub prompt, you can try typing in commands manually to get your Gentoo system running.

So where it says "grub>", type in:

Code:
root (hd0,0)
kernel (hd0,0)/boot/bzImage root=/dev/hda3
boot

which should boot your system if you set it up according to the Gentoo install docs and if your hard drive is plugged into the first IDE channel.

If booting works from your grub floppy, then grub is not installed correctly on your hard disk.
Back to top
View user's profile Send private message
Milamber
n00b
n00b


Joined: 23 May 2003
Posts: 72
Location: Richmond, VA

PostPosted: Tue Jun 03, 2003 2:21 am    Post subject: Reply with quote

Hi. I had problems too in making a grub boot disk.
The instructions from the Gentoo installation doc
didn't work.

However, the instructions from the grub manual (http://www.gnu.org/manual/grub/html_mono/grub.html#FAQ)
itself did work :
Code:
# Create filesystem in your floppy disk. For example:

$ mke2fs /dev/fd0

# Mount it on somewhere, say, /mnt.
# Copy the GRUB images to /mnt/boot/grub. Only stage1, stage2 and menu.lst are necessary. You may not copy stage1.5s.
# Run the following command (substitute /usr/sbin/grub for /sbin/grub if you are using an older system):

$ /sbin/grub --batch <<EOT
root (fd0)
setup (fd0)
quit
EOT

The menu.lst file is the one used by older versions of grub. I don't have it so I just put in grub.conf.

To mount the disk, use /mnt/floppy instead of /mnt. And create the boot/grub directory. So :
Code:
mount -t ext2 /dev/fd0 /mnt/floppy
mkdir -p /mnt/floppy/boot/grub

Copy the files from /boot/grub to /mnt/floppy/boot/grub

BTW, the filenames in Linux (and UNIX in general) are case sensitive. I noticed that in the first post that you mentioned "GRUB.conf" ... but it might be just a typo.


Last edited by Milamber on Tue Jun 03, 2003 2:25 am; edited 1 time in total
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2803
Location: Richmond, BC, Canada

PostPosted: Tue Jun 03, 2003 2:24 am    Post subject: Reply with quote

Ok, so if you did
Code:
setup (hd0)
then you installed grub to the MBR of the hard drive. OK. You should have edited the /boot/grub/grub.conf file as needed to boot your installed kernel.

You don't need the boot floppy then. The boot floppy is only needed for emergency use in case something went wrong with the hard drive grub. Try booting without the cdrom or bootfloppy installed. You should get the grub menu as defined in /boot/grub/grub.conf. If it works fine then you probably have a floppy drive that linux does not like. A lot of older floppy drives have problems working under linux. Try again from your working gentoo to see if it copies files correctly later. if it is a buggy drive don't worry abaout it unless you need to use the floppy, (I rarely do, I have 2 old machines the floppy does not work in linux, windows is ok).

If you get read errors booting from the hard drive then reboot the live cd use cfdisk (or fdisk) and set the first partition as active for booting, chroot and install grub to the first partition instead of the MBR
Code:
grub
grub> root (hd0,0)
grub> setup (hd0,0)
grub> quit


umount the drive
reboot to the hard drive
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
Milamber
n00b
n00b


Joined: 23 May 2003
Posts: 72
Location: Richmond, VA

PostPosted: Tue Jun 03, 2003 2:30 am    Post subject: Reply with quote

on top of dol-sen's tip,

if you did :
Code:
grub> root (hd0,0)
grub> setup (hd0,0)

and the setup command returned some warnings regarding failure to embed e2fs_stage1_5

try this :
Code:
grub> root (hd0,0)
grub> install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd1,0) /boot/grub/stage2
grub> quit
Back to top
View user's profile Send private message
denstark
l33t
l33t


Joined: 02 Jun 2003
Posts: 654
Location: sd.ca.us

PostPosted: Tue Jun 03, 2003 9:46 am    Post subject: Reply with quote

tried it all..... same error :cry:
_________________
Blog
Code:
denstark> starbuck authorizes torture?
rokstar> sure they do, you tried their coffee?


Last edited by denstark on Wed Jun 04, 2003 12:34 am; edited 1 time in total
Back to top
View user's profile Send private message
theBlackDragon
l33t
l33t


Joined: 23 Nov 2002
Posts: 762
Location: Gent (Belgium)

PostPosted: Tue Jun 03, 2003 1:24 pm    Post subject: Reply with quote

I have the exact same problem on my P2 233 with 64MB RAM when I try to boot from the harddisk, it says grub was set up alright but then displays that error :(
_________________
Fvwm|Fvwm forum
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2803
Location: Richmond, BC, Canada

PostPosted: Tue Jun 03, 2003 1:35 pm    Post subject: Reply with quote

Well, I am out of ideas unless the grub package is faulty, you could
Code:
emerge grub
again just in case there was an error in it.

The only other thing I can think of is a hdparm config error, but I don't think that would matter for grub.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
denstark
l33t
l33t


Joined: 02 Jun 2003
Posts: 654
Location: sd.ca.us

PostPosted: Tue Jun 03, 2003 5:54 pm    Post subject: Reply with quote

so what should i do?
_________________
Blog
Code:
denstark> starbuck authorizes torture?
rokstar> sure they do, you tried their coffee?
Back to top
View user's profile Send private message
vulcan_
n00b
n00b


Joined: 06 May 2003
Posts: 61
Location: Gent, Belgium

PostPosted: Mon Jun 09, 2003 10:58 pm    Post subject: same stupid GRUB read error Reply with quote

my machine is Pent I 200MMX with 2 hard drives and a CDROM. GRUB is installed into the MBR .. successfully according to the results I see when I runt the root and setup commands .. but all I get id GRUB read error when I boo from HD. This is some irritating .. I followed the directions in the install guide, have had lots of help on the IRC chat and reviewed lots of threads in this forums .. no effect. It wont boot from the MBR .. at all. no how

any suggestions before I scrub it out and revert to LILO?
_________________
vulcan was a Roman myth - god of smiths
Back to top
View user's profile Send private message
Speakz
n00b
n00b


Joined: 10 Jun 2003
Posts: 8

PostPosted: Tue Jun 10, 2003 7:39 am    Post subject: Same story but no solution Reply with quote

Sorry all I have to say is ME TOO, but I couldn't get GRUB working as the MBR loader for anything. I got the exact same error as you report. After one week I gave up & moved on.

What I was able to do though is make a GRUB boot floppy and boot from that. I had even set up a config file on my GRUB boot hda1 and could call the config file from the boot floppy and be ok. Since I was more interested in getting my first Gentoo system up than bug hunting, I continued with the rest of my build with LILO

Possibly also of interest is that I was booting off of the 1.4rc4 3 stages LiveCD & using the fdisk included.

My advice: enter a bug report for GRUB & go LILO.
Back to top
View user's profile Send private message
paranode
l33t
l33t


Joined: 06 Mar 2003
Posts: 679
Location: Texas

PostPosted: Tue Jun 10, 2003 1:08 pm    Post subject: Reply with quote

Could you show the output of
Code:
fdisk -l /dev/hda


Maybe you didn't make the partitions bootable or something like that. Or maybe your root partition is too far into the drive for your older BIOS. Also, if those aren't culprits, you could try:
Code:
ACCEPT_KEYWORDS=~x86 emerge grub


This solved a strange issue I was having on a certain motherboard with Grub 0.92.
_________________
Meh.
Back to top
View user's profile Send private message
vulcan_
n00b
n00b


Joined: 06 May 2003
Posts: 61
Location: Gent, Belgium

PostPosted: Tue Jun 10, 2003 4:25 pm    Post subject: bad .. BAD idea to ~x86 emerge GRUB Reply with quote

did that the first time I tried the install and had MANY problems .. unresolved symbols in the IPv6 package (in kernel or module), khttpd, network stuff etc. Eventually had to scrub it down and start over.

Epecially do NOT set ~x86 before doing BASELAYOUT .. there have been some bad versions of this released recently (see other forum threads) and so you really have to stay with the stable version.

finally .. since my previous post I have gotten GRUB to boot my system. Put in an old 1.2 Gig drive to avoid any BIOS problems with large disk handling, rebuilt from scratch with only stable stuff. Discovered the screen in the boot sequence setup part of my BIOS that allowed me to get the 3 HDs into the correct boot order (duuuooh!) AND found that GRUB would NOT install into the MBR on my box. When i installed into into the boot partition it worked .. that seems to have been the real problem.

Oh yes, and before putting grub into (hd0,0) [instead of into (hd0)] I booted from a Windows 98 floppy and did "fdisk /mbr" to eradicate any sign of GRUB from the MBR. That may also have been a factor as at one point I had installed the Western Digital boot loader to handle the 15 and 20 GIG drives in the system. Maybe GRUB could not really over write that stuff in the MBR?? dunno.

but it is working now!
_________________
vulcan was a Roman myth - god of smiths
Back to top
View user's profile Send private message
paranode
l33t
l33t


Joined: 06 Mar 2003
Posts: 679
Location: Texas

PostPosted: Tue Jun 10, 2003 6:07 pm    Post subject: Re: bad .. BAD idea to ~x86 emerge GRUB Reply with quote

vulcan_ wrote:
did that the first time I tried the install and had MANY problems .. unresolved symbols in the IPv6 package (in kernel or module), khttpd, network stuff etc. Eventually had to scrub it down and start over.

Epecially do NOT set ~x86 before doing BASELAYOUT .. there have been some bad versions of this released recently (see other forum threads) and so you really have to stay with the stable version.


Uhhhh... I was talking about Grub, not the entire system.....
_________________
Meh.
Back to top
View user's profile Send private message
vulcan_
n00b
n00b


Joined: 06 May 2003
Posts: 61
Location: Gent, Belgium

PostPosted: Tue Jun 10, 2003 11:48 pm    Post subject: ~x86 is bad for you Reply with quote

yes, i saw that you were only talking about GRUB, and in that context setting the ACCEPT_KEYWORDS to !x86 caused me big problems with GRUB, and also with other things in the system. So .. I just hope that my warning (suggestion?) about avoiding ~x86 was timely.
_________________
vulcan was a Roman myth - god of smiths
Back to top
View user's profile Send private message
sdl3
n00b
n00b


Joined: 10 Jun 2003
Posts: 3
Location: Atlanta,GA

PostPosted: Thu Jun 12, 2003 3:30 am    Post subject: Reply with quote

I may have missed some of the info in the middle posts but looking at your original post it seems to me that you should remove the "boot" directory entries from the grub.conf file. Since you are mounting them sperately I don't believe that you need to specify it there.
Back to top
View user's profile Send private message
vulcan_
n00b
n00b


Joined: 06 May 2003
Posts: 61
Location: Gent, Belgium

PostPosted: Thu Jun 12, 2003 9:40 pm    Post subject: should be relative to (hd0,0) Reply with quote

but it isn't .. or at least, it did not boot when I had grub in the MBR .. but then nothing worked from the MBR so I cannot really tell.

I am now booting from the first partition with nothing in the MBR and with the paths like (hd0,0)/boot/stuff ... and with a link in the /boot like this:

cd /boot
ln -s . boot

so that the link points to the directory it is in.

when I tried with (hd0,0)/stuff it did not find the splashscreen nor the kernel image. soo .. I dunno what is going on .. but I chanted the incantations and burned rare incense over the puter to get it to work .. and id did!!
_________________
vulcan was a Roman myth - god of smiths
Back to top
View user's profile Send private message
rodtodd
n00b
n00b


Joined: 15 Jun 2003
Posts: 1

PostPosted: Sun Jun 15, 2003 1:20 am    Post subject: possible solution Reply with quote

I was having this same problem on an older HP vectra box. After some digging, I found some information that some older BIOS's don't correctly report the drive ID to GRUB. This can cause the 'GRUB Read Error' message. Here is what I did to fix it:

1) Make a grub boot disk and boot to it
2) From the grub prompt type:
"install (fd0)+1 d (hd0) (hd0,0)/boot/grub/stage2 p"

A quick breakdown of what this does. The first arguement tells grub to use the stage1 image from the floppy. the "d" is the critical part. It tells stage1 to always look for stage2 on the disk it was installed from, rather than the drive the BIOS gives it. The third arguement is the device to install on, in this case hd0. The fourth arguement is the location of stage2. The last arguement tells grub to patch stage2 with the new values so that you won't need to floppy on subsequent boots.

Hope this helps others, or at least sheds some light on the situation.
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
Goto page 1, 2  Next
Page 1 of 2

 
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