linux training in Thailand
| Home | Articles | Download | Free Linux Tips | Resources | Training | Web Link | Linux Training English|
| Courses | Schedule | Price & Promotion | Map | Customer Ref. | Instructors | Certification | FAQ | Registration Form |
ʶҺѹ 駻Դӡҧѹ 27 -31 áҤ 2558 Դӡûѹ 3 ԧҤ 2558
We are on vacations 5 days in July 27-31, 2015 Please contract Line ID : nok_fly or e-mail : info@itdestination.com
ITDestination лԴѺا䫵 ѹ 7 - 9 Զع¹ 2556
Ҩзҹ㹺ԡ Webboard Freetips E-Learning ֧㹤дǡ
ʶҺѹ 駻Դӡѹ 22-28 Ҿѹ 2560 ШԴӡûѹ 1 չҤ 2560
óյԴ觢ͤҷ Facebook: LinuxITDestination e-mail: info@itdestination.com 觨еԴ͡Ѻҳ 17.00 .
ŧ¹ͺöӢͺ online 㹪ǧͺͷǹ ӡѴӹǹ բ·١ͧй
ͺ´ 089 890-5494 >>> ҹ´...

ReCompile Kernel лʹ¡ҷسԴ

ѷ ʵ , RHCE



㹺ôչءʷԺǪ蹵ҧ աйҹѹѨغѹ ǹվ鹰ҹӤѭѹǡѹ Ţͧ GNU/Linux ҧкԺѵԡ ǹСͺͺҧѹ ٷԵ ;प蹵ҧ «Ϳ㹡 Open Source/Free Software º͹Ѻ㨢ͧкԺѵԡ ( Kernel ) ֧ٹҧͧûż èѴ÷Ѿҡ÷к ѧ鹤سѵҧͧк֧١˹㹵Źͧ ö㹡÷ӧҹѺкѴҧ ⵤѺҹҹâ ͢ 件֧ëѾػóҹҪԴա ѭ˹Ѻѡ֡չءѡлʺѺѭҡõԴ駤͹ԡ ҹչءҾѭҵҧ ҡ ͹ӻѭҹͺ䫵ҧ http://www.pantip.com ѡж١ Ժ¡ͧͧҧ ͷ¡ҡä ( Kernel Recompilation ) Ը䢻ѭ蹺ҧҧ 駻ѭҷǢͧ ǢͧѺ Ѻ㨢ͧ价ѡзҺ ҡ÷áѺͧ͹ҧ§͡ҧкҧҡ ѧ 㨾ԡչءѹ仡 Ѻͧäػä֡͡չء¤Ѻ ͧԴ ǤسзҺҡäŧлʹ¡ҷسԴҡ ҧ ( Kernel Recompilation ) Update Kernel ҧ ( Kernel Recompilation ) 繡ùŢͧкѨغѹҹһѺا ͷԴդسѵԵçͧҡ觢 ¡ҧŢͧ Red Hat Linux 7.2 - 7.3 ʹѺʹع÷ӧҹѺкѴ쪹Դ NTFS ѧҡسͧ ҹسѵԹеͧ recompile ŻѨغѹ 觨繵ͧŧͤͧöԸա ͧҡسѵǡѺкѴ㹴ʡ蹹еͧ¡ëѾ쵨ҡµç) աóշᵡҧ͡仨ҡҧҧ鹡Ǥ 䢤سѵԺҧҧդǢͧѺµç ҧҨԸաҧµͧ ŷҹФº ҡʷԺǪ蹫觨ա駡ûѺاҺҧͷҧ䫵 öǹŴ Դҹ ѹ ͧӡäͧ ó蹹¡ Ѿവ ( Updating Kernel ) 㹡óբͧ RedHat 7.3 ҾѺ 2.4-18-3 ҵաûѺا 2.4.18-4 2.4.18-10 ӴѺ աûѺا㹴ҹʹ·٧ ҹöҹ´дǹŴŷᾤࡨԴ RPM ҡ http://www.redhat.com/support/errata/ Ѿവ§´ kernel recompilation ¶֧ҧµǼҹͧ ᵡҧҡ update kernel §ôǹŴٻ ҵԴҹ
شʧлªѧҡҧ
  1. ŴҴͧŧ ŷҧʷԺǪ蹵ҧ 鹨С˹سѵҧҧ öԴ駷ӧҹѺء ҾǴ 駴ҹҡ ѡɳСҹʷͻ ֧դسѵҡԹͧ ҡöѴسѵԷ͡仺ҧ Ъ颹ҴͧšзѴѴ ŴǢ Ѵ˹¤ еͧ¹͡ ( .o ) Ŵŧҡ

  2. سѵԢسѵԺҧҧʹҨж١Դ ( disable ) ͷӧҹѡɳ Loadable kernel module ͨеͧŴ仡͹֧зӧҹ öسѵԹ ͷӧҹ Ǵ§͵ѡɳСҹ äЪسѵҹҧ 件֧ ѧҡ͹ա

  3. Ѻ觤Ҿ㹡ùչءҹ੾дҹ繼Եѳٻ ûѺ觤Ҿ Ẻ੾СԨ optimize к÷ӧҹҧ繾 ö˹дѺ蹡ѹ


˹ҧŢͧ Red Hat ҹԧС˹ /boot Boot Loader ŴкǢͧѺúٵк ҡ觹 仴 /boot ͧŪ

vmlinuz-2.4.18-3


ǹ鹩Ѻ Ф͹ԡǢͧѺä Ũ¡͡ /usr/src/linux-2.4 鹩ѺѧǨҵԴᾤࡨ kernel-source.2.4.x.y.rpm ¡͹ ·Ţ 2.4.x-y 蹢ͧդ´ѧ Ţá ( 2 ) ¡ major version number ʴ֧¹ŧ蹢ͧ ǹ¹ҧҡ աô䫹çҧͺ 繵 Ţѡͧ ( 4 ) ¡ minor version number դ 2 С Сá¶֧繡 revision 駷 4 ͧ major version 2 ա¶֧ ҡյŢŢ ¶֧ 蹷ó stable version ҡŢ ¶֧ 蹹鹡ѧҧþѲ developmental version Ţѡ ( x ) ¡ patch level ͤ¶֧ ӴѺͧ ѺاسѵԢͧ蹹§硹ҹ Ţѡش ( y ) ǹ¡ Extraversion number ŢТͤǹʴᵡҧҧŷѺ Фµͧ ѺŷҵԴ Ҩй㹡÷ͧͧ㹪ǧ令Ѻ
ŧҧͧ ͹鹵͹äŴµͧ ¹ТԺ¡óյҧ 繡ó֡ҨҡѭҡѾ к쪹Դ NTFS ͧ Red Hat Linux 7.3 ¡˹شʧͧäöҹԪẺ NTFS ͧ Windows XP/NT/2000 Դͧǡѹ ¡˹ Kernel ҡ 2.4.18-3 2.4.18-3ntfs 鹷ͧǨͺ١͹ᾤࡨǢͧú ¤ rpm -qa | grep "ᾤࡨ" ªᾤࡨմѧ



ҡѧըеͧԴ¡͹¤ rpm -ivh ҡ蹫մشԴ駢ͧ Red hat Linux ͵Դᾤࡨѧ ºǨ礷 /usr/src/linux-2.4 Դ 觾鹷㹹繷Ѻ Makefile Ѻä੾ ѧ鹡áзӤ make 觧ҹǢͧѺä make menuconfig make dep еͧзӷҹ # cd /usr/src/linux-2.4

͹ԡѺ˹سѵԢͧ kernel .config յ鹩Ѻ /usr/src/linux-2.4/configs 礷 繤ҵðҹͧŢͧ Red hat Ѻʶһѵ¡ҧ
ѧҨ֧ͧѧ ҡ͹ԡԴ¹ §ҡ硷¹ .config ͡ default Ѻա ͧäҵ͡Ẻ default ѺѺẺ i686 §Ӥ # cp config/kernel-2.4.18-i686.config .config ˹سѵ ÷С˹سѵԵҧ еͧҧ .config ¡͹ Red Hat ͧͷЪ㹡ä͹ԡǶ֧ 3 Ẻ ( ͡ԸԸ˹觡 ) make config 繡á˹سѵ¡öͺТ ҨФú make menuconfig ٷµ͡ҹö˹سѵԵҧ ͡ check box ˹ҨẺ Text Mode make xconfig ¡ѹѺẺͧѡɳẺ GUI ʹѺʹع mouse зӧҹ X Window ҡٻ 繡 make menuconfig óյҧ 价Ǣ File Systems ͡͡ NTFS support ҡͧúѹ֡Ŵ






ѧҡͧ͡͡ ͡ Exit ͡Ҩ֧˹Ҩشͺ Yes ͺѹ֡ҷ 觤ҵҧ ͡кѹ֡ŧ .config ѧҡ䢢ͤ趹Ѵ vi, pico Դ /usr/src/linux.2.4/makefile 䢺÷Ѵͤ EXTRAVERSION=-3ntfs ( ¶֧ kernel ѺѺ NTFS ੾ ) Ǻѹ֡


繡äŵӴѺ觴ѧ

make dep 繡õǨͺѴ source code make clean 繡źҧԴ鹨ҡä駡͹˹ҹ ( 㹡óշ¤ҡ͹Ǥ˹ ) make bzImage 繡ҧ㹪 bzImage ´͡¤ make menuconfig ŢͧԴ鹹礷 /usr/src/linux-2.4/arch/i386/boot Ҩ觧ҹ make 3 ҧӧҹ㹤¤觴ѧ # cd /usr/src/linux-2.4/ # make dep clean bzImage 2> errors make дԹ鹵͹ 3 鹵ӴѺ 红ͤǡѺ Warning ,Error ҧ Դ /usr/src/linux-2.4/errors
ӴѺҧ¹͡ öӧҹѺ੾ ¤
make modules зӡä kernel modules ѹѹѺ͹ԡ ͧҧ make modules_install ŷҧж١ /lib ¡͡礷ҧҡ лѺŪشҹѺ kernel Ѩغѹ ( ͪش óҹ kernel ) µ駪礷 EXTRAVERSION 㹡óյҧ /lib/modules/2.4.18-3ntfs/

͹ԡͧѺúٵͧ ѧ͢鹵͹ա硹ͪúٵդó ͧҧ initial RAM DISK ͷѺ kernel ҹкٵк¤
# mkinitrd /boot/initrd -2.4.18ntfs.img 2.4.18-3ntfs
繡ҧеԴ initial ramdisk /boot ҵͧͧ symbol table ͧ价 /boot ¤
# cp /usr/src/linux-2.4/System.map /boot/system.map-2.4.18-3ntfs




ͤ Ҩеͧ ( bzImage ) 价 /boot



ҡ˹ͧ͢繤Ъ͡ѺŵǻѨغѹ֧ӡѹѺö͡ҹ LILO GRUB Boot loader ͧ ͹ش鹵͹ 繡ôնҨҤ͹ԡͧä /boot ա 㹡ҧԧѧ ( ҡѡ¡͹ж١ ҡա¡ҹ make menuconfig make xconfig ա ) ¤
# cp /usr/src/linux-2.4/.config /boot/config-2.4.18-3ntfs




ҧٵ͡ LILO
鹵͹شҨеͧҧ͡ҡҾкٵͧ ö͡ ͹ԡͧ LILO /etc/lilo.conf ҾáԨѡɳ㹤͹ԡѧٻ


ͤ㹺÷Ѵش 1 ǹѧ


ѧҡѹ֡ǨеͧѾവ MBR ( Master Boot Record ) ԩй鹨觼áѺ Boot Loader
# /sbin/lilo - v


ͷӡ÷ͧٵͧ LILO ʴ͡ ҧ linux ( ͡ ) , dos ( ͡ xp ) new 繵͡ Ѻҷͧҹ ͧ mount Ԫ蹢ͧ xp ntfs öҹͧù͡ҡ ҡǨͺٷ /proc/filesystems оªͧ͢к쪹Դҧ ntfs


.


ҡúٵкջѭԴ鹡ͧѧ§͡͡ кٵöк Ǩ֧䢻ѭҵ

áѺҺҧ ?
㹤繢ͧ价¡ѺкԺѵԡչء ä§ûѺҾͧкͧҹ ҧͧ觹ҡ Ѻ͹ 繡еͧѹ Ѻ¹ǡäԴҧʹչء ѡչءҡ觢 سѵԺҧС÷ҤҴ֧Ҩչء龺繨ҡ鹵͹äŹͧ ǹʹзҷҤ鹤֡ͧ֡ش ҡҹբй͵ͧâö䫵ͧ¹ http://www.itdestination.com ѺʴդѺ