LinuxSir.cn,穿越时空的Linuxsir!

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

grub-install出错,莫名其妙啊,求助求助

[复制链接]
发表于 2005-10-5 09:06:06 | 显示全部楼层 |阅读模式
# grub-install /dev/hda4
Counld not find device for /boot: Not found or not a block device.


我的分区信息如下(我并不想把grub按到主分区):
# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1375    11044656    c  W95 FAT32 (LBA)
/dev/hda2            1376        8708    58902322+   f  W95 Ext'd (LBA)
/dev/hda3            8709        8774      530145   82  Linux swap / Solaris
/dev/hda4            8775        9729     7671037+  83  Linux
/dev/hda5            1376        1825     3614593+   b  W95 FAT32
/dev/hda6            1826        4257    19535008+   b  W95 FAT32
/dev/hda7            4258        8708    35752626    b  W95 FAT32


我的grub.conf文件内容:
# more grub.conf
default 0
timeout 30

spashimage=(hd0,3)/boot/grub/splash.xpm.gz


title=Gentoo Linux 2.6.12-r10
#root (hd0,3)
#kernel /boot/kernel-2.6.12-gentoo-r10 root=/dev/hda4
#kernel /boot/kernel-2.6.12-gentoo-r10 root=LABEL=/
kernel /boot/kernel-2.6.12-gentoo-r10/bzImage root=/dev/hda4



我的核心:
# ls -l
total 2060
-rw-r--r--  1 root root 2102637 Oct  5 07:54 bzImage
# pwd
/boot/kernel-2.6.12-gentoo-r10
#


大家帮我看看,谢谢了
 楼主| 发表于 2005-10-5 09:12:25 | 显示全部楼层

对了,是不是要推出chroot环境??

To install GRUB you will need to issue the grub-install command. However, grub-install won't work off-the-shelf since we are inside a chrooted environment. We need to update /etc/mtab (the file with information about all mounted filesystems) first: luckily there is an easy way to accomplish this - just copy over /proc/mounts to /etc/mtab

是不是说,在chroot下cp了mtab文件也不行啊,必须要推出chroot,才能grub-install???

但手册里没写清楚啊,是这个意思吗?? :ask  :ask
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-5 09:19:07 | 显示全部楼层
还有,我是通过iso版本的linux启动(不是通过光驱,是还是从硬盘启动的),在内存中虚拟了一个linux工作环境,然后通过它安装gentoo的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-5 09:48:31 | 显示全部楼层
怪了,手工安装居然可以的!!

但背景图片没有了,看来对grub还是没理解,唉。。
回复 支持 反对

使用道具 举报

发表于 2005-10-5 14:54:27 | 显示全部楼层
注意了:splashimage=....
写错了当然没有图片了.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-5 15:28:27 | 显示全部楼层
Post by dengwangxi
注意了:splashimage=....
写错了当然没有图片了.


:thank

那grub-install不行是咋回事呢? :ask
回复 支持 反对

使用道具 举报

发表于 2005-10-5 15:42:49 | 显示全部楼层
建议你去www.gentoo.org看官方文档...
这个连接http://www.gentoo.org/doc/zh_tw/ ... ?part=1&chap=10
文档是:grub-install /dev/hda(表示安装在第一块硬盘的主引导区中)
我以前的做法是#grub
grub>root (hd0,a)
      >setup (hd0)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-5 18:45:39 | 显示全部楼层
Post by dengwangxi
建议你去www.gentoo.org看官方文档...
这个连接http://www.gentoo.org/doc/zh_tw/ ... ?part=1&chap=10
文档是:grub-install /dev/hda(表示安装在第一块硬盘的主引导区中)
我以前的做法是#grub
grub>root (hd0,a)
      >setup (hd0)


晕,我不是说了吗,手工装可以把grub装上,我装在第三个主分区,但用grub-install这个命令装我就报错
回复 支持 反对

使用道具 举报

发表于 2005-10-6 20:03:04 | 显示全部楼层
if u want to use grub-install  in gentoo
u must have a separate /boot partition
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-6 22:49:12 | 显示全部楼层
Post by compnik
if u want to use grub-install  in gentoo
u must have a separate /boot partition


i don't think so .

  
回复 支持 反对

使用道具 举报

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

本版积分规则

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