QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1025|回复: 8

编译成功,但引导到2.4.21还是有问题

[复制链接]
发表于 2003-6-16 12:10:13 | 显示全部楼层 |阅读模式
系统Redhat8.0+kernel2.4.18-14以前编译2.4.20死活不成功,现在有2.4.21放出了,下了每一步都可以编译成功,但这次也有同样的问题:无法引导到新内核。


在那步:
# mv /usr/src/linux-2.4.18-3/System.map System.map
# mv /usr/src/linux-2.4.18-3/arch/i386/boot/bzImage vmlinux
现在这2个文件在2.4.21里面都可以找到了,照它那样做,但在修改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,7)
# kernel /vmlinuz-version ro root=/dev/hda10
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=5
splashimage=(hd0,7)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-3)
root (hd0,7)
kernel /vmlinuz-2.4.18-3 ro root=/dev/hda10
initrd /initrd-2.4.18-3.img
title win xp
rootnoverify (hd0,0)
chainloader +1
我找不到for 2.4.21的img文件,也就无法引导成功


又看了看README,和以前的一样
   If you boot Linux from the hard drive, chances are you use LILO which
   uses the kernel image as specified in the file /etc/lilo.conf.  The
   kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
   /boot/bzImage.
现在我就把2.4.21下的System.map bzImage都cp到/boot下,再把grub.conf改成:
title Red Hat Linux (2.4.21)
        root (hd0,
        kernel /vmlinuz-2.4.21 ro root=/dev/hda8
        initrd /boot/bzImage
当然,结果还是无法引导到新内核,我日!


现在我的grub.conf要怎么改好让它能上2.4.21?
发表于 2003-6-16 12:32:37 | 显示全部楼层
你有make modules;make modules_install 吗/?
回复

使用道具 举报

 楼主| 发表于 2003-6-16 12:40:09 | 显示全部楼层
当然有
回复

使用道具 举报

 楼主| 发表于 2003-6-16 12:57:07 | 显示全部楼层
顺便说一下make modules后:
make[1]: Entering directory `/usr/src/linux-2.4.21/arch/i386/lib'
make[1]: Nothing to be done for `modules'.
make[1]: Leaving directory `/usr/src/linux-2.4.21/arch/i386/lib'
这会不会有什么影响?怎么会Nothing to de done for 'nodules'?
回复

使用道具 举报

发表于 2003-6-16 20:32:24 | 显示全部楼层
kernel /vmlinuz-2.4.21 ro root=/dev/hda8
initrd /boot/bzImage

这两句不对.
bzImage是内核,你要把它改名为vmlinuz-2.4.21, 然后在grub中用kernel /boot/vmlinuz-2.4.21 ro root=/dev/hda8 这句来装入内核
而initrd /boot/initrd-2.4.21.img 中的initrd-2.4.21.img文件则是用命令mkinitrd  initrd-2.4.21.img  2.4.21生成的,并不是加载bzImage文件哦.
当然,你不把bzImage改名也行,只要这样写,kernel /boot/bzImage ro root=/dev/hda8
但mkinitrd  initrd-2.4.21.img  2.4.21是一定要的.
回复

使用道具 举报

发表于 2003-6-16 20:47:00 | 显示全部楼层
[quote:e5dd070829="qianzheng82"]kernel /vmlinuz-2.4.21 ro root=/dev/hda8
initrd /boot/bzImage

这两句不对.
bzImage是内核,你要把它改名为vmlinuz-2.4.21, 然后在grub中用kernel /boot/vmlinuz-2.4.21 ro root=/dev/hda8 这句来装入内核
而initrd /boot/initrd-2.4.21.img 中的initrd-2.4.21.img文件则是用命令mkinitrd  initrd-2.4.21.img  2.4.21生成的,并不是加载bzImage文件哦.
当然,你不把bzImage改名也行,只要这样写,kernel /boot/bzImage ro root=/dev/hda8
但mkinitrd  initrd-2.4.21.img  2.4.21是一定要的.[/quote]

也就是说,kernel后面的参数就应该是编译成的bzimage,
而initrd后面的参数是用mkinitrd命令生成的文件,是不是这样子?
mkinitrd的使用方法就是mkinitrd  initrd-2.4.21.img  2.4.21这样吗?也就是mkinitrd后面加上要生成的文件名,再后面就是版本号了?好像不太对劲,是否可以说一下具体如何操作?
回复

使用道具 举报

发表于 2003-6-16 22:45:15 | 显示全部楼层
xdwjack, mkinitrd 's usage is as u said.

iceco, that is not a problem. u do not have modules in that sudir, so make need not to do anything
回复

使用道具 举报

发表于 2003-6-23 09:28:36 | 显示全部楼层
谢谢dragonfly和Axin,我去试验一下。
回复

使用道具 举报

发表于 2003-6-23 10:47:58 | 显示全部楼层
welcome, good luck
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-9-18 15:33 , Processed in 0.085089 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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