iceco 发表于 2003-6-16 12:10:13

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

系统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,8)
        kernel /vmlinuz-2.4.21 ro root=/dev/hda8
        initrd /boot/bzImage
当然,结果还是无法引导到新内核,我日!


现在我的grub.conf要怎么改好让它能上2.4.21?

jin_liu 发表于 2003-6-16 12:32:37

你有make modules;make modules_install 吗/?

iceco 发表于 2003-6-16 12:40:09

当然有

iceco 发表于 2003-6-16 12:57:07

顺便说一下make modules后:
make: Entering directory `/usr/src/linux-2.4.21/arch/i386/lib'
make: Nothing to be done for `modules'.
make: Leaving directory `/usr/src/linux-2.4.21/arch/i386/lib'
这会不会有什么影响?怎么会Nothing to de done for 'nodules'?

qianzheng82 发表于 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文件则是用命令mkinitrdinitrd-2.4.21.img2.4.21生成的,并不是加载bzImage文件哦.
当然,你不把bzImage改名也行,只要这样写,kernel /boot/bzImage ro root=/dev/hda8
但mkinitrdinitrd-2.4.21.img2.4.21是一定要的.

xdwjack 发表于 2003-6-16 20:47:00

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文件则是用命令mkinitrdinitrd-2.4.21.img2.4.21生成的,并不是加载bzImage文件哦.
当然,你不把bzImage改名也行,只要这样写,kernel /boot/bzImage ro root=/dev/hda8
但mkinitrdinitrd-2.4.21.img2.4.21是一定要的.

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

Dragonfly 发表于 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

xdwjack 发表于 2003-6-23 09:28:36

谢谢dragonfly和Axin,我去试验一下。

Dragonfly 发表于 2003-6-23 10:47:58

welcome, good luck
页: [1]
查看完整版本: 编译成功,但引导到2.4.21还是有问题