LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1234|回复: 5

奇迹是这样发生的-->

[复制链接]
发表于 2004-11-2 16:27:42 | 显示全部楼层 |阅读模式
前几天下了个gentoo尝尝鲜,内核用genkernel产生,grub.conf文件是按照
----------------------------------
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.4.25
root (hd0,0)
kernel /kernel-2.4.25-gentoo root=/dev/ram0 init=/linuxrc real_root=/dev/hda3
initrd /initrd-2.4.25-gentoo
-----------------------------------
结果系统装完启动时发生错误,错误如下:
/bin/sh:can't access tty; job control turned off
attempt to access  beyand end of device
01:00: rw=0, want=4405,limit=4096
attempt to access beyond end of device
01:00: rw=0, want=4406,limit=4096
只能使用sh的内置命令,用ls /看看吧,结果只有四五个目录,晕,连/var目录都没有,ls /usr命令又出错误提示,什么也没列出来,狂晕…………两天

今天下午又装,内核还是genkernel产生,grub.conf配置跟上面的一样,装完gentoo又晕,闷死人了,还是产生一模一样的错误提示。
没法子,自己手工编译内核看看,谁知奇迹发生了。系统装完成功的进入了gentoo。我倒!!!……现grub.conf配置如下:
-------------------------------------
default 0
timeout 30
title = Gentoo linux-2.4.26-gentoo
   root (hd0,0)
   kernel /kernel-2.4.26-gentoo ro root=/dev/hda3
#   initrd /initrd-2.4.26-gentoo-r6
title Red Hat Enterprise Linux AS (2.4.21-4.EL)
        root (hd0,6)
        kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/1
        initrd /initrd-2.4.21-4.EL.img
------------------------------------
发表于 2004-11-2 19:26:30 | 显示全部楼层
历来对 initrd 过敏,所以坚持手工编译内核。
 楼主| 发表于 2004-11-5 13:33:20 | 显示全部楼层
--------------------------------------
自己终于找到错误所在,错就错在自己没有认真的看genkernel产生的信息,提示信息明确要求有ramdisk=8192,现在改了grub.conf文件,系统成功引导,grub.conf文件如下:
default 0
timeout 30
title = Gentoo linux-2.4.26-gentoo
   root (hd0,0)
   kernel /kernel-2.4.26-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3
   initrd /initrd-2.4.26-gentoo-r6

title Red Hat Enterprise Linux AS (2.4.21-4.EL)
        root (hd0,6)
        kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/1
        initrd /initrd-2.4.21-4.EL.img

------------------------------------
发表于 2004-11-6 14:31:55 | 显示全部楼层
我也用genkernel编译过, 和前面说的情况差不多,grub.conf也和你的一样,仔细看启动信息,发现启动的是busybox,

改成这样就可以启动了。直接引导/, 不要ramdisk

title=Gentoo Linux 2.4.25
root (hd0,0)
kernel /kernel-2.4.25-gentoo root=/dev/hdx
initrd /initrd-2.4.25-gentoo
发表于 2004-11-6 14:35:43 | 显示全部楼层
真麻烦的grub.conf
就三行嘛
title=
root (hd0,0)
kernel (hdx,x)/bzImage root=/dev/hdx
这样就足以启动了
发表于 2004-11-6 22:36:42 | 显示全部楼层

genkernel生成的initrd太臃肿了

不实用,搞那么大那么复杂,太多功能都没有用处,出了问题还难折腾,还要依赖devfs这个在2.6中过时的东西.不如mkinitrd自己做一个来得简单方便
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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