免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 897 | 回复: 4
打印 上一主题 下一主题

请 好好先生 帮忙(内核引导) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 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

请问 应该怎么解决?

论坛徽章:
0
2 [报告]
发表于 2004-07-01 21:02 |只看该作者

请 好好先生 帮忙(内核引导)

顶一下

论坛徽章:
0
3 [报告]
发表于 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

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
4 [报告]
发表于 2004-07-01 22:43 |只看该作者

请 好好先生 帮忙(内核引导)

很抱歉,这几天在上海出差。没有时间上网。
2.6的内核和2.4的编译方法有很大不同,你应该看精华中的2.6的那个贴子。

论坛徽章:
0
5 [报告]
发表于 2004-07-02 07:40 |只看该作者

请 好好先生 帮忙(内核引导)

2.6 不用手动生成img文件 它会自动生成 编译是你有没有把ext3编译进去?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP