QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: happywind

再问,如何将scsi驱动支持编译进内核

[复制链接]
发表于 2004-11-7 14:54:48 | 显示全部楼层
[quote:3795c08265="cnhnln"]所以,你如果想使用initrd.img必须要把ext2编译进内核,即便你没有ext2的分区)[/quote]

这句话好像不对,我只编译了reiserFS。ext2,ext3都没有,也没有编译。

ramdisk initrd好像只是最初为装载核心用的,比如装载时需要驱动磁盘和知道文件系统等~~~

我还发现,在2.6中,不用ramdisk,我没有成功启动过核心,虽然我觉得把相应的都编译进核心了(我M的比较少)。
回复

使用道具 举报

发表于 2004-11-7 15:45:30 | 显示全部楼层
RH是必须要ext2的,因为它的initrd是gzip压缩的ext2。debian和gentoo不必须,它们的initrd用的是compressed rom,只要把它编译进内核就能使用initrd而不需要ext
正如你说的只是最初为装载核心用的,比如装载时需要驱动磁盘和知道文件系统等~~~ 。initrd不时必须的,只要把启动时需要的需要加载的驱动和文件系统的支持都直接编译进内核,而不是模块就可以了
如果内核需要的功能没编译进内核,例如磁盘的支持,这时它连磁盘都发现不了,当然也发现不了放在磁盘上的模块了。所以这时就需要initrd来临时的引导硬件到实际内核vmlinuz能够接管并继续引导的状态
发型版的官方发布之所以用initrd是因为它们不可能把需要的所有磁盘驱动和文件系统编译进内核,否则内核就太大了
因为PATA、SATA、SCSI、RAID设备众多,所以fedora的initrd已经大到了
CONFIG_BLK_DEV_RAM_SIZE=16384














新头像不错,有没有更激情些的

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
回复

使用道具 举报

发表于 2004-11-7 16:45:39 | 显示全部楼层
:)

原来,我的是Debian。(看来差别还有一点大)

initrd是核心初使化,加载根文件系统时需要的一些模块的ramdisk (init ramdisk , initrd for short)?
回复

使用道具 举报

发表于 2004-11-8 17:51:57 | 显示全部楼层
[quote:b462afd288="dannycat"]不用 make install,自己手工 cp arch/i386/boot/bzImage 到 /boot 去,再修改 GRUB。

再死的话,panic 之前的启动信息给出来,能给多少给多少。


另,你的机器上有那么多种 SCSI 卡吗?干吗把那么多都编进内核?[/quote]

dannycat :-) ,我现在在我的AIC-7899P机器上用你的方法试了一下,还是有No module aic7xxx found for kernel 2.6.9, aborting错误,过程如下:

我只是make modules_install,没有make install,没有安装
mkinitrd-3.5.24-1.i386.rpm

[root@gameserver linux]# pwd
/usr/src/linux
[root@gameserver linux]# ls
arch     crypto         fs                   init    lib          mm              README          security    usr
COPYING  Documentation  hidden-2.6.9-1.diff  ipc     MAINTAINERS  Module.symvers  REPORTING-BUGS  sound       vmlinux
CREDITS  drivers        include              kernel  Makefile     net             scripts         System.map
[root@gameserver linux]# depmod -a
[root@gameserver linux]# cd /boot/
[root@gameserver boot]# ls
config-2.4.21-4.EL         kernel.h    System.map-2.4.21-4.EL     vmlinuz
config-2.4.21-4.ELsmp      lost+found  System.map-2.4.21-4.ELsmp  vmlinuz-2.4.21-4.EL
grub                       message     System.map-2.6.9           vmlinuz-2.4.21-4.ELsmp
initrd-2.4.21-4.EL.img     message.ja  vmlinux-2.4.21-4.EL        vmlinuz-2.6.9
initrd-2.4.21-4.ELsmp.img  System.map  vmlinux-2.4.21-4.ELsmp
[root@gameserver /]# cd /usr/src/linux
[root@gameserver linux]# ls /lib/modules/
2.4.21-4.EL  2.4.21-4.ELsmp  2.6.9
[root@gameserver linux]# mkinitrd /boot/initrd.img-2.6.9      2.6.9
No module aic7xxx found for kernel 2.6.9, aborting.
[root@gameserver linux]# rpm -qa | grep mkinitrd
mkinitrd-3.5.13-1

[root@gameserver linux]# cd /usr/src/linux/drivers/scsi/aic7xxx
[root@gameserver aic7xxx]# pwd
/usr/src/linux/drivers/scsi/aic7xxx
[root@gameserver aic7xxx]# ls
aic7770.c          aic79xx.reg                  aic7xxx_pci.o
aic7770.o          aic79xx_reg.h                aic7xxx_proc.c
aic7770_osm.c      aic79xx_reg.h_shipped        aic7xxx_proc.o
aic7770_osm.o      aic79xx_reg_print.c_shipped  aic7xxx.reg
aic79xx_core.c     aic79xx.seq                  aic7xxx_reg.h
aic79xx_core.o     aic79xx_seq.h                aic7xxx_reg.h_shipped
aic79xx.h          aic79xx_seq.h_shipped        aic7xxx_reg_print.c_shipped
aic79xx_inline.h   aic7xxx_93cx6.c              aic7xxx.seq
aic79xx.ko         aic7xxx_93cx6.h              aic7xxx_seq.h
aic79xx.mod.c      aic7xxx_93cx6.o              aic7xxx_seq.h_shipped
aic79xx.mod.o      aic7xxx_core.c               aicasm
aic79xx.o          aic7xxx_core.o               aiclib.c
aic79xx_osm.c      aic7xxx.h                    aiclib.h
aic79xx_osm.h      aic7xxx_inline.h             built-in.o
aic79xx_osm.o      aic7xxx.o                    cam.h
aic79xx_osm_pci.c  aic7xxx_osm.c                Kconfig.aic79xx
aic79xx_osm_pci.o  aic7xxx_osm.h                Kconfig.aic7xxx
aic79xx_pci.c      aic7xxx_osm.o                Makefile
aic79xx_pci.o      aic7xxx_osm_pci.c            queue.h
aic79xx_proc.c     aic7xxx_osm_pci.o            scsi_iu.h
aic79xx_proc.o     aic7xxx_pci.c                scsi_message.h
[root@gameserver aic7xxx]# cd /boot/grub/
[root@gameserver grub]# vi menu.lst
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-4.ELsmp)
        root (hd0,0)
        kernel /vmlinuz-2.4.21-4.ELsmp ro root=LABEL=/
        initrd /initrd-2.4.21-4.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.4.21-4.EL)
        root (hd0,0)
        kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/
        initrd /initrd-2.4.21-4.EL.img
title Red Hat Enterprise Linux AS (2.6.9)
        root (hd0,0)
        kernel /vmlinuz-2.6.9 ro root=LABEL=/

过程中还是有No module aic7xxx found for kernel 2.6.9, aborting.错误,我就没有加initrd,不知道能不能启动(因为是生产系统,所以不方便启动)

但我前面那台SCSI卡是Symbios Logic 53c1030 的机器却编译成功,两台机器是用同一套碟装的(RHEL3UP2),mkinitrd的版本也一样,用的2.6.9也是同一个包,这两台机器只有两个区别:一是SCSI卡不一样,二是AIC-7899P的机器作了硬RAID5,为什么AIC-7899P就过不了呢?
回复

使用道具 举报

发表于 2004-11-8 18:34:14 | 显示全部楼层
你的 aic7xxx 不是编进内核了吗?当然没有这个模块了!
回复

使用道具 举报

发表于 2004-11-9 09:13:55 | 显示全部楼层
那我的Symbios Logic 53c1030 机器也是编译内核,就没有出现这个错误亚,而且我也尝试过将aic7xxx编译为模块,也出现了No module aic7xxx found for kernel 2.6.9, aborting. 问题
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-19 19:23 , Processed in 0.043256 second(s), 14 queries .

© 2021 Powered by Discuz! X3.5.

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