+ -
当前位置:首页 → 问答吧 → grub 的问题。

grub 的问题。

时间:2003-09-01

来源:互联网

我从redhat进行网络安装debian, 按照官方网站上的文档说明,只下载了debootstrap-0.1.17.3-2.i386.rpm, 便开始安装,安装完了之后,在配置grub方面遇到了麻烦,

这是启动时的出错信息:
root (hd0,10)
FIlesystem type is ext2fs, partition type 0x83
kernel /boot/vmliuz-2.4.20-8 ro root=/dev/hda10
initrd /boot/initrd-2.4.20-8.img
Error 15: FIle not found

这是硬盘的情况:
[root@localhost znwb]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/hda12 6.6G 2.0G 4.3G 32% /
/dev/hda13 92M 11M 76M 13% /boot
none 58M 0 58M 0% /dev/shm
/dev/hda1 3.1G 1.2G 2.0G 37% /cede
/dev/hda5 3.1G 2.0G 1.2G 64% /defect
/dev/hda6 3.1G 1.3G 1.8G 41% /equilibrium
/dev/hda7 6.1G 2.4G 3.7G 39% /freedom
/dev/hda8 6.1G 3.2G 2.9G 53% /ghostliness
/dev/hda9 3.1G 52M 3.0G 2% /hippish
/dev/hda10 3.0G 1.5G 1.4G 51% /debian
/dev/hda11 3.0G 33M 2.8G 2% /John
[root@localhost znwb]#

这是/boot/grub/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 (hd0,12)
# kernel /vmlinuz-version ro root=/dev/hda12
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,12)/grub/splash.xpm.gz
# Debian
title Debian (GNU/Linux)
root (hd0,10)
kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hda10
initrd /boot/initrd-2.4.20-8.img
# Redhat
title Red Hat Linux (2.4.20-8)
root (hd0,12)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1

别人的grub.conf里,root (hd0,X)
kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hdaY,
X+1=Y,
可是我的grub.conf里X=Y,
只有这样我的redhat才能启动,
debian才能识别分区。

怎样才能讯启动debian, 望指点,谢谢。

作者: Xiangbuilder   发布时间: 2003-09-01

应该是root (hd0,9)吧
RH是root (hd0,12),实际是hda13,是/boot,从下面的
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
也可以看出来应该是/boot

另外,你的debian分区有没有/boot?有就应该没问题,或者你启动的时候用命令试试

作者: libinary   发布时间: 2003-09-01

运行 grub
然后可以用find命令来验证kernel和stage1/2文件都在哪个区


grub> find stage1

grub> find vmlinuz-2.4.18-bf2.4

作者: carlos   发布时间: 2003-09-01

to libinary:
我的debian分区有/boot,
/boot里共有7个文件:boot.b, boot.bmp.b, boot.combat.b, boot-ment.b, boot-text.b, chain.b, os2d.b.
启动的时候用什么命令来试?

to carlos:
grub>
find stage1

Error 15: File not found

grub>
find vmlinuz-2.4.18-bf2.4

Error 15: File not found

我的debian分区的boot里是不是少了什么东西,比如内核和启动内核用的文件?
可我在最后一步用
localhost:/# apt-cache search kernel-image
来装内核时没有出现错误信息。
谢谢。

作者: Xiangbuilder   发布时间: 2003-09-02

sorry, 我写错了,应该是
grub> find /boot/grub/stage1
结果应该是root

你apt-get install grub-doc把,有很详细的文档

作者: carlos   发布时间: 2003-09-02

grub>
find /boot/grub/stage1

Error 15: File not found
可我的boot分区里的/grub确有stage1文件。
我的debian分区的/boot里共有7个文件:
boot.b, boot.bmp.b, boot.combat.b, boot-ment.b, boot-text.b, chain.b, os2d.b.
没有stage1

下面是我将root (hda0,9)改为root (hda0,10)后启动的报错信息:
root (hda0,9)
Filesystem type unknow partition type 0x7
kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hda10
Errot 17: Cannot mount selected partition

原来hda10是fat32文件系统,
我直接用命令:
/sbin/mkfs -t ext3 /dev/hda10
将其转为ext3了。

谢谢。

作者: Xiangbuilder   发布时间: 2003-09-02