免费注册 查看新帖 |

Chinaunix

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

编译内核成功,mkinitrd失败。。。。。。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-16 11:55 |只看该作者 |倒序浏览
我编译了一个FC3的系统,
make mrproper;
make xconfig;
make ;
make modules_install;
cp /usr/src/linux-2.6.9/arc/i386/boot/bzImage /boot/vmlinuz-2.6.9
cp /usr/src/linux-2..9/System.map /boot/System.map-2..9
cd /boot
以上命令都成功。
在mkinitrd initrd-2.6.9.img 2.6.9时出错,错误如下:
No module sata_promise found for kernel 2.6.9.

FC3系统硬盘是SCSI,在/etc/modprobe.conf 中有 alias sata_promise .....
有的不记得了。在mkinitrd 时会加载相应的驱动,在启动的时候为内核服务。
但是make结束后sata_promise.o就在/usr/src/linux-2.6.9/driver/scsi/目录里。
mkinitrd 命令就是找不到。请问这是为什么?
我分别把sata_promise的选项编进内核和作为模块加载,但都出现了以上的错误。请高手指点!谢谢!

论坛徽章:
0
2 [报告]
发表于 2006-03-16 14:29 |只看该作者
你试过用新kernel启动吗?

论坛徽章:
0
3 [报告]
发表于 2006-03-16 14:30 |只看该作者
LZ是在VMWare下编译的么?

论坛徽章:
0
4 [报告]
发表于 2006-03-16 16:49 |只看该作者
我是直接在FC3下编译的.
我没有用新的kernel启动过,因为我认为是起不起来的,我的硬盘是SCSI的.如果这一步不成功的话,新内核在启动时应该没有可能找不到一些驱动程序或模块.这是我想的.因为我在man mkinitrd 时看到
mkinitrd - creates initial ramdisk images for preloading modules

mkinitrd  creates filesystem images which are suitable for use as Linux
       initial ramdisk  (initrd)  images.  Such  images  are  often  used  for
       preloading  the  block device modules (such as IDE, SCSI or RAID) which
       are needed to access the root filesystem. mkinitrd automatically  loads
       filesystem   modules   (such   as  ext3  and  jbd),  IDE  modules,  all
       scsi_hostadapter entries and all modules in a probeall scsi_hostadapter
       ..  line  in  /etc/modules.conf,  and raid modules if the system's root
       partition is on raid, which makes it simple to build  and  use  kernels
       using modular device drivers.
Any  module  options  specified  in /etc/modules.conf are passed to the
       modules as they are loaded by the initial ramdisk.

这段英文应该很易懂,讲的是在mkinitrd 的作用,.img文件在kernel启动时有非常重要的作用.
不过我马上试一下在mkinitrd没有成功的情况下,系统用新的kernel能不能启动.希望各位不吝赐教.
万分感谢!!

论坛徽章:
0
5 [报告]
发表于 2006-03-17 17:34 |只看该作者

有人知道这方面的知识吗?

有人知道这方面的知识吗?

论坛徽章:
0
6 [报告]
发表于 2006-03-17 17:36 |只看该作者
不创建这个文件
直接在 root=/dev/你的跟分区就可以了

论坛徽章:
0
7 [报告]
发表于 2006-03-17 17:49 |只看该作者

谢谢你的指点

麻烦你能说清楚一些吗,我是新手.

还有就是关于.img文件,在创建这个文件的时候可以把某个linux没有带的驱动也编进这
个.img文件.我想要利用这个特性来支持linux没有的驱动硬件.所以我以后还是避不了这一步.

谢谢高手的指点!

论坛徽章:
0
8 [报告]
发表于 2006-03-17 18:59 |只看该作者
原帖由 zyzf 于 2006-3-17 17:36 发表
不创建这个文件
直接在 root=/dev/你的跟分区就可以了

不要误导人,这样不行的。

看看 depmod

论坛徽章:
0
9 [报告]
发表于 2006-03-17 19:05 |只看该作者
原帖由 futuregod 于 2006-3-16 16:49 发表
我是直接在FC3下编译的.
我没有用新的kernel启动过,因为我认为是起不起来的,我的硬盘是SCSI的.如果这一步不成功的话,新内核在启动时应该没有可能找不到一些驱动程序或模块.这是我想的.因为我在man mkinitrd 时看到 ...

我自用2.6的kernel以来从未用过mkinitrd,一般将bzImage拷到/boot里便可以启动。所以你不妨一试。
不过
  • Enable loadable module support和
  •    Automatic kernel module loading的选项得编进kernel。
  • 论坛徽章:
    0
    10 [报告]
    发表于 2006-03-17 19:49 |只看该作者

    谢谢各位高手的指点!!

    谢谢egret,connet,zyzf!
    我会去尝试的!
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

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

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP