LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 643|回复: 1

[zz]Grub error collection

[复制链接]
发表于 2005-6-9 13:05:01 | 显示全部楼层 |阅读模式
http://forums.gentoo.org/viewtopic-t-122656.html

So many people seem to have problems with their grub config...
Maybe this collection can help a little bit.

This collection is becoming longer and longer. Please continue to comment on what else is still missing/missleading/wrong etc.

First of all be warned:
The examples provided are just examples. Be sure to change partition numbers and the like according to your systems specs.

Many thanks to Earthwings, penetrode, loyaltonone, pilla, airhead, nephros, yamakawa and all the others for the suggestions on this thread.


Code:
fdisk -l
will tell you which partitions you've got and what number they have. Be warned that grub starts counting at 0.
Thus /dev/hda1 translates to (hd0,0) while /dev/hdb1 will translate to (hd1,0) and /dev/hda2 to (hd0,1)




Grub segfaults when trying to install
The situation described below is only relevant for grub 0.95.something. Currently (Mar. 05) grub 0.96 is available which should have fixed this problem.

When trying to install grub you receive a
Code:
Segmentation fault
Are you running grub 0.95.something? Currently (Feb. 05) there is a known bug related to this problem. Check out bug #79378 for possible solutions. Or try to emerge grub 0.94 r1 or r2. If that fails as well try emerging grub-static. (Currently only stable on amd64. Testing (~x86) on x86.)


Grub loading, please wait...
When rebooting you get this message and then grub hangs? But booting of your grub floppy works fine?
Code:
"GRUB loading stage 1.5."
"GRUB loading, please wait..."

According to the_bell you should change the boot order in your bios. Don't first try to boot of your grub floppy.

penetrode wrote that this may also be due to bad CFLAGS settings. Although the current grub ebuild filters out -fstack-protector it can't hurt to recompile grub with CFALGS="" emerge grub if nothing else helps.  


Grub error 12
info grub wrote:
12 : Invalid device requested This error is returned if a device string is recognizable but does not fall under the other device errors.
Did you execute those two lines in the grub prompt? Code:
grub> root (hd0,0) (Your boot partition)
grub> setup (hd0)
or whatever is appropriate for your installation?
check out this thread.


Grub error 15
After hitting return in the grub prompt you get something similar to this one?
Code:
Booting 'gentoo Linux'

root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
kernel (hd0,0)/boot/kernel-2.4.20 root=/dev/hda3 vga=792

Error 15: File not found
Press any key to continue...  
info grub wrote:
15 : File not found
This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.

If it's the kernel that it's missing (bzImage, kernel...):make sure that the file it is referring to exists on your boot partition.

To find out what the exact name of your kernel is, first boot from the live-cd or into your existing linux installation. Then mount /boot if you've got a seperate partition, or mount / if you don't. Then do the following: Code:
cd /boot
ls
This will list all the kernels that you've got on your boot partition.

If your kernel is missing make sure that you compiled a kernel either with genkernel or make menuconfig Code:
cd /usr/src/linux/
make menuconfig
and you copied it to your boot partition. Code:
cp /usr/src/linux/arch/[your architecture, e.g. i386]/boot/bzImage /boot/


However if this error is caused while trying to install grub. And is similar to this one: Code:
grub> root (hd0,0)
Filesystem type is xfs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found  
First of all make sure that you changed root(hd0,0) and setup (hd0) according to your systems specifications.

It may also be possible that grub uses other numbers for your drives than your kernel. So although it may be hda it could be that it is not hd0. However usually this is not the case.

Or else give this line a try provided by dirtboy Code:
grub-install /dev/bootdevice


If all else fails make sure that your partition is not somehow corrupt. Be sure that you are able to great symbolic links.


Grub error 17

info grub wrote:
17 : Cannot mount selected partition
This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.

Be sure to check your root(x,y) settings in your grub.conf.


Grub error 18

info grub wrote:
18 : Selected cylinder exceeds maximum supported by BIOS. This error is returned when a read is attempted at a linear block address beyond the end of the BIOS translated area. This generally happens if your disk is larger than the BIOS can handle (512MB for (E)IDE disks on older machines or larger than 8GB in general).  
Try an update for your BIOS and/or move your boot partition to the front (or at least into the appropriate range).


"GRUB GRUB GRUB GRUB..."
According to airhead this can be caused by having your bios detect your disks automatically. Try to set your bios entry to User Type HDD.


Probing devicesto guess BIOS drives. This may take a long time.
When trying to install grub, grub hangs at this line.
One possible solution could be that you have some weird configuration of your devices, like ultra/non-ultra DMA disks on one cable.


When installing grub it just hangs
If you haven't got a floppy drive, have you used the --no-floppy switch?


Uncompressing Linux... Ok, booting the kernel.
One possible solution is that ACPI is not working correctly. Try to disable it in your bios or in your kernel.


Where is my grub.conf?
Try those lines provided by madtomkidd: Code:
mount /dev/hda1 /boot
nano -w /boot/grub/grub.conf  
Be sure to note that this implies that you've got a separate boot partition, which is /dev/hda1. Otherwise you'll have to change the first line accordingly.


Could not find device for /boot/boot: Not found of not a block device
When trying to run grub-install you receive this error message? Check that you didn't forget Code:

Code Listing 6: Updating /etc/mtab
# cp /proc/mounts /etc/mtab  



After hitting enter at the grub menu the system reboots
Try disabeling framebuffer in your kernel.
If this does not help disable APM/APCI/ACP. (see this posting)


After hitting enter at the grub menu the screen goes black
Turn off framebuffer (typically remove vga=XYZ from your grub.conf) and check the processor architecture in your kernel config.


After upgrading grub you only get a grub prompt?
Did you upgrade to grub 0.96?
If so make sure that you still have a symlink in /grub pointing from grub to ./

Else make sure that your menu.lst link exists
Code:
cd /boot/grub
ln -s grub.conf menu.lst  

and you executed Code:
root (hd0,0)
setup (hd0)
in grub.
Check out bug 39392

You may also want to try this tip provided by ibis:
ibis wrote:
Try restoring the /boot/boot symlink Code:
# cd /boot
# ln -s ./ boot
And then run grub-install again Code:
# grub-install --root-directory=/boot /dev/hda




After upgrading your grub image is gone?
First of all check if the file you are referring to really exists.
If that is the case, go and check the ebuild. Maybe the patch for the splash image is commented out in the version that you are using.


Cannnot open root device "hdaX"
Are you getting something like this error?
Code:
VFS: Cannot open root device "hda7" or 03:07
Please append a correct "root=" boot option
Kernel Panic: VFS: Unable to mount root fs on 03:07
Make sure your grub.conf reads two times the same (hd0,X) entry. like Code:
root(hd0,1)
kernel (hd0,1)...

nephros told me a few more possible reasons for this problem:
nephros wrote:
From my expierience, this is 80% of the time caused by an incorrectly configured kernel, specificly either:


[+]IDE chipset (or SCSI controller) support not compiled or compiled as a module (and no initrd).
[+]filesystem support used on root partition not compiled or compiled as a module (and no initrd).
[+]support for MSDOS partition tables not compiled (CONFIG_PARTITION_ADVANCED -> CONFIG_MSDOS_PARTITION)(it happened!)



On fresh installs it's often caused by not having edited /etc/fstab during the install process, and it still contains lines like "/dev/ROOT / ext2 defaults,noatime 0 0".

Solution for both kinds is obviously rebooting the LiveCD or, in the former case, just a sane kernel and fix the configs.



can not find [insert any filesystem] on ide0(3,5)
When trying to boot you get this error? Code:
sh-2021: reiserfs_read_super: can not find reiserfs on ide0(3,5)
XFS: bad magic number
XFS: SB validate failed
Kernel Panic: VFS: Unable to mount root fs on 03:05
Make sure you've set your root partition in your grub.conf correctly.
Compare this thread.


Using genkernel but forgot to note that kernel version?
boot your system using your live cd.
mount your boot partition.
execute Code:
cd /boot

ls
This will list various files that can be found on your boot partitions. One should start with kernel- while anouther one starts with initrd-. The number/text behind it is your kernel version. Now follow the handbooks instructions and exchange the sample kernel version with the one you installed.


You only see that Windows entry in your boot options


Check out this thread, it has not yet come to a conclusion.



Unable to boot into Windows
When trying to boot that other OS, you receive this error? Code:
Booting 'Win2k'
root (hd1,0)
Filesystem type unknown, partition type 0x7
chainloader +1  

Make sure your boot entry reads something similar to this one:
Code:
title=%$@@#$*
root (hd0,0)
chainloader (hd0,0)+1
or Code:
title=%$@@#$*
rootnoverify (hd0,0)
chainloader (hd0,0)+1

especially the chainloader
Compare this thread.


Boot Windows from your second harddrive
If you've got problems doing so, try this tip from cyrillic: change your windows boot entry to this: Code:
title Win2k
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1
发表于 2005-6-9 13:38:18 | 显示全部楼层
谢谢。正在关注这方面的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表