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

LinuxϵͳÄÚºËÉý¼¶Óë²Ã¼ô

·¢²¼Ê±¼ä:2011-05-22 21:49:04À´Ô´:ºìÁª×÷Õß:halazi100
[i=s] ±¾Ìû×îºóÓÉ halazi100 ÓÚ 2011-12-25 23:53 ±à¼­ [/i]

×¢£ºÇëÉ÷ÖزÙ×÷
1¡·Éý¼¶Ç°×¼±¸

1¡¢È·ÈÏÄ¿Ç°°æ±¾£¬±ÜÃâÖظ´Éý¼¶

[root@free root]# uname -r

2¡¢ÏÂÔØϵͳÄÚºË

°æ±¾È·ÈϺó£¬ÈôÓÐÉý¼¶±ØÒª£¬¾ÍÒªÏÂÔØϵͳÄÚºË

ÍƼöµ½www.kernel.org»òwww.Tux.orgÏÂÔØ¡£×¢ÒâlinuxµÄÄÚºËÓвâÊÔ°æºÍÕýʽ°æ¡£

3¡¢Á˽âÓ²¼þ»·¾³£¬ÖªµÀ×Ô¼ºµÄ¼ÆËã»úÄÚ¾¿¾¹°²×°ÁËÄÄЩ½Ó¿ÚÉ豸£¬Ã¿ÏîÓ²¼þ×ÊÔ´ËùʹÓõÄϵͳ×ÊÔ´£¬ÓÈÆäÊÇÊÊÅäÆ÷¡¢¿ØÖÆ¿¨Ê¹ÓõÄIRQ¡¢DMAÒÔ¼°I/O Address¡£

4¡¢½âѹÄÚºËÎļþ£¬ÒÔlinux-2.6.40.tar.gzΪÀý

#tar zxvf linux-2.6.40.tar.gz

#cp -R linux-2.6.40 /usr/scr/my-2.6.40-kernel ½«½âѹºóµÄlinuxĿ¼¸´ÖƵ½´æ·ÅÄÚºËÔ´ÂëµÄ/usr/srcĿ¼£¬²¢½«Ä¿Â¼Ãû¸ÄΪmy-2.6.40-kernel

#cd /usr/src

#ln -s my-2.6.40-kernel linux ½«my-2.6.40-kernelĿ¼Á´½Óµ½linux£¬µ½´Ë×¼±¸¾ÍÐ÷£¬¿ªÊ¼Éý¼¶Äںˣ¬²¢±àÒëÄÚºËÎļþ¡£

2¡· Äں˵Ķ¨ÖÆ

Çл»µ½·ÅÖÃÄÚºËÔ´´úÂëµÄĿ¼# cd /usr/scr/linux

Ê×ÏÈÇå³ýÄÚºËÔ´´úÂëÊ÷#make mrproper

Ñ¡Ôñ¶¨ÖÆ·½Ê½£º1¡¢Îı¾½»»¥·½Ê½ #make config

2¡¢Îı¾´°¿Ú½»»¥·½Ê½ #make menuconfig

3¡¢Í¼Ðδ°¿Ú½»»¥·½Ê½ #make xconfig ¡ûʹÓÃͼÐνçÃæ½øÐÐÉèÖÃ

4¡¢Ê¹ÓÃÏÖÓÐÅäÖÃÎļþ #make oldconfig

ÒÔͼÐνçÃæ½øÐÐÉèÖÃΪÀý£º#make xconfig

Á¢¼´»á³öÏÖLinux Kernel Configuration¶Ô»°¿ò¡£µ¥»÷ÈÎÒ»¸ö·ÖÀàµÄ°´Å¥£¬¾Í»á³öÏÖ¸ÃÀàµÄ¶Ô»°¿ò¡£¶Ô»°¿òÖеÄÎÊÌâ¾ÍÊÇϵͳ¹¦ÄܵÄÉèÖ㬱ØÐëÒÀ¾Ýʵ¼ÊÇéÐλشð¡£ÔÚÿ¸öÎÊÌâµÄÇ°Ã涼»áÓÐÈý¸öÑ¡Ïy¼´yes±íʾÆô¶¯¸ÃÏÄÜ£»m¼´module£¬±íʾ¸ÃÏÄܿɱàÒë³É¹¦ÄÜÄ£¿é£¬È»ºóÒÔÍâ¹ÒµÄ·½Ê½¼ÓÔØ£¬ÎÞÐèÔÚ±àÒëʱ·ÅÈëϵͳÄںˣ¬²¢·ÇËùÓеŦÄܶ¼¿ÉÄ£¿é»¯£¬¼ÙÈç¸ÃÏÄÜÎÞ·¨±àÒë³ÉÄ£¿é£¬Ôò´Ë´¦µÄÑ¡Ïî»á±ä³É¡°-¡±ºÅ£»n¼´no±íʾ¹Ø±Õ¸ÃÏÄÜ¡£Ä³Ð©¹¦Äܱ˴ËÖ®¼ä´æÔÚ׏ØÁªÐÔ£¬µ±¹Ø¼üÐÔ¹¦ÄܵÄÑ¡Ïî±»¹Ø±Õºó£¬Ïà¹ØµÄ¹¦Äܱ㲻Æð×÷Ó㬴ËʱÕâЩÏà¹Ø¹¦ÄܵÄ×ÖÌåÑÕÉ«¶¼»á±ä³É»ÒÉ«£¬±íʾ²»ÄÜÑ¡Ôñ»òÎÞ·¨ÉèÖá£

3¡·ÄÚºËÓëÄ£¿é±àÒëÓë°²×°

1¡¢Éú³ÉÒÀÀµ¹Øϵ #make dep

2¡¢±àÒëÄÚºË #make bzImage

3¡¢±àÒëÄ£¿é #make modules

4¡¢°²×°Ä£¿é #make modules_install

5¡¢°²×°Ð±àÒëµÄÄÚºË #make install

4¡·²é¿´¸üÐÂÅäÖõÄÎļþ

¿ÉÒԲ鿴ÐÂÄÚºË #ls /boot/vmlinuz*

5¡·Ä£¿éµÄ°²×°Óë¹ÜÀí

1¡¢±àÒëÄÚºËÄ£¿é #make modules

2¡¢°²×°ÒѱàÒëÄ£¿é #make modules_install

#depmod -a ¡û°²×°±àÒëÍê³ÉµÄÄ£¿é

±àÒëÍê³ÉµÄϵͳÄÚºËbzImage»òzImageÎļþ£¬·ÅÖÃÓÚ/usr/src/linux/arch/i386/bootĿ¼Ï¡£Ö´ÐÐmake bzImageÃüÁîÊÇΪÁ˱ÜÃâËù±àÒë³öÀ´µÄÄں˹ýÓÚÅӴ󣬶øµ¼Ö±àÒë¹ý³Ìʧ°Ü£»Ê¹ÓÃmake zImageÃüÁî½øÐбàÒëʱ²úÉúµÄÄں˽ϴ󣬵«ÔÚϵͳÆô¶¯Ê±µÄÐÔÄÜ»á½ÏºÃ¡£

ÓÐʱÒòΪÍâ¹ÒÄ£¿éµÄ¹Øϵ£¬±ØÐëÖؽ¨initrdÎļþ£¬Ö´ÐÐmkinitrd /boot/initrd £¨Äں˰汾£©ÃüÁî¼´¿É£¬È磺mkinitrd /boot/initrd 2.6.40 £»Óû§¿ÉÒÔÖ´ÐÐmake zdisk£¨»òmake bzdisk£©ÃüÁî±àÒëϵͳÄںˣ¬²¢´´½¨Òýµ¼ÅÌ¡£

6¡·¸ü»»ÄÚºË

±àÒëÄÚºËÖ®ºó²¢²»´ú±íÒ»Çй¤×÷¶¼ÒѾ­Íê³É£¬»¹ÐèÒª¸ü»»ÐµÄÄںˡ£ÓÉÓÚеÄϵͳÄں˿ÉÄܵ¼ÖÂϵͳÎÞ·¨Æô¶¯£¬ËùÒÔÇëÏȱ¸·ÝÎļþÓëÖØÒªÊý¾Ý£¬²¢×¼±¸ºÃlinuxÒýµ¼ÅÌÒÔ·ÀÍòÒ»¡£½¨ÒéÏȽ«/bootĿ¼ÏµÄËùÓÐÎļþ×ö±¸·Ý£¬²¢ÓÃmkbootdiskÃüÁîÖÆ×÷Òýµ¼ÅÌ¡£

¿É°´ÒÔϲ½Öè¸ü»»ÏµÍ³Äںˣº

[root@free linux]# cd /boot

[root@free root]# rm System.map

[root@free root]# rm vmlinuz

[root@free root]# mv /usr/src/linux/System.map System.map

[root@free root]# mv /usr/src/linux/arch/i386/boot/bzImage./vmlinuz

Èç¹ûÓÃGrubÀ´¹ÜÀí¿ª»ú£¬¾ÍÓÃÎı¾±à¼­Æ÷ÐÞ¸Ä/boot/grub/menu.lstÎļþ£º

default=0 #ĬÈÏÆô¶¯µÚÒ»Ïî

timeout=3 #Æô¶¯²Ëµ¥Ñ¡ÔñµÈ´ýʱ¼ä£¬³¬¹ý´Ëʱ¼äϵͳ×Ô¶¯Æô¶¯Ä¬ÈÏÏî
splashimage=(hd0,8)/boot/grub/splash.xpm.gz #Ö¸¶¨ÏµÍ³Æô¶¯»­Ãæ
hiddenmenu #Òþ²Ø²Ëµ¥Ñ¡ÔñÏî
title Linux(new) #Ìí¼ÓϵͳÆô¶¯²Ëµ¥Ñ¡ÔñÏîLinux(new)
root (hd0,8) #¸ùĿ¼λÓÚµÚÒ»Ó²ÅÌ£¬±àºÅΪ8µÄ·ÖÇø
kernel /boot/vmlinuz #Ö¸¶¨Æô¶¯ÄÚºË
initrd /boot/initrd.img #Ö¸¶¨ÏµÍ³Æô¶¯Ê±³õʼ»¯Îļþ
title Linux(Old) #ϵͳÆô¶¯²Ëµ¥Ñ¡ÔñÏîLinux(Old)£¬Ô­À´µÄϵͳÆô¶¯Ï½¨ÒéÏȱ£Áô
root (hd0,8) #¸ùĿ¼λÓÚµÚÒ»Ó²ÅÌ£¬±àºÅΪ8µÄ·ÖÇø
kernel /boot/vmlinuz-2.6.35.11-83.fc14.x86_64 ro root=UUID=7a610e29-e8f4-4851-8587-6a8c323ed87b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYTABLE=us rhgb quiet

#Ö¸¶¨Æô¶¯Äں˼°°æ±¾


initrd /boot/initramfs-2.6.35.11-83.fc14.x86_64.img
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 27 ÌõÆÀÂÛ

  1. wd152 ÓÚ 2013-01-10 19:55:04·¢±í:

    ¶¨Ò»¸ö£¬£¬£¬£¬£¬

  2. adlink ÓÚ 2012-12-21 13:10:57·¢±í:

    ºÃÊéѧϰÖÐ

  3. gky2009514 ÓÚ 2012-12-07 13:22:17·¢±í:

    ÐÂÊÖÍê³ÉÈÎÎñ£¬ÇóÏÂÊé¼®~

  4. linuxtro ÓÚ 2012-05-31 14:17:37·¢±í:

    ²»´í°¡

  5. Lee2012 ÓÚ 2012-02-15 15:42:39·¢±í:

    ѧϰ

  6. qwyan456 ÓÚ 2012-02-07 00:32:44·¢±í:

    ÓеãÔβˣ¬Ñ§Ï°ÖС£

  7. haiwawa ÓÚ 2011-12-16 16:07:01·¢±í:

    ¿´¿´ ѧϰ

  8. css8899.hi ÓÚ 2011-08-26 15:03:49·¢±í:

    ÒýÓÃ:
    ²»´í°¡
    css8899.hi ·¢±íÓÚ 2011-8-26 15:03

  9. css8899.hi ÓÚ 2011-08-26 15:03:30·¢±í:

    ²»´í°¡

  10. css8899.hi ÓÚ 2011-08-26 15:03:10·¢±í:

    :0)1

  11. Enbiting ÓÚ 2011-08-17 17:24:24·¢±í:

    ¶¥Ò»ÏÂ

  12. boysgc ÓÚ 2011-08-03 15:24:20·¢±í:

    Óлú»á£¬ÊÔÊÔ=====>ÐéÄâ»ú

  13. Louis.Hu ÓÚ 2011-07-13 23:15:18·¢±í:

    LZ ÎÒÒªÏÂÎÒÒªÏÂ

  14. wbc2205 ÓÚ 2011-07-09 11:02:04·¢±í:

    ¿´×ÅÔÎÑ££¡

  15. lixupeng ÓÚ 2011-07-02 13:40:16·¢±í:

    markÊÕ²Ø

  16. a_lee ÓÚ 2011-06-30 14:34:41·¢±í:

    ¿´²»Ã÷°×

  17. caroline0712 ÓÚ 2011-06-15 23:49:05·¢±í:

    лл¥Ö÷·ÖÏí ¸Ðл£¡

  18. dllzg ÓÚ 2011-06-15 22:07:46·¢±í:

    xian shou le

  19. ybb896 ÓÚ 2011-06-09 21:50:30·¢±í:

    ²»Ã÷°×°¡£¡£¡£¡£¡

  20. okzokz123 ÓÚ 2011-06-09 20:10:24·¢±í:

    1 tar xjf XXXX.tar.bz2 (½âѹÕâ¸ö²»¶à˵ÁËÖ»ÊÇ×¢ÒâÄãÏÂÔصÄÄÚºËѹËõÊôÐÔÒÔÐ޸Ľâѹ²ÎÊý)
    2 ln -s xxxx xxx (´Ëºó²Ù×÷ÔÚxxxÀï½øÐÐ)
    3 make mrproper (ɾ³ýËùÓÐÅäÖÃÎļþºÍ*.oÎļþ)
    4 make xconfig »ò make gconfig (±àÒëÇ°µÄÅäÖÃ)
    5 make dep (É趨ÒÀÀµ¹Øϵ)
    6 make clean (È·¶¨Ô´´úÂëûÓÐÎļþ)
    7 make (±àÒëÔ´Âë ·Ç³£ºÄʱ¿ÉÒÔ³öÈ¥´ò½´ÓÍÁË)
    »ò7.1=make bzImage
    7.2=make modules
    8 make modules_install (°²×°±àÒëºÃµÄÄ£¿é)
    9 depmod -a (´´½¨Ä£¿éµÄÁ¬½Ó)
    10 cp System.map /boot/System.map-xxxx (xxxxΪ°æ±¾ºÅ)
    11 cp arch/i386/boot/bzImage /boot/vmlinuxz £¨X64µÄÔÚarch/x86_64/boot °²×°Æô¶¯Ñ¹ËõÄں˾µÏñ£©
    12 cd /boot/ (´Ëʱ¸Ä±ä¹¤×÷·¾¶µ½boot)
    13 new-kernel-pkg --mkinitrd --depmod --install 2.6.35.4 ±ØÐëÓë/lib/modules/Ŀ¼ÏÂÏàÓ¦µÄÐÂÄÚºËÎļþ¼ÐͬÃû(´´½¨Ð³õʼ»¯ram¾µÏñÎļþ)
    ubuntu: mkinitramfs -k -o /boot/initrd-2.6.35.4.img 2.6.35
    14 make install (»Øµ½Ô­makeĿ¼¼´Ç°ÃæµÄXXXĿ¼ÏÂÔٴΰ²×°¼ÓÈëvmlinux-2.6.35.4²¢×Ô¶¯Éú³ÉÆô¶¯²Ëµ¥)
    15 reboot (Äã¿ÉÒÔʹÓÃÐÂÄں˵ÄϵͳÁË)

  21. Gaga_Yan ÓÚ 2011-05-31 13:37:21·¢±í:

    (6)m:b

  22. Gaga_Yan ÓÚ 2011-05-31 11:18:26·¢±í:

    oh ,very good

  23. linjunqian ÓÚ 2011-05-28 20:01:17·¢±í:

    ͦ¸´Ôӵģ¬Ñ§Ï°

  24. your180 ÓÚ 2011-05-25 08:19:09·¢±í:

    ²»¶®

  25. GrowthÕ× ÓÚ 2011-05-23 09:47:54·¢±í:

    ¸Ðлhalazi100µÄ·ÖÏí£¬±¾Ìù¼ÓÈëµ½ÂÛ̳¶¥ÖõÄLinuxÓ¦ÓÃÌùÖÐ

  26. sloepx ÓÚ 2011-05-23 08:30:48·¢±í:

    °Ý¶ÁºÃÎÄ

  27. q7262395 ÓÚ 2011-05-23 08:08:14·¢±í:

    ÎÒÏÖÔÚÓÐÄں˿־åÖ¢£¬