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

linux fedore core 4Äں˱àÒë¹ý³Ì

·¢²¼Ê±¼ä:2008-04-22 12:53:40À´Ô´:ºìÁª×÷Õß:Desktop
Ê×ÏȾÍÊÇÈ¥www.kernel.orgÍøÕ¾ÉÏÈ¥ÏÂÔØ×îеÄÄÚºËѹËõ°ü¡£ÎÒÕâÀï¾ÍLinux-2.6.24.tar.gzÀ´½øÐÐ˵Ã÷¡£ÎÒÏÂÔصľÍÊÇÕâ¸öѹËõ°ü¡£ÔÚÕâÀïÇ¿µ÷µÄÊÇ£¬µ±Äã°ÑÕâ¸öѹËõ°üÏÂÔØÏÂÀ´µÄʱºòÒª·Åµ½/usr/srcÏÂÃæ¡£Ò»°ãÇé¿öÏÂÏÂÃ滹ÓÐÁ½¸öÎļþ¼Ð£¬Ò»¸öÊÇkernels£¬ÁíÍâÒ»¸ö¾ÍÊÇredhat¡£ÆäÖÐkernelsÀïÃæ¾ÍÊÇÄ㵱ǰµÄϵͳµÄÄںˡ£

ÏÂÔØÍêºóÄã¾Í¿ÉÒÔ½øÐÐÃüÁî²Ù×÷ÁË°¡£¡´ò¿ªÖնˡ£Ç°Ìá±£Ö¤ÄãÊÇrootÓû§¡£

cp Linux-2.6.24.tar.gz /usr/src »Ø³µ¡£ÕâʱºòÕâ¸öÈí¼þ°ü¾Í±»·Åµ½ÁË/usr/srcĿ¼ÏÂÃæÁË¡£ÏÂÃæµÄ²Ù×÷ºÜ¼òµ¥£¬¾ÍÊǶÔÕâ¸öѹËõ°ü½øÐнâѹËõ¡£

[root@localhost src]#tar -zxvf Linux-2.6.24.tar.gz »Ø³µ£¬È»ºó¾Í½âѹËõΪһ¸öÎļþ¼Ð Linux-2.6.24

[root@ localhost src]#cd Linux-2.6.24 ´ËʱÄãµÄµ±Ç°Ä¿Â¼¾ÍÊÇ

[root@ localhost src]#pwd /usr/src/Linux-2.6.24/´Ëʱ½øÐÐÃüÁîµÄ²Ù×÷¡£Õâ¸öʱºòÒ»¶¨Òª×¢Òâ±àÒëµÄ¹ý³Ì¡£

[root@ localhost Linux-2.6.24]#make mrproper ÕâÀï¾ÍÒª½âÊÍÒ»ÏÂÕâ¸öÃüÁîµÄ×÷ÓÃÁË¡£Õâ¸öÄ¿µÄÊÇÇå³ýÔ­ÏÈ´ËĿ¼Ï²ÐÁôµÄ.configºÍ.o£¨objectÎļþ£©£¬Èç¹ûÎÒÃÇÊǸÕÏÂÔصÄÔ´Â룬ÄÇôÕâÒ»²½Äú¾Í¿ÉÒÔÊ¡ÁË£¬µ«ÊÇÈç¹ûÄúÒѾ­±àÒë¹ý¶à´ÎÄں˵Ļ°£¬ÕâÒ»²½¿ÉÊÇÒ»¶¨ÒªµÄŶ£¬²»È»ÒÔºó³öÏֺܶàСÎÊÌâ¡£Ö´ÐÐÕâÒ»²½ºó£¬È»ºó¾ÍÊÇ£º

[root@ localhost Linux-2.6.24]#make menuconfig»òmake config»òmake xconfig ÔÚÕâÀïÎÒÑ¡ÔñµÄÊÇmake menuconfig¡£À´½âÊÍÒ»ÏÂÕâ¸öÃüÁîµÄ×÷ÓãºÖ÷Òª¾ÍÊÇÓÃÕâ¸ömenuconfigÀ´½øÐÐÄں˵ÄÅäÖã¬Ëû»á³öÏÖÒ»¸ö¿ÉÊÓ»¯µÄ½çÃ棬ȻºóÄã¾Í¿ÉÒÔÔÚÕâ¸ö½çÃæÉϽøÐÐÄں˵ÄÅäÖá£

#make config£¨»ùÓÚÎı¾µÄ×îΪ´«Í³µÄÅäÖýçÃ棬²»ÍƼöʹÓã©
#make menuconfig£¨»ùÓÚÎı¾Ñ¡µ¥µÄÅäÖýçÃ棬×Ö·ûÖÕ¶ËÏÂÍƼöʹÓã©
#make xconfig£¨»ùÓÚͼÐδ°¿ÚģʽµÄÅäÖýçÃ棬XwindowÏÂÍƼöʹÓã©
#make oldconfig£¨Èç¹ûÖ»ÏëÔÚÔ­À´ÄÚºËÅäÖõĻù´¡ÉÏÐÞ¸ÄһЩСµØ·½£¬»áÊ¡È¥²»ÉÙÂé·³£©

ÔÚÕâ¸ömake menuconfigÖУ¬ÓеÄÈÃÄúÑ¡Ôñ*],ÓеÄÈÃÄúÑ¡Ôñ[M],ÓеÄÈÃÄãÑ¡Ôñ[],*±íʾѡÖÐÖ±½Ó¼ÓÔؽøkernel,¶øMÔò±íʾ»áÔÚºóÃæµÄmake modulesÖбàÒë³Émodules,ÈÃÄúËæʱ¿ÉÒÔͨ¹ýinsmodºÍmodprobeµ÷ÈëÄںˡ£ÆäÖÐÒ»¶¨Òª×¢ÒâµÄ¾ÍÊÇ£º

1)Îļþϵͳ

ÇëÎñ±ØҪѡÖÐext3Îļþϵͳ,

File systems--->

*] Ext3 journalling file system support

*] Ext3 Security Labels

*] JBD (ext3) debugging support

ÒÔÉÏÈýÏîÒ»¶¨ÒªÑ¡ÉÏ,¶øÇÒÒªÄÚ½¨(¼´±ê*). Õâ¸ö·Ç³£ÖØÒª,ÔÚÅäÖÃÍêºóÒ»¶¨Òª¼ì²éÒ»ÏÂ.configÎļþÓÐûÓÐ"CONFIG_EXT3_FS=y"ÕâÒ»Ïî. Èç¹û²»ÊÇ"CONFIG_EXT3_FS=y"¶øÊÇ"CONFIG_EXT3_FS=m",ÄãÔÚÔËÐÐÄÚºËʱ¾Í»áÓöÉÏÒÔÏ´íÎó: pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed

2)Íø¿¨Çý¶¯

ÇëÎñ±Ø°Ñ×Ô¼ºÍø¿¨¶ÔÓ¦µÄÇý¶¯±àÒë½øÄÚºË,±È½ÏÆÕ±éµÄÍø¿¨ÊÇrealtek 8139,ÒÔϾÍÊÇÕâÖÖÍø¿¨µÄÅäÖÃ,ÒÔ¹©²Î¿¼

Device Drivers--->

network device support-->

Ethernet (10 or 100Mbit) --->

<*> RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)

<*> RealTek RTL-8139 PCI Fast Ethernet Adapter support

3)Éù¿¨Çý¶¯

ҲҪѡÔñ×Ô¼ºÉù¿¨¶ÔÓ¦µÄÇý¶¯±àÒë½øÄÚºË,±È½ÏÆÕ±éµÄÉù¿¨ÊÇi810_audio,ÒÔϾÍÊÇÕâÖÖÉù¿¨µÄÅäÖÃ,ÒÔ¹©²Î¿¼

Device Drivers --->

Sound --->

<*> Sound card support

Advanced Linux Sound Architecture --->

<*> Advanced Linux Sound Architecture

<*> Sequencer support

< > Sequencer dummy client

<*> OSS Mixer API

<*> OSS PCM (digital audio) API*] OSS Sequencer API

<*> RTC Timer support

PCI devices --->

<*> Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111

Open Sound System --->

< > Open Sound System (DEPRECATED)

ÆäÖл¹ÓбȽ϶àµÄÅäÖÃÎļþµÄ½²½â£¬Äã¿ÉÒÔµ½ÕâÀï½øÐвéÔÄ£ºÅäÖÃÎļþÏê½âÀïÃæÓÐÈ«²¿µÄÅäÖÃÎļþµÄ½âÊÍ¡£Äã¿ÉÒÔÀ´ÕâÀï½øÐÐÄãÒªÐÞ¸ÄÅäÖÃÎļþµÄ²Ù×÷¡£

Èç¹ûÒÔÉÏÈý¸ö²½ÖèÄ㶼×öºÃÁË£¬ÄÇôÄãµÄеÄÄں˾Ͳ»»á³öÏÖÎÊÌâÁË°¡¡£ÏÂÃæÎÒÃÇÒª½øÐÐʱ¼ä×µÄ¼¸²½²Ù×÷ÁË¡£

[root@ localhost Linux-2.6.24]#make clean Çå³ýһЩ²»±ØÒªµÄÎļþ£¬ÄÇЩÂÒÆß°ËÔãµÄ¶«¶«ÊÇ¿ÉÄܻᵼÖÂÄúÔÚ±àÒë¹ý³ÌÖгöÏÖ´íÎóµÄ¡£ÕâÒ»²½ÆäʵºÜÖØÒªµÄ¡£

[root@ localhost Linux-2.6.24]# make bzImage Éú³ÉеÄÄں˺ËÐÄ£¬ÊµÏÖÍêÈ«±àÒëÄںˡ£ÔÚÕâÀïÓÐÒ»¸öÐèҪעÒâµÄµØ·½¾ÍÊÇmake zImage/make bzImageÕâÁ½¸ö²»Í¬Ö®´¦¡£ÓеÄʱºòÒ²»áÓõ½make zImage¡£ÕâÀïÐèҪ˵Ã÷µÄ¾ÍÊÇÕâÁ½¸öÃüÁÊÇÀ´ÊµÏÖÍêÈ«±àÒëÄںˣ¬¶øÇÒ¶þÕßÉú³ÉµÄÄں˶¼ÊÇʹÓÃgzipѹËõµÄ¡£ËûÃǵÄÖ÷ÒªÇø±ð¾ÍÔÚʹÓÃmake bzImage¿ÉÒÔÉú³É´óÒ»µãµÄÄںˡ£Ê¹ÓÃmake zImageÔÚ½øÐа汾2.4.0µÄÄÚºËʱºòÈÝÒ׳öÏÖsystem too bigµÄ´íÎó¡£±àÒëÍê³ÉÒÔºó½øÐÐÏÂÒ»²½£º

[root@ localhost Linux-2.6.24]# #make modulesÕâ¸ö²½Öè¾ÍÊÇ°ÑÄúÔÚmake menuconfigÀï±ßËùÑ¡ÔñΪMµÄÅäÖÃ,È«²¿±àÒë³ÉÄ£¿é²¢·ÅÔÚ/usr/src/linux-2.6.24/Ï¡£ËüÓÃÀ´Éú³ÉËùÓеÄkernel module¡£Õâ¸ö²½Öèʱ¼ä±È½Ï³¤¡£µ±Õâ¸öÖ´ÐÐÍêÁË¿ÉÒÔ½øÐÐÏÂÃæµÄÖ´ÐУº

[root@ localhost Linux-2.6.24]# make modules_install Õâ¸öµÄÖ÷Òª×÷ÓþÍÊÇ°²×°moduleµÄ²½Öè¡£×îºóÒ»²½£º

[root@ localhost Linux-2.6.24]# make install Õâ¸öÃüÁî¾ÍÏ൱ÓÚÒ»¸ö×Ô¶¯»¯µÄ¹ý³Ì£¬ÒòΪÆäËûÅäÖÃËü¶¼»á°ïÄú×öºÃµÄ¡£ÓÃÕâ¸öÃüÁî¿ÉÒԺܿì×öºÃÐÂϵͳÁË£¬¶øÇÒ¿ÉÒÔÖØдÓÐÂÄÚºËÆô¶¯¡£

×îºó¾ÍÊǶÔÕâ¸öÄں˱àÒëÖÐÐèҪעÒâµÄÎÊÌâ½øÐÐ˵Ã÷¡£ÔÚÕâÀï×îÖØÒªµÄµØ·½¾ÍÊÇmake menuconfigÖУ¬ÕâÀïÄãÐèÒª¶ÔÄãµÄLinuxϵͳ½øÐÐÏêϸµÄÅäÖã¬ÐèÒªÄã¶ÔÕâ¸öÅäÖõÄÎļþĿ¼ÓиöºÜÉî¿ÌµÄÁ˽⡣µ±È»ÄãÒ²¿ÉÒÔ¶ÔÄãµÄÕâ¸öLinuxϵͳ½øÐиöÐÔ»°µÄÅäÖá£Õâ¾ÍÐèÒªÄã¶ÔÅäÖùý³ÌµÄÁ˽âºÍÕÆÎÕ¡£

È»ºó¾ÍÊÇÔÚÖØÐÂÆô¶¯LinuxÐÂÄں˵ÄʱºòÐèҪעÒâµÄ£º/boot/grub/grub.confµÄÄÚÈÝ¡£ÕâÀïÄã¿ÉÒÔ²ÎÕÕÕâ¸öÄÚÈÝÀ´½øÐÐÐ޸ġ£

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/hdc3

# initrd /initrd-version.img

#boot=/dev/hdc

default=1

timeout=10

splashimage=(hd0,0)/grub/splash.xpm.gz

title Red Hat Linux (2.6.7)

root (hd0,0)

kernel /vmlinuz-2.6.7 ro root=LABEL=/

initrd /initrd-2.6.7.img

title Red Hat Linux

root (hd0,0)

kernel /vmlinuz-2.4.20-8 ro root=LABEL=/

initrd /initrd-2.4.20-8.img

¶ÔÁË»¹ÓÐ×îºóÒ»Ìõ¾ÍÊdzö×ÔÎÒ×Ô¼ºµçÄÔÉϵÄÎÊÌâ¡£Èç¹ûÄãÖØÐÂÆô¶¯µÄʱºò³öÏÖÁËÈçϵĴíÎó£ºEnforcing mode requested but no policy loaded. Halting now.

kernel panic - not syncing: Attempted to kill init!

ÄÇôÕâ¸öʱºòÄã¾Í¿ÉÒÔÏëÒ»ÏÂÈçºÎÀ´½â¾öÕâ¸öÎÊÌâÁË¡£ÕâÀïÎÒÊÇÕâôÀ´½â¾öÕâ¸öÎÊÌâµÄ¡£

1¡¢ÔÚgrub.confÀï°Ñ kernel /vmlinuz-2.6.19 ro root=LABEL=/ rhgb quiet ±äΪ£º kernel /vmlinuz-2.6.19 ro root=LABEL=/ enforcing=0 rhgb quiet¡£ÕâÒ»²½¿ÉÒÔ²»×ö¡£µ«ÊÇÄãҪעÒâÏ¡£

2¡¢ÐÞ¸Ä/etc/selinux/configÅäÖÃÎļþ,Ö»Òª°ÑSELINUXµÄÖµ¸Ä³Édisabled¡£

·ÖÎöÒ»ÏÂÔ­Òò¾ÍÊÇ£ºselinuxµÄÎÊÌâ¡£

enforcing²ÎÊýÊÇÔÚÆô¶¯ÄÚºËʱ´«µÝ¸øselinuxµÄÄں˲ÎÊý£¬ËüÓÃÀ´¾ö¶¨ÄãϵͳµÄÄÚºËÔËÐÐÓÚÇ¿ÖÆ£¨enforcing £©Ä£Ê½»¹ÊÇ×ÔÓÉ£¨permissive£©Ä£Ê½¡£

ÔÚ×ÔÓÉģʽÏÂSELinuxÖ»ÊǼǼËû¸Ã×öʲô£¬¶øÊÂʵÉϲ¢²»×öÈκζ¯×÷¡£ÔÚÇ¿ÖÆģʽÏÂSElinux»áÀ´Õæ¸ñµÄ¡£Èç¹ûÄãµÄ²ßÂÔÓдíÎó£¬ÔÚÇ¿ÖÆģʽÏÂϵͳ¿ÉÄÜ»á×èÖ¹ÄãµÇ½£¡ËùÒÔÕý³£Çé¿öÏÂÄãÓ¦¸ÄÔÚÆô¶¯Ê±´« enforcing=1 ¸øÄںˣ¬µ±ÄãµÄSELinux²ßÂÔÓÐÎÊÌâʱ£¬Äã¿ÉÒÔÁÙʱ´«enforcing=0¸øÄÚºËÀ´²é´í¡£ÔÚ/etc/selinux/configÕâ¸öinitµÄÅäÖÃÎļþÖÐÏàÓ¦µÄÓÐÒ»¸öÑ¡Ïͨ¹ýÉèÖÃËü£¬Ò²¿ÉÒÔʹϵͳ½øÈë×ÔÓÉģʽ¡£

ºÃÁËÏÖÔÚÄã¿ÉÒÔÖØÐÂÆô¶¯ÄãµÄµçÄÔÁË°¡¡£Õâ¸öʱºòÄã¾Í»á·¢ÏÖÄãµÄLinuxϵͳ»áÓÐÁ½¸öÄںˡ£È»ºóÑ¡ÖÐеÄÄÚºËÆô¶¯À´¿´Ò»Ï°ɡ£

×÷Õߣº³Éº£·å

[ ±¾Ìû×îºóÓÉ Desktop ÓÚ 2008-4-22 12:54 ±à¼­ ]
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ