View previous topic :: View next topic |
Author |
Message |
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 7:34 am Post subject: Grub Error 21, Please Urgent. [Solved :) ] |
|
|
Ok, i am trying to install Gentoo on a system that has two hard drives. The first has two partitions, both of which are windows ntfs. The second drive has five partitions. The first is a windows extended partition the next three are my linux partitions and the last is a windows ntfs partition, ie
Code: |
hda1 => Windows XP ntfs (C:)
hda2 => Windows XP ntfs (D:)
hdb1 => XP Extended ??
hdb2 => Linux Boot
hdb3 => Linux Swap
hdb4 => Linux Root
hdb5 => Windows XP ntfs (F:)
|
Now when installing grub i did this:
Code: |
grub> root(hd1,1)
grub> setup(hd0)
grub> quit
|
This however after a reboot gave me error 21. Anyone know how i am supposed to set this up correctly??
Oh yeah, this is my supervisors machine, he wants to try gentoo so i have to have it running by tomorrow, eek.
Last edited by isoaga on Wed Jan 28, 2004 6:31 am; edited 1 time in total |
|
Back to top |
|
|
jef0113 n00b
Joined: 10 Nov 2003 Posts: 37 Location: Be
|
Posted: Tue Jan 27, 2004 7:38 am Post subject: |
|
|
can you post your grub.conf |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 7:41 am Post subject: |
|
|
heres my grub.conf
Code: |
timeout 30
default 0
fallback 1
title Linux
root (hd1,1)
kernel (hd1,1)/boot/bzImage root=/dev/hdb4
title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
|
|
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 8:03 am Post subject: |
|
|
I got this from http://www.gnu.org/software/grub/manual/grub.html#Troubleshooting
Quote: |
21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.
|
|
|
Back to top |
|
|
jef0113 n00b
Joined: 10 Nov 2003 Posts: 37 Location: Be
|
Posted: Tue Jan 27, 2004 8:07 am Post subject: |
|
|
this probebly ain't gone solve your problem buth it should be
give it a try |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 8:19 am Post subject: |
|
|
Having just a space seems to work fine on all my other gentoo boxes, but i will try your suggestion.
Now its really weirding me out, it actually worked once, it booted fine and i could even get into windows xp (just to check to see if windows was still working) but i didn't change anything, dammit. Now it still aint worken, just error 21. |
|
Back to top |
|
|
TheBigBug n00b
Joined: 23 Jan 2003 Posts: 41 Location: Yerseke, Holland
|
Posted: Tue Jan 27, 2004 8:43 am Post subject: |
|
|
Hmmm, are you sure that the drive is working and that your partitions are setup in the way you've shown here? In that case the problem is interesting.
You can review your partition scheme by booting from the live-cd and type
If your setup is correct, post another message... GL _________________ Even MS can't find me... |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 9:14 am Post subject: |
|
|
Ok here is the setup as according to cfdisk /dev/hdb
Code: |
Name Flags Type FS Label
---------------------------------------------------------
Logical freespace
hdb5 Logical ntfs [^G]
hdb2 boot Primary ext3
hdb3 Primary swap
hdb4 Primary ext3
---------------------------------------------------------
|
It seems to be what i though i set it up as |
|
Back to top |
|
|
jef0113 n00b
Joined: 10 Nov 2003 Posts: 37 Location: Be
|
Posted: Tue Jan 27, 2004 10:30 am Post subject: |
|
|
You could try to re-emerge grub , if that fails
try lilo , and you could also try to switch the disks
not sure , that's what i would try ...
hope this helps |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 10:35 am Post subject: |
|
|
swapping the disk was an idea that i had but the stupid case on this machine is welded shut or something, i will bring it an axe tomorrow and try that. As for trying lilo, i din't even consider it. Its definetly worth a try even though i've never used it before...
Here goes... |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 11:24 am Post subject: |
|
|
Ok, re-emerging grub didn't work, and lilo did something very weird. My /etc/lilo.conf file is as follows
Code: |
lba32
boot=/dev/hda
map=/boot/.map
install=/boot/boot-menu.b
menu-scheme=Wb
prompt
delay=50
vga=normal
image=/boot/bzImage
root=/dev/hdb4
label=Gentoo
read-only
other=/dev/hda1
label=Windows
tabel=/dev/hda
|
and i ran the sbin/lilo command and got two warning messages...
Warning: something to do with 'proc/partitions'...
Warning: The boot sector and the map file are on different disks
Added Gentoo *
Added Windows
After Rebooting i get a very terrible screen full of...
Code: |
L 01 01 01 01 01 01 ....
|
Now what? |
|
Back to top |
|
|
jef0113 n00b
Joined: 10 Nov 2003 Posts: 37 Location: Be
|
Posted: Tue Jan 27, 2004 12:23 pm Post subject: |
|
|
Sorry buth it's back to grub i think ,
Code: | Note: If you use a different partitioning scheme and/or kernel image, adjust accordingly. However, make sure that anything that follows a GRUB-device (such as (hd0,0)) is relative to the mountpoint, not the root. In other words, (hd0,0)/grub/splash.xpm.gz is in reality /boot/grub/splash.xpm.gz since (hd0,0) is /boot. |
if i understand correct , yours should be
Code: | kernel (hd1,1)/bzImage root=/dev/hdb4 |
|
|
Back to top |
|
|
TheBigBug n00b
Joined: 23 Jan 2003 Posts: 41 Location: Yerseke, Holland
|
Posted: Tue Jan 27, 2004 12:34 pm Post subject: |
|
|
Well, I've been thinking. Your Grub-setup looks okay... Why can't it find your harddisk. And Lilo having troubles too...
Grub has tab completion. So, at the command line type
After that you are in grub's environment. There you can use tab-completion to check your hard-disk setup. The only thing I can think of at this moment is that Grub sees hdb not as hd1.
I'll check this thread back in a couple of hours.
<edit>Typo's</edit> _________________ Even MS can't find me...
Last edited by TheBigBug on Tue Jan 27, 2004 12:35 pm; edited 2 times in total |
|
Back to top |
|
|
TheBigBug n00b
Joined: 23 Jan 2003 Posts: 41 Location: Yerseke, Holland
|
Posted: Tue Jan 27, 2004 12:34 pm Post subject: |
|
|
Sorry... _________________ Even MS can't find me... |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Tue Jan 27, 2004 10:00 pm Post subject: |
|
|
Ok, first up the line pointing to the kernel does work with a /boot as there is a symbolic link under the boot partition called boot that points to /boot. I remember that gave me some headaches on my first gentoo install. But its not the kernel line thats the problem. The computer has actually booted a couple of times over the past hours, 1 in 20 or so, and when it does i can get that kernel line and its parameters to work fine. The problem is that it don't boot damn near most of the time, with grub or lilo so i figured i'd try a grub boot disk and see what happens...
After booting to the grub prompt i used the tab completion feature to check which drives grub can see, and it can only see hd0 Therefore i'm thinking that its hardware related form some reason, even though it worked fine with windows.
Now why would grub be able to see both hdd's after booting from the livecd but not able to see them when booting stand alone?? |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Wed Jan 28, 2004 3:57 am Post subject: |
|
|
Ok, i have now swaped over the hdds so that the linux partitions are now
Code: |
hdc1 => Windows XP ntfs (C:)
hdc2 => Windows XP ntfs (D:)
hda1 => XP Extended ??
hda2 => Linux Boot
hda3 => Linux Swap
hda4 => Linux Root
hda5 => Windows XP ntfs (F:)
|
and then i ran a
Code: |
grub> root (hd0,1)
grub> setup (hd1)
grub> quit
|
Now when i reboot i get a single GRUB, but at least it happens everytime. This may be progress.... |
|
Back to top |
|
|
isoaga Apprentice
Joined: 31 Oct 2002 Posts: 206 Location: Newcastle, Australia
|
Posted: Wed Jan 28, 2004 6:34 am Post subject: |
|
|
Ok, solved it, i swapped the hdd's around so that each one was a master on its own ide port. I have the linux drive as hda and windows as hdb. Then when i setup grub i had to do this
Code: |
grub> root (hd0,1)
grub> setup (hd0)
grub quit
|
And then set my bios to boot from this drive. |
|
Back to top |
|
|
|