{"id":3289,"date":"2011-09-08T12:14:49","date_gmt":"2011-09-08T04:14:49","guid":{"rendered":"http:\/\/edsionte.com\/techblog\/?p=3289"},"modified":"2011-09-16T15:29:05","modified_gmt":"2011-09-16T07:29:05","slug":"ubuntu%e4%b8%8b%e7%bc%96%e8%af%913-0-4%e5%86%85%e6%a0%b8","status":"publish","type":"post","link":"http:\/\/edsionte.com\/techblog\/archives\/3289","title":{"rendered":"Ubuntu\u4e0b\u7f16\u8bd13.0.4\u5185\u6838"},"content":{"rendered":"<p>Linux\u5185\u68383.0\u7248\u672c\u53d1\u5e03\u5df2\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u4e0d\u77e5\u9053\u8fd9\u4e2a\u7248\u672c\u53f7\u5927\u8dc3\u8fdb\u7684\u5185\u6838\u662f\u5426\u597d\u7528\u3002\u76ee\u524d\u5404\u4e2a\u53d1\u884c\u7248\u7684linux\u8fd8\u4ecd\u672a\u91c7\u75283.0\u7684\u5185\u6838\uff0c\u56e0\u6b64\u53ef\u4ee5\u81ea\u5df1\u52a8\u624b\u7f16\u8bd1\u5185\u6838\u6765\u611f\u53d7\u4e00\u4e0b\uff01\u8d81\u7740\u8fd9\u6b21\u7f16\u8bd1\u5185\u6838\u7684\u673a\u4f1a\u53ef\u4ee5\u518d\u719f\u6089\u4e00\u4e0b\u7f16\u8bd1\u5185\u6838\u7684\u6b65\u9aa4\u3002<\/p>\n<h3>1.\u4e0b\u8f7d\u5e76\u89e3\u538b\u5185\u6838\u5230\u4efb\u610f\u76ee\u5f55<\/h3>\n<p>\u4ece\u6e90\u7801\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7684\u5185\u6838\u6e90\u78013.0.4\uff0c\u53ef\u4ee5\u89e3\u538b\u81f3\u4efb\u610f\u76ee\u5f55\uff0c\u6211\u653e\u5728\u4e3b\u76ee\u5f55\u4e0b\uff1a<\/p>\n<pre class=\"brush:c\">~$ tar xjvf linux-3.0.4.tar.bz2<\/pre>\n<h3>2.\u914d\u7f6e\u5185\u6838<\/h3>\n<p>\u5bf9\u5185\u6838\u8fdb\u884c\u914d\u7f6e\u662f\u4e3a\u4e86\u5f97\u5230\u5185\u6838\u914d\u7f6e\u6587\u4ef6.config\u3002\u901a\u8fc7\u5bf9\u5185\u6838\u8fdb\u884c\u914d\u7f6e\uff0c\u53ef\u4ee5\u4f7f\u672a\u6765\u7f16\u8bd1\u6210\u529f\u7684\u5185\u6838\u589e\u52a0\u6216\u51cf\u5c11\u5bf9\u4e00\u4e9b\u5185\u6838\u7279\u6027\u7684\u652f\u6301\u3002\u5bf9\u5185\u6838\u8fdb\u884c\u914d\u7f6e\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u6709\u57fa\u4e8e\u6587\u672c\u7684\u914d\u7f6e\u65b9\u5f0f\u4e5f\u6709\u57fa\u4e8e\u56fe\u5f62\u7684\u7528\u6237\u754c\u9762\u3002\u4e0b\u9762\u91c7\u7528\u4f7f\u7528\u6bd4\u8f83\u5e7f\u6cdb\u7684make menuconfig\u65b9\u5f0f\uff1a<\/p>\n<pre class=\"brush:c\">~\/linux-3.0.4$sudo apt-get install libncurses5-dev\r\n~\/linux-3.0.4$sudo make menuconfig<\/pre>\n<p>\u7531\u4e8e\u8be5\u914d\u7f6e\u65b9\u5f0f\u57fa\u4e8encurses\u5e93\uff0c\u6240\u4ee5\u5728\u542f\u52a8\u914d\u7f6e\u754c\u9762\u524d\u8981\u5148\u5b89\u88c5ncurses\u5e93\u3002\u542f\u52a8\u914d\u7f6e\u754c\u9762\u524d\uff0c\u5fc5\u987b\u8fdb\u5165\u6e90\u7801\u6839\u76ee\u5f55\uff0c\u914d\u7f6e\u754c\u9762\u542f\u52a8\u6210\u529f\u540e\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><a href=\"http:\/\/edsionte.com\/techblog\/archives\/3289\/screenshot-edsionteedsionte-desktop-linux-3-0-4\" rel=\"attachment wp-att-3296\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3296\" title=\"Screenshot-edsionte@edsionte-desktop: ~-linux-3.0.4\" src=\"http:\/\/edsionte.com\/techblog\/wordpress\/wp-content\/uploads\/2011\/09\/Screenshot-edsionte@edsionte-desktop-linux-3.0.4-300x179.png\" alt=\"\" width=\"300\" height=\"179\" srcset=\"http:\/\/edsionte.com\/techblog\/wordpress\/wp-content\/uploads\/2011\/09\/Screenshot-edsionte@edsionte-desktop-linux-3.0.4-300x179.png 300w, http:\/\/edsionte.com\/techblog\/wordpress\/wp-content\/uploads\/2011\/09\/Screenshot-edsionte@edsionte-desktop-linux-3.0.4-1024x613.png 1024w, http:\/\/edsionte.com\/techblog\/wordpress\/wp-content\/uploads\/2011\/09\/Screenshot-edsionte@edsionte-desktop-linux-3.0.4.png 1069w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u6211\u4eec\u8fd9\u91cc\u5bf9\u5185\u6838\u6309\u7167\u9ed8\u8ba4\u7684\u914d\u7f6e\u65b9\u5f0f\u8fdb\u884c\u7f16\u8bd1\uff0c\u56e0\u6b64\u5f53\u914d\u7f6e\u83dc\u5355\u542f\u52a8\u540e\u76f4\u63a5\u9000\u51fa\u5e76\u4fdd\u5b58\u5373\u53ef\u3002\u6b64\u65f6\u5c31\u5728\u5185\u6838\u6e90\u7801\u6839\u76ee\u5f55\u4e0b\u751f\u6210\u4e86.config\u6587\u4ef6\u3002<\/p>\n<h3>3.\u7f16\u8bd1<\/h3>\n<p>\u7f16\u8bd1\u5185\u6838\u5305\u542b\u4e24\u90e8\u5206\u7684\u5de5\u4f5c\uff0c\u5176\u4e00\u662f\u7f16\u8bd1\u5185\u6838\uff0c\u5373\u7f16\u8bd1\u914d\u7f6e\u9009\u9879\u4e2d\u6807\u8bb0\u4e3aY\u7684\u90a3\u90e8\u5206\uff0c\u8fd9\u90e8\u5206\u5185\u6838\u6700\u7ec8\u5f62\u6210bzIamge\u955c\u50cf\u6587\u4ef6\uff1b\u5176\u4e8c\u662f\u7f16\u8bd1\u5185\u6838\u6a21\u5757\uff0c\u5373\u7f16\u8bd1\u914d\u7f6e\u9009\u9879\u4e2d\u6807\u8bb0\u4e3aM\u7684\u90a3\u90e8\u5206\u5185\u6838\uff0c\u8fd9\u90e8\u5206\u5f62\u6210\u4ee5.ko\u7ed3\u5c3e\u7684\u5185\u6838\u6a21\u5757\u76ee\u6807\u6587\u4ef6\u3002<\/p>\n<p>\u4e0a\u8ff0\u4e24\u90e8\u5206\u7f16\u8bd1\u5de5\u4f5c\u53ef\u4ee5\u4f9d\u6b21\u901a\u8fc7make bzImage\u548cmake modules\u5b8c\u6210\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4e00\u6761make\u547d\u4ee4\u76f4\u63a5\u5b8c\u6210\u3002\u7f16\u8bd1\u5185\u6838\u7684\u6574\u4e2a\u8fc7\u7a0b\u6bd4\u8f83\u6f2b\u957f\uff0c\u56e0\u6b64\u53ef\u4ee5\u5bf9make\u52a0-j\u53c2\u6570\u6765\u63d0\u9ad8\u7f16\u8bd1\u7684\u6548\u7387\u3002\u5728make\u65f6\u4f7f\u7528\u8be5\u9009\u9879\u4f1a\u4e3a\u7f16\u8bd1\u8fc7\u7a0b\u5206\u914dn\u4e2a\u5e76\u53d1\u4efb\u52a1\uff0c\u8fd9\u6837\u53ef\u4ee5\u7f29\u77ed\u7f16\u8bd1\u65f6\u95f4\u3002n\u7684\u53d6\u503c\u4e3acpu\u4e2a\u6570\u7684\u4e8c\u500d\u3002<\/p>\n<pre class=\"brush:c\">~\/linux-3.0.4$sudo make -j4<\/pre>\n<h3>4.\u5b89\u88c5<\/h3>\n<p>\u5b89\u88c5\u8fc7\u7a0b\u5206\u4e3a\u4e24\u90e8\u5206\uff0c\u9996\u5148\u5bf9\u5185\u6838\u6a21\u5757\u8fdb\u884c\u5b89\u88c5\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u4f1a\u5c06\u521a\u521a\u7f16\u8bd1\u5185\u6838\u6a21\u5757\u65f6\u751f\u6210\u7684\u5185\u6838\u6a21\u5757\u590d\u5236\u5230\/lib\/modules\/3.0.4\/\u76ee\u5f55\u4e0b\uff0c\u5176\u4e2d3.0.4\u4e3a\u5bf9\u5e94\u7684\u5185\u6838\u7248\u672c\u3002\u4f7f\u7528\u7684\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<pre class=\"brush:c\">~\/linux-3.0.4$sudo make modules_install<\/pre>\n<p>\u63a5\u7740\u4f7f\u7528\u4e0b\u8ff0\u547d\u4ee4\u5b89\u88c5\u7f16\u8bd1\u597d\u7684\u5185\u6838\uff1a<\/p>\n<pre class=\"brush:c\">~\/linux-3.0.4$sudo make install<\/pre>\n<p>\u5b89\u88c5\u5185\u6838\u7684\u8fc7\u7a0b\u4e3b\u8981\u5b8c\u6210\u4e86\u4ee5\u4e0b\u7684\u5de5\u4f5c\uff1a<\/p>\n<p><strong>1.\u5c06\u7f16\u8bd1\u5185\u6838\u65f6\u751f\u6210\u7684\u5185\u6838\u955c\u50cfbzImage\u62f7\u8d1d\u5230\/boot\u76ee\u5f55\u4e0b\uff0c\u5e76\u5c06\u8fd9\u4e2a\u955c\u50cf\u547d\u540d\u4e3avmlinuz-3.0.4\u3002\u5982\u679c\u4f7f\u7528x86\u7684cpu\uff0c\u5219\u8be5\u955c\u50cf\u4f4d\u4e8earch\/x86\/boot\/\u76ee\u5f55\u4e0b\uff08\u5904\u4e8e\u6b63\u5728\u7f16\u8bd1\u7684\u5185\u6838\u6e90\u7801\u4e0b\uff09\u3002<\/strong><\/p>\n<p><strong>2.\u5c06~\/linux-3.0.4\/\u76ee\u5f55\u4e0b\u7684System.map\u62f7\u8d1d\u5230\/boot\/\u76ee\u5f55\u4e0b\uff0c\u91cd\u65b0\u547d\u540d\u4e3aSystem.map-3.0.4\u3002\u8be5\u6587\u4ef6\u4e2d\u5b58\u653e\u4e86\u5185\u6838\u7684\u7b26\u53f7\u8868\u3002<\/strong><\/p>\n<p><strong>3.\u5c06~\/linux-3.0.4\/\u76ee\u5f55\u4e0b\u7684.config\u62f7\u8d1d\u5230\/boot\/\u76ee\u5f55\u4e0b\uff0c\u91cd\u65b0\u547d\u540d\u4e3aconfig-3.0.4\u3002<\/strong><\/p>\n<h3>5.\u521b\u5efainitrd.img\u6587\u4ef6<\/h3>\n<p>initrd.img\u5373\u4e3a\u521d\u59cb\u5316\u7684ramdisk\u6587\u4ef6\uff0c\u5b83\u662f\u4e00\u4e2a\u955c\u50cf\u6587\u4ef6\uff0c\u5c06\u4e00\u4e9b\u6700\u57fa\u672c\u7684\u9a71\u52a8\u7a0b\u5e8f\u548c\u547d\u4ee4\u5de5\u5177\u6253\u5305\u5230\u955c\u50cf\u6587\u4ef6\u91cc\u3002\u8be5\u955c\u50cf\u6587\u4ef6\u7684\u4f5c\u7528\u662f\u5728\u7cfb\u7edf\u8fd8\u6ca1\u6709\u6302\u8f7d\u6839\u5206\u533a\u524d\uff0c\u7cfb\u7edf\u9700\u8981\u6267\u884c\u4e00\u4e9b\u64cd\u4f5c\uff0c\u6bd4\u5982\u6302\u8f7dscsi\u9a71\u52a8\uff0c\u6b64\u65f6\u5c06initrd\u6587\u4ef6\u91ca\u653e\u5230\u5185\u5b58\u4e2d\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u865a\u62df\u7684\u6839\u5206\u533a\uff0c\u7136\u540e\u6267\u884c\u76f8\u5173\u811a\u672c\uff0c\u8fd0\u884cinsmod\u547d\u4ee4\u52a0\u8f7d\u9700\u8981\u7684\u6a21\u5757\u3002<\/p>\n<p>\u5177\u4f53\u7684\u521b\u5efa\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre class=\"brush:c\">~\/linux-3.0.4$sudo mkinitramfs 3.0.4 -o \/boot\/initrd.img-3.0.4<\/pre>\n<h3>6.\u66f4\u65b0grub<\/h3>\n<p>\u6700\u540e\u4e00\u6b65\u5219\u662f\u66f4\u65b0grub\u542f\u52a8\u83dc\u5355\uff0c\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u5219\u53ef\u4ee5\u81ea\u52a8\u66f4\u65b0\u542f\u52a8\u83dc\u5355\uff1a<\/p>\n<pre class=\"brush:c\">sudo update-grub2<\/pre>\n<p>\u8fd9\u6837\u4f1a\u5c06\u521a\u624d\u7f16\u8bd1\u597d\u7684\u5185\u6838\u653e\u5728\u542f\u52a8\u83dc\u5355\u7684\u9996\u4f4d\uff0c\u5982\u679c\u9700\u8981\u4fee\u6539\u542f\u52a8\u83dc\u5355\u4e2d\u9ed8\u8ba4\u7cfb\u7edf\u7684\u542f\u52a8\u987a\u5e8f\uff0c\u5219\u4fee\u6539\/boot\/grub\/grub.cfg\u6587\u4ef6\u4e2d\u7684set default=\u7684\u503c\u5373\u53ef\u3002<\/p>\n<p>OK\uff0c\u5185\u6838\u7f16\u8bd1\u5b8c\u6bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u5185\u68383.0\u7248\u672c\u53d1\u5e03\u5df2\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u4e0d\u77e5\u9053\u8fd9\u4e2a\u7248\u672c\u53f7\u5927\u8dc3\u8fdb\u7684\u5185\u6838\u662f\u5426\u597d\u7528\u3002\u76ee\u524d\u5404\u4e2a\u53d1\u884c\u7248\u7684linux\u8fd8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[205],"tags":[108,181,251],"class_list":["post-3289","post","type-post","status-publish","format-standard","hentry","category-205","tag-linux","tag-181","tag-251"],"views":31301,"_links":{"self":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/posts\/3289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/comments?post=3289"}],"version-history":[{"count":0,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/posts\/3289\/revisions"}],"wp:attachment":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/media?parent=3289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/categories?post=3289"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/tags?post=3289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}