Chinaunix

标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~ [打印本页]

作者: zxf1942    时间: 2004-12-20 13:31
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
我重编译了RH9的2.4.20-8内核。如何才能让grub使用这个新内核?
作者: q1208c    时间: 2004-12-20 13:47
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
make install
作者: zxf1942    时间: 2004-12-20 13:51
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
我是2.4内核,不是2.6内核.也可以吗?是不是在/usr/src/linux/目录下:
#make install
作者: q1208c    时间: 2004-12-20 13:57
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~

作者: zxf1942    时间: 2004-12-20 14:09
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
我执行了#make install
多了个启动选项:2.4.20-8custom
可是还是停到了:
......
VFS:Cannot open root device "LABEL=/" or 00:00
Pleace append a correct "root=" boot option
Kernel panic : VFS :Unable to mount root fs on 00:00

大哥我在线等^_^
作者: kunlunsnow    时间: 2004-12-20 14:19
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
把你的grub.conf中这个内核的启动条目中的root=LABEL=/给去掉。
祝你好运了。
作者: zxf1942    时间: 2004-12-20 15:08
标题: 如何让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 do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/hda2
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8custom)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8custom ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8custom.img
title Red Hat Linux (2.4.20-
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1
现在的grub.conf文件
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/hda2
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8custom)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8custom
        initrd /boot/initrd-2.4.20-8custom.img
title Red Hat Linux (2.4.20-
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8
                initrd /boot/initrd-2.4.20-8.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1
结果还是出错
......
mount: error 6 mounting ext3
pivotroot: pivot_root /sysroot,/sysroot/initrd/ failed:2
umount /initrd /proc failed:2
Freeing unused kernel memeorg:132K freed
kernel panic:NO init found, Trg passing init=option to kernel.
作者: zxf1942    时间: 2004-12-20 15:30
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
去掉拉.还是不行啊,帮忙看看啊~~~~~~~~~~~~~~~~~~
作者: 西方失败    时间: 2004-12-20 15:50
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
建议看看别人的,照着做就ok了
作者: kunlunsnow    时间: 2004-12-20 15:50
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
不知道哪个内核是你自己编译的,假设2.4.20-8custom是你自己编译的内核吧,启动选项如下:
title Red Hat Linux (2.4.20-8custom)
root (hd0,1)
kernel /boot/vmlinuz-2.4.20-8custom ro
initrd /boot/initrd-2.4.20-8custom.img
作者: 西方失败    时间: 2004-12-20 15:59
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
不能去掉那行,改成 kernel /boot/vmlinuz-2.4.20-8custom  root=/dev/hda2
应该ok的,good lucky
作者: zxf1942    时间: 2004-12-20 16:13
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
多谢二位大哥帮忙,我再去试.^_^
作者: q1208c    时间: 2004-12-20 16:19
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
是你自己编译时少加了东东, 好象是在 block device 那一项里吧, 有个什么 label 的, 加上试试.
作者: david5337    时间: 2004-12-20 16:23
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
估计是哪个文件系统或关键模块没有编译,或者没有直接编译到内核!
重新搞吧,多编译几遍就清楚!
作者: zxf1942    时间: 2004-12-20 16:46
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
谢谢几位大哥,问题解决了把改成root=/dev/hda2就OK了.

可惜USB不能用了,那里有对编译时各项的详细解释啊?
作者: q1208c    时间: 2004-12-20 17:08
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
原帖由 "zxf1942" 发表:
谢谢几位大哥,问题解决了把改成root=/dev/hda2就OK了.

可惜USB不能用了,那里有对编译时各项的详细解释啊?


去 kernel source 下的 kernel document 下看看吧. 东西太多了. 就算有, 也得几千页吧.
作者: zxf1942    时间: 2004-12-20 21:44
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
E文的吧.唉~~~~~~~~~~~~~~~~~~~~
刚才花了4小时小小心心的编译了一次内核,结果~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
苦啊.
作者: UNIX-COW    时间: 2004-12-20 22:00
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
我在 Turbo Linux Workstation 8 下 编译 2.6.8 总共不到一小时,,

主要是 make menuconfig 用了较多时间,,选择起来有点不顺手。。

make  和  make install  多比较快。。
作者: 懒企鹅    时间: 2004-12-21 16:50
标题: 如何让grub使用新内核?求助~~~~~~~~~~~~~~~~
为何我进了编译好的linux系统中, 在 /boot 内只有5个文件 找不到 grub文件夹,而进入旧版本的系统,又可以找到GRUB呢?都是用ROOT登录




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2