ºìÁªLinuxÃÅ»§
Linux°ïÖú

linuxÄÚºËÉý¼¶Ê§°Ü´¦Àí·½·¨

·¢²¼Ê±¼ä:2007-11-21 00:21:46À´Ô´:ºìÁª×÷Õß:Fzzd
ΪÁ˽â¾öij´¦linux kernelÉý¼¶Ê§°Ü¶ø²ÉÈ¡µÄ¿ìËÙ·½·¨£¬²»ÐèÒªÎÞÊý´ÎµÄ±àÒë²âÊÔ

Ö÷Ҫ˼ÏëΪ£¬¸ù¾ÝÕý³£Æô¶¯µÄintrdÎļþÖÆ×÷ÐÂkernleµÄintrdÎļþ£¬À´±£Ö¤ÏµÍ³Õý³£Òýµ¼

copyÉý¼¶ºóµÄinitrd-2.4.20-28.7smp.imgÎļþ£¬½âѹmount ºóºÍÕý³£Æô¶¯µÄ initrd-2.4.18-3.img ÎļþÄÚÈݽøÐбȽϣ¬·¢ÏÖÁËÎÊÌâ¡£

1.²é¿´Õý³£Çé¿öϵĴÅÅÌÇý¶¯Çé¿ö

grep scsi_mod /proc/modules | tr '[]' " " | cut -c33-

2.¶ÔinitrdÎļþ×ö½âѹ³ÉimageÎļþ£¬È»ºómountºó½øÐжԱÈ

RD=/boot/initrd-2.4.18-3smp.img

cp ${RD} ${RD}.Original

gunzip < $RD > /tmp/initrd.img

mkdir /tmp/initrd.mnt

mount -o loop /tmp/initrd.img /tmp/initrd.mnt

ͬÑù²Ù×÷¶ÔÉý¼¶ºóµÄinitrdÎļþ£¬montµ½ÁíÍâÒ»¸öλÖã¬È»ºó¶Ô±ÈÎļþºËÐÄÇý¶¯Ä£¿é¼ÓÔØÎļþlinuxrc·¢ÏÖÓÐһϲ»Í¬

< echo "Loading aic7xxx module"

< insmod /lib/aic7xxx.o

---

> echo "Loading aacraid module"

> insmod /lib/aacraid.o

¶Ô7.3 kernelµÄÉý¼¶£¨ÍÁ·¨ÃØÖƸßÌÀ¡£½÷É÷ʹÓã©·Ö2ÖÖÇé¿ö

1.ÓÐraidµÄ»úÆ÷

A.Ö±½Ó´ÓÒÔÇ°Õý³£µÄ»úÆ÷copy /boot ÏÂÃæÐèÒªÉý¼¶µÄkernelÎļþ£¬initrdµÈÎļþ /lib/modules//lib/modules/2.4.20-28.7

B.ÐÞ¸Älilo »òÕßgrub¼´¿É

2.ûÓÐraidµÄ»úÆ÷£¬ÏÈ°´ÕÕÓÐraidµÄ»úÆ÷×öºÃÉÏÃæA£¬B Á½²½È»ºó

A. ½â¿ªÉý¼¶ºóµÄinitrdÇý¶¯Îļþ

RD=/boot/ /boot/initrd-2.4.20-28.7smp.img

cp ${RD} ${RD}.Original

gunzip < $RD > /tmp/initrd.img

mkdir /tmp/initrd.mnt

mount -o loop /tmp/initrd.img /tmp/initrd.mnt

B.ÐÞ¸Ä/tmp/initrd.mnt/linuxrc ÎļþÖеÄ

echo "Loading aacraid module"

insmod /lib/aacraid.o

2ÐÐΪ

echo "Loading aic7xxx module"

insmod /lib/aic7xxx.o

C.copy /lib/modules/2.4.20-28.7smp/kernel/drivers/scsi/aic7xxx/aic7xxx.o Îļþµ½ /tmp/initrd.mnt/lib/

D.¶ÔÐ޸ĺõÄinitrdÎļþ´ò°ü£¬Ìæ»»/bootÏÂÓÐÎÊÌâµÄinitrd imgÎļþ

Sync

Umount /mnt/initrd.img

Cd /tmp ; Gzip < initrd.img > initrd-2.4.20-28.7smp.img

Cp initrd-2.4.20-28.7smp.img /boot/

ÖÁ´ËÍê³É×ÔÖƵÄÇý¶¯µÄÐ޸ģ¬ÓÉÓÚ /lib/modules/ ÏÂÃæµÄÇý¶¯Îļþ·Ç³£·á¸»£¬ÕâÑù¾Í±È½ÏʡʵÄÌæ»»ÁËÇý¶¯£¬Çý¶¯ºÍkernel°æ±¾ÒªÑϸñÒ»Ö±¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ