Help - Search - Members - Calendar
Full Version: Need Help With Grub (rh 9 And Xp) Error 21?
Linuxhelp > Support > Technical Support
Ka0s64
If anyone can help me with this I would greatly appreciate it. I had XP running on my primary hard drive, and decided to add RH 9 to a second hard drive I had lying around, and well, now things are broken. I can get into linux using a boot disk, but cant get into XP anymore.
When I start my computer GRUB loads, then I immediately get "Error 21" with no more explanation then that, and everything locks up.
Ill put my fdisk-l results and grub.conf hopefully someone can see a problem that I don't. Thanks again and I will be sitting here trying to figure this out, so if you need any more info to help just let me know and Ill respond ASAP.

fdisk -l gives:
>>
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 4 32098+ de Dell Utility
/dev/hda2 * 5 4865 39045982+ 7 HPFS/NTFS

Disk /dev/hdb: 13.0 GB, 13020069888 bytes
255 heads, 63 sectors/track, 1582 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 1452 11558767+ 83 Linux
/dev/hdb3 1453 1582 1044225 82 Linux swap
>>
grub.conf:
>>
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
password --md5 $1$m7q4gf6q$z6qJfXTdVcDIFzPCL6QF4.
title Red Hat Linux (2.4.20-8BOOT)
root (hd1,0)
kernel /vmlinuz-2.4.20-8BOOT ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8BOOT.img DOS
rootnoverify (hd0,1)
chainloader +1
title Windows XP
rootnoverify (hd0,1)
chainloader (hd0,1)+1
makeactive
title Red Hat Linux (2.4.20-8)
root (hd1,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.imgtitle DOS
rootnoverify (hd0,1)
chainloader +1
>>

Thanks again, please help a sad newbie if you can!
hughesjr
You will love the info about Error Code 21 for grub:

21 : "Unknown boot failure"
This error is returned if the boot attempt did not succeed for reasons which are unknown.

-------------------------------------------

try this for grub.conf:

CODE
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
password --md5 $1$m7q4gf6q$z6qJfXTdVcDIFzPCL6QF4.

title Red Hat Linux (2.4.20-8)
 root (hd1,0)
 kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
 initrd /initrd-2.4.20-8.img

title Red Hat Linux (2.4.20-8BOOT)
 root (hd1,0)
 kernel /vmlinuz-2.4.20-8BOOT ro root=LABEL=/ hdc=ide-scsi
 initrd /initrd-2.4.20-8BOOT.img

title Windows XP
 rootnoverify (hd0,1)
 makeactive
 chainloader +1
Ka0s64
I tried modifying my grub.conf to match what you posted, but unfortunately same error came up. I dont know if this helps at all but this is what I see when GRUB starts:

>>
GRUB Loading Stage 1.5

GRUB Loading, please wait...
Error 21
>>

And if it tells you anything this all happens pretty much instanly. All of your help is very much appreciated. I've been trying to search all over but so far, I havent found a fix.
hughesjr
boot to linux

get rid of the grub password line..

open a terminal window

goto the /boot/grub directory

type this command:

grub (and press enter)

When you get to the grub prompt type this command:

root (hd1,0) (and press enter)

setup (hd0) (and press enter)

quit (and press enter)



then try to reboot (with the grub.conf I gave you earlier).
Ka0s64
Still getting the Error 21, here are the results from your suggestion;

>>
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /grub/stage1 d (hd0) (hd0)1+16 p (hd1,0)/grub/stage2 /grub/gr
ub.conf"... succeeded
Done.
>>

Is it bad that /boot/grub/stage1 doesn't exist? That would be my guess, but thats why I am the newbie!
hughesjr
Nope ... that should be OK .... you have a seperate boot partition.

I think the problem may be the partition for dell utilities and the MBR.

/dev/hda1 1 4 32098+ de Dell Utility

You might also create a boot floppy using Smart Boot Manager.

For WinXP, I downloaded the latest sbminst.exe and cwsdpmi.exe from the download page. I created a directory (named c:\btmgr) and put both files in there. I then opened a command prompt in XP, did the following to get to c:\bootmgr...

c:
cd\bootmgr


Put a formated blank floppy in drive A: (the floppy drive) then issued the following command to make a boot floppy:

sbminst -t us -d 0

(there are also instructions on the Smart Boot Manager site to create the boot floppy in Linux) ... you should then be able to pick which drive to boot from...

(0 is the number ... not the letter O)...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.