Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub Error 21
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
nasher
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 125

PostPosted: Fri Jan 09, 2004 11:12 pm    Post subject: grub Error 21 Reply with quote

i tried to install grub on the mbr and not but both i get

GRUB Loading stage1.5.


GRUB loading, please wait...
Error 21


i goog0led some time and i found something that i could try
Code:
/sbin/grub-install /dev/hda
but it didnt work because it says;
Code:
/dev/hde does not have any corresponding BIOS drive


im using a hpt 37x raid controller with just one harddisk
Back to top
View user's profile Send private message
homeobocks
Guru
Guru


Joined: 19 Dec 2003
Posts: 345
Location: I'm from Canada, and they say I'm a little slow . . . eh?

PostPosted: Fri Jan 09, 2004 11:25 pm    Post subject: Reply with quote

Can it boot to anything else (on the hard drive)?

Also, you should do a install grub /dev/hd, NOT /dev/hda.
I think.

To do this: boot into a livecd/whatever.
Do the following, substituting in the corrct values for hard drives:
Code:
#grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Then edit the GRUB conf file:
Code:
#mount /boot
#nano -w /boot/grub/grub.conf
Customize the grub.conf file, for example:
Code:
# Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 30
# Nice, fat splash-image to spice things up :)
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel (hd0,0)/kernel-2.4.22 root=/dev/hda3
# Only if you use genkernel. Otherwise remove the following line:
initrd (hd0,0)/initrd-2.4.22-gentoo-r2

# The next three lines are only if you dualboot with a Windows system.
# In this case, Windows is hosted on /dev/hda6.
title=Windows XP
root (hd0,5)
chainloader +1
Unmount /boot (using theumount command, it isn't unmount.
Code:
#umount /boot

_________________
HOW DO I SHOT WEB
Back to top
View user's profile Send private message
nasher
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 125

PostPosted: Fri Jan 09, 2004 11:29 pm    Post subject: Reply with quote

i did :)

when im booting from a live cd fdisk does see it as /dev/hde

when i install grub on the hdd(harddiskdrive not /dev/hdd ;)) or mbr its also installed fine.
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 10, 2004 1:41 am    Post subject: Reply with quote

You want to delete GRUB's stage 1.5 files before installing GRUB on a harddrive attached to a Highpoint controller.

See this thread for more details :
Grub problems (error 21)
Back to top
View user's profile Send private message
nasher
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 125

PostPosted: Sat Jan 10, 2004 4:17 pm    Post subject: Reply with quote

hm, i couldnt find this link with the search so..

i tried to remove the e2fs_stage1_5 and reinstalled grub into my harddisk but that didnt help.

the other guy tried to use lilo and that worked, i dont want to do this.

when i start grub and and type root (<tab> i can only choose hd0
the same with setup (<tab>

8O
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 10, 2004 10:30 pm    Post subject: Reply with quote

nasher wrote:
when i start grub and and type root (<tab> i can only choose hd0
the same with setup (<tab>

This is normal.

GRUB counts harddrives the same way the BIOS does.
(hd0) is the drive you are booting from
(hd1) is your second harddrive
(hd2) is your third harddrive
etc.

So, if you only have 1 harddrive, it will be (hd0), and it doesn't matter which controller you have it plugged into.

nasher wrote:
i tried to remove the e2fs_stage1_5 and reinstalled grub into my harddisk but that didnt help.

It should have helped.

The reason this hack is needed is because each time you boot, the Highpoint BIOS overwrites sector 9 on the harddrive with its own information about the drive. This location is right in the middle of GRUB's stage 1.5, so GRUB gets corrupted and won't boot.

Normally when you run GRUB's setup (hd0), it links stage 1 -> stage 1.5 -> stage 2. By deleting GRUB's stage 1.5 files, it will link directly stage1 -> stage 2. Stage 1.5 is optional, so everything should work correctly at this point.
Back to top
View user's profile Send private message
nasher
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 125

PostPosted: Sun Jan 11, 2004 2:35 pm    Post subject: Reply with quote

i tried with
Code:

grub> root (hd0,0)
grub> setup --stage2=/boot/grub/stage2 (hd0)
grub> quit


but even that, didnt help
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


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

PostPosted: Sun Jan 11, 2004 5:06 pm    Post subject: Reply with quote

What does your device map look like ?

You can have GRUB generate one like this.
Code:
# cd /boot/grub
# rm device.map        (if it exists)
# grub --device-map=device.map
Probing devices to guess BIOS drives. This may take a long time.
grub> quit
# cat device.map
Back to top
View user's profile Send private message
nasher
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 125

PostPosted: Sun Jan 11, 2004 5:17 pm    Post subject: Reply with quote

i mounted hdd removed the exist device.map

chrooted and did what u asked.

Code:

cdimage grub # cat device.map
(fd0)   /dev/fd0
(hd0)   /dev/hde
cdimage grub #
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


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

PostPosted: Sun Jan 11, 2004 5:38 pm    Post subject: Reply with quote

Hmmm, everything looks good. I don't understand why it isn't working properly.

At this point, you should be able to.
Code:
# cd /boot/grub
# rm *stage1_5        (Highpoint BIOS workaround)
# grub --device-map=device.map        (this will use your existing map)
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

If it still won't boot after this, then I am stumped. :?
Back to top
View user's profile Send private message
nasher
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 125

PostPosted: Sun Jan 11, 2004 6:03 pm    Post subject: Reply with quote

hm,

i saw in my dmesg this error

Code:

Partition check:
 /dev/ide/host0/bus0/target0/lun0:hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
blk: queue c03bbc60, I/O limit 4095Mb (mask 0xffffffff)
hdb: DMA disabled
ide0: reset: success
 p1 p2
 /dev/ide/host2/bus0/target0/lun0: [PTBL] [3736/255/63] p1


i guess my hdd is fucked? (tried to install grub on hda)
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


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

PostPosted: Sun Jan 11, 2004 8:35 pm    Post subject: Reply with quote

nasher wrote:
hm,

i saw in my dmesg this error

So GRUB works at last. :D

nasher wrote:
i guess my hdd is fucked? (tried to install grub on hda)

It is possible.
It could also be an IDE chipset driver problem (make sure the correct ones are compiled in the kernel).
It could also be an IRQ routing problem (try passing "acpi=off" to the kernel in your grub.conf).
Back to top
View user's profile Send private message
nasher
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 125

PostPosted: Tue Jan 13, 2004 7:58 pm    Post subject: Reply with quote

hmwa,

its a seagate 8 GB, i know it have bad sectors around 50%

when i connect a 30GB i didnt get the error so...
and i dont like it to put a 30 gig as OS because i dont use the other 25..
and no i dont wanna trade it with your old 2 gig

i'll try tomorrow to install gentoo on my 30 gig if it works.. ill repost the status


[edit]
oh man, i didnt get the error 21 error with my 8 gig anymore, after a while it just hangs.
i tried my 30 gig and get the error 21, followed your solution and now its working :lol:
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