Chinaunix

标题: 请 好好先生 帮忙(内核引导) [打印本页]

作者: bing65    时间: 2004-07-01 18:43
标题: 请 好好先生 帮忙(内核引导)
我的系统是redhat linux 9
我按照这个帖子来升级我的内核,但是仍不能引导使用新内核(j旧的可用)
http://bbs.chinaunix.net/forum/viewtopic.php?t=342522&highlight=%C4%DA%BA%CB
旧内核是2.4.20-8,下载回来的 是2.6.7
在make 的时候 有些warning, 其他都通过了,也生成了vnlinuz-2.6.7,System.map等,并且都是自动加到/boot里,/boot/grub/grub.conf 也自动加入了代码.这是我的grub.conf
  1. # grub.conf generated by anaconda
  2. #
  3. # Note that you do not have to rerun grub after making changes to this file
  4. # NOTICE:  You have a /boot partition.  This means that
  5. #          all kernel and initrd paths are relative to /boot/, eg.
  6. #          root (hd0,10)
  7. #          kernel /vmlinuz-version ro root=/dev/hda12
  8. #          initrd /initrd-version.img
  9. #boot=/dev/hda
  10. default=2
  11. timeout=10
  12. splashimage=(hd0,10)/grub/splash.xpm.gz
  13. title bing65 (2.6.7)
  14.         root (hd0,10)
  15.         kernel /vmlinuz-2.6.7 ro root=LABEL=/
  16.         initrd /initrd-2.6.7.img
  17. title Red Hat Linux (2.4.20-8)
  18.         root (hd0,10)
  19.         kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
  20.         initrd /initrd-2.4.20-8.img
  21. title window 2003 & xp
  22.         rootnoverify (hd0,0)
  23.         chainloader +1
复制代码

在你的双休日大修爱机记里
  1. 10.按两下ESC,退出。它会提示你保存内核修改,按yes.
  2.       11.make dep
  3.       12.make clean
  4.       13.make bzImage(注意I为大写,一定要注意,否则你将编译失败)  
  5.       14.make modules
  6.       15.make modules_install(注意是下划线)
  7.       16.mkinitrd /boot/linux-2.4.18-lsf  linux-2.4-18-lsf(注意这个内核

  8. 版本号和你修改的Makefile中一致)
  9.       17.mv System.map /boot/System.map-2.4.18-lsf
  10.       18.mv arch/i386/boot/bzImage /boot/vmlinuz-2.4.18-lsf
  11.       19.vi /etc/grub.conf  
复制代码

我不明白第16行的意义.
linux-2.4.18-lsf  和我的 linux-2.6.7.img 是同样作用的吗?
使用的新内核的安装步骤不同,我用的是
  1. #make //编译内核和模块
  2. #make modules_install //安装模块
  3. #make install //安装内核和修改grub.conf 文件
复制代码


reboot选择 2.6.7的内核,无法进入系统,显示
no init found, please pass "init=" to kernel

请问 应该怎么解决?
作者: bing65    时间: 2004-07-01 21:02
标题: 请 好好先生 帮忙(内核引导)
顶一下
作者: bird123    时间: 2004-07-01 22:03
标题: 请 好好先生 帮忙(内核引导)
你的第16步,应该是
mkinitrd /boot/initrd-2.6.7 2.6.7

mkinitrd的作用是将内核使用的一些驱动放在ramdisk中

启动时的出错信息显示找步到/initrd-2.6.7.img,确认是否使用mkinitrd命令生成了initrd-2.6.7
作者: 好好先生    时间: 2004-07-01 22:43
标题: 请 好好先生 帮忙(内核引导)
很抱歉,这几天在上海出差。没有时间上网。
2.6的内核和2.4的编译方法有很大不同,你应该看精华中的2.6的那个贴子。
作者: y-masaki    时间: 2004-07-02 07:40
标题: 请 好好先生 帮忙(内核引导)
2.6 不用手动生成img文件 它会自动生成 编译是你有没有把ext3编译进去?




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