{"id":127,"date":"2013-07-11T13:43:41","date_gmt":"2013-07-11T05:43:41","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=127"},"modified":"2013-07-11T13:43:41","modified_gmt":"2013-07-11T05:43:41","slug":"ubuntu%e4%b8%8b%e7%bc%96%e8%af%91linux%e5%86%85%e6%a0%b8","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/127.html","title":{"rendered":"Ubuntu\u4e0b\u7f16\u8bd1Linux\u5185\u6838"},"content":{"rendered":"<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t1.\u4fd7\u8bdd\u8bf4\uff0c\u5de5\u6b32\u5584\u5176\u4e8b\uff0c\u5fc5\u5148\u5229\u5176\u5668\u3002\u5728\u7f16\u8bd1\u5185\u6838\u524d\uff0c\u9700\u8981\u914d\u7f6e\u4e00\u4e0b\u7f16\u8bd1\u73af\u5883\uff0c\u5728\u7ec8\u7aef\u8f93\u5165:\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tsudo&nbsp;apt-get&nbsp;install&nbsp;build-essential&nbsp;kernel-package&nbsp;libncurses5-dev&nbsp;\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u5176\u4e2d\uff0cbuild-essential&nbsp;\u662f\u5b89\u88c5gcc\u7f16\u8bd1\u5668\u548cmake\u73af\u5883\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tkernel-package\u662f\u5185\u6838\u7f16\u8bd1\u6709\u5173\u7684\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tlibncurses5-dev\u662f\u4e3a\u4e86\u80fd\u914d\u7f6e\u5185\u6838\uff0c\u4e0e&nbsp;make&nbsp;menuconfig&nbsp;\u547d\u4ee4\u6709\u5173\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t2.\u4e0b\u8f7d\u6e90\u4ee3\u7801\uff1a\u53bb\u5185\u6838\u6e90\u7801\u7f51&nbsp;&nbsp;http:\/\/www.kernel.org\/&nbsp;\u4e0b\u8f7d\u81ea\u5df1\u60f3\u7f16\u8bd1\u7684\u5185\u6838\u6e90\u4ee3\u7801\uff0c\u6211\u4e0b\u8f7d\u7684\u662f\u6700\u65b0\u7684\uff0clinux-3.3.4.tar.bz2\uff0c\u5c1d\u5c1d\u9c9c\u554a\uff01\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t3.\u5c06\u5176\u62f7\u8d1d\u5230\u4e3b\u6587\u4ef6\u5939\u4e0b\u9762\uff0c\u63a5\u7740&nbsp;&nbsp;ctrl+alt+t&nbsp;\u6253\u5f00\u7ec8\u7aef\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tmkdir&nbsp;src&nbsp;&amp;&amp;&nbsp;tar&nbsp;-jxf&nbsp;linux-3.3.4.tar.bz2&nbsp;-C&nbsp;src\/\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u610f\u601d\u5c31\u662f\u5728\u4e3b\u6587\u4ef6\u5939\u4e0b\u65b0\u5efa\u4e00\u4e2a\u540d\u4e3asrc\u7684\u6587\u4ef6\u5939\uff0c\u5e76\u5c06\u6e90\u4ee3\u7801\u89e3\u538b\u5230src\u6587\u4ef6\u5939\u5185\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t4.\u4e3a\u4e86\u8fdb\u5165\u5230src\/linux-3.3.4&nbsp;\u76ee\u5f55\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1acd&nbsp;&nbsp;\/src\/linux-3.3.4&nbsp;&nbsp;\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u8fd9\u6837\u4e00\u6765\uff0c\u6211\u4eec\u7684\u5de5\u4f5c\u76ee\u5f55\u5c31\u53d8\u6210src\/linux-3.3.4\u4e86\uff0c\u4ee5\u540e\u6240\u6709\u7684\u547d\u4ee4\u90fd\u662f\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u6267\u884c\u7684\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t5.\u914d\u7f6e\u5185\u6838\u6587\u4ef6\u6bd4\u8f83\u7e41\u7410\uff0c\u4e00\u822c\u6211\u4eec\u90fd\u4f1a\u5229\u7528\u7cfb\u7edf\u5df2\u7ecf\u5b58\u5728\u7684\u5185\u6838\u914d\u7f6e\u6587\u4ef6\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tcp&nbsp;\/boot\/config-`uname&nbsp;-r`&nbsp;.\/.config&nbsp;\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u7531\u4e8e\u8fd9\u4e2a\u6587\u4ef6\u662f\u9690\u85cf\u7684\uff0c\u6240\u4ee5\u5f53\u4f60\u6267\u884c\u5b8c\u8fd9\u6761\u8bed\u53e5\uff0c\u53bb\u67e5\u770b\u8fd9\u4e2a\u6587\u4ef6\u7684\u65f6\u5019\uff0c\u662f\u770b\u4e0d\u5230\u7684\uff0c\u4f46\u5b83\u786e\u5b9e\u5b58\u5728\uff0c\u800c\u4e14\u8fd8\u5f88\u91cd\u8981\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u6ce8\uff1a\u5982\u679c\u4f60\u4e0d\u662f\u7b2c\u4e00\u6b21\u7f16\u8bd1\uff0c\u5efa\u8bae\u4f60\u9996\u5148\u6267\u884c\u8fd9\u6837\u4e00\u6761\u8bed\u53e5\uff1a&nbsp;make&nbsp;mrproper&nbsp;\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u5176\u542b\u4e49\u662f\u5c06\u4e0a\u4e00\u6b21\u7f16\u8bd1\u7684.o\u548c.config\u7b49\u76f8\u5173\u6587\u4ef6\u5220\u9664\u6389\u3002\u7136\u540e\u5728copy\u5df2\u5b58\u5728\u7684config\u6587\u4ef6\u3002\u8fd9\u4e2a\u987a\u5e8f\u4e0d\u80fd\u98a0\u5012\u3002\u5982\u679c\u98a0\u5012\u4e86\uff0c\u65b0copy\u7684config\u6587\u4ef6\u5c31\u4f1a\u88ab\u5220\u9664\u6389\u5594\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t6.&nbsp;\u914d\u7f6e\u5185\u6838\u3002\u5982\u679c\u5bf9\u5185\u6838\u7684\u914d\u7f6e\u4e0d\u719f\uff0c\u5efa\u8bae\u6267\u884c\u7b2c5\u6b65\uff0c\u5982\u679c\u5f88\u719f\u7cfb\uff0c\u7b2c\u4e94\u6b65\u53ef\u4ee5\u5ffd\u7565\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u6267\u884c\u4e00\u4e0b\u547d\u4ee4\uff1amake&nbsp;menuconfig\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u6b64\u65f6\uff0c\u4f1a\u5f39\u51fa\u5982\u4e0b\u7684\u754c\u9762\uff1a\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.datarelab.com\/blog\/content\/uploadfile\/201307\/d163ae4176484e1b6e3ad9d16dd171fa20130711054447.jpg\" width=\"500\" height=\"258\" alt=\"\" \/>\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u6700\u540e\u4e24\u9879\u662f&nbsp;Load&nbsp;an&nbsp;Alternate&nbsp;Configuration&nbsp;File&nbsp;\u548c&nbsp;Save&nbsp;an&nbsp;Alternate&nbsp;Configuration&nbsp;File&nbsp;\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u6211\u4eec\u8fdb\u5165Load&nbsp;an&nbsp;Alternate&nbsp;Configuration&nbsp;File\uff0c\u4f1a\u51fa\u73b0\u8fd9\u6837\u7684\u753b\u9762\uff1a\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.datarelab.com\/blog\/content\/uploadfile\/201307\/173101c0838fa83b6eeb4df66317619520130711054448.jpg\" width=\"500\" height=\"256\" alt=\"\" \/>\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u4fdd\u6301\u9ed8\u8ba4\u76f4\u63a5ok\u5c31\u884c\uff0c\u8fd9\u6837\u5c31\u5229\u7528\u4e86\u521a\u624d\u590d\u5236\u8fc7\u7684config\u6587\u4ef6\u3002\u4fdd\u5b58\u9000\u51fa\u5c31\u884c\u4e86\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t7.\u5f00\u59cb\u7f16\u8bd1\u5185\u6838\uff1a\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tmake&nbsp;bzImage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u7f16\u8bd1\u5927\u5185\u6838\uff0c\u5982\u679c\u4f60\u60f3\u7f16\u8bd1\u5c0f\u5185\u6838\uff0c\u53ef\u4ee5\u8fd9\u6837&nbsp;make&nbsp;zImage\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tmake&nbsp;modules&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u7f16\u8bd1\u6a21\u5757\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\tmake&nbsp;install&nbsp;modules_install&nbsp;&nbsp;&nbsp;\/\/\u5c06\u5185\u6838\u4e0e\u6a21\u5757\u76f8\u5173\u7684\u6587\u4ef6\u590d\u5236\u5230\u7cfb\u7edf\u4f4d\u7f6e\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u6ce8\u610f\uff1a\u8fd9\u4e2a\u8fc7\u7a0b\u8981\u82b1\u8d391-2\u4e2a\u5c0f\u65f6\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t8.\u5728linux-2.6\u7248\u672c\u53ca\u4ee5\u540e\uff0c\u7cfb\u7edf\u4f1a\u4e3a\u6211\u4eec\u81ea\u52a8\u751f\u6210image\u6587\u4ef6\uff0c\u6240\u4ee5\u6211\u4eec\u53ea\u9700\u8981\u67e5\u770b\u662f\u5426\u751f\u6210\u4e86\u76f8\u5e94\u7684\u6a21\u5757\u5c31\u884c\u4e86\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u8fdb\u5165boot\u6587\u4ef6\u5939\uff0c\u770b\u5230\u7cfb\u7edf\u5df2\u7ecf\u6709\u4e86config-3.3.4&nbsp;,initrd.img-3.3.4,&nbsp;System.map-3.3.4,vmlinuz-3.3.4&nbsp;&nbsp;,\u8fd9\u8bf4\u660e\u5185\u6838\u5df2\u7ecf\u751f\u6210\u5b8c\u6bd5\u3002\u5982\u56fe\u6240\u793a\uff1a\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.datarelab.com\/blog\/content\/uploadfile\/201307\/382f93a08236a326eb2a06556cb2157320130711054448.jpg\" width=\"500\" height=\"362\" alt=\"\" \/>\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t9.\u8fd8\u6709\u4e00\u9879\uff0c\u770b\u770b\u5f15\u5bfc\u7a0b\u5e8f\u662f\u5426\u4e3a\u6211\u4eec\u6dfb\u52a0\u4e86\u5f15\u5bfc\u9879\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1asudo&nbsp;gedit&nbsp;\/boot\/grub\/grub.cfg&nbsp;&nbsp;\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t\u5982\u56fe\uff0c\u7cfb\u7edf\u81ea\u52a8\u4e3a\u6211\u4eec\u6dfb\u52a0\u4e86\u5f15\u5bfc\u9879\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u9700\u8981\u81ea\u5df1\u4eff\u7167\u5df2\u5b58\u5728\u7684\u9879\u6dfb\u52a0\u3002\u8fd9\u91cc\u5c31\u4e0d\u591a\u8bf4\u4e86\u3002\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.datarelab.com\/blog\/content\/uploadfile\/201307\/55a9b40223261ddcaf4324503c0636cb20130711054449.jpg\" width=\"500\" height=\"404\" alt=\"\" \/>\n<\/p>\n<p style=\"color:#454545;font-family:tahoma, helvetica, arial;font-size:14px;background-color:#FFFFFF;\">\n\t10.&nbsp;reboot&nbsp;\u91cd\u542f\u4e4b\u540e\u5c31\u53ef\u5df2\u9009\u62e9\u8fdb\u5165\u76f8\u5e94\u7684\u5185\u6838\u4e86\u3002\u6ce8\u610f\uff1a\u539f\u6765\u7cfb\u7edf\u7684\u5185\u6838\u4ecd\u7136\u5b58\u5728\uff0c\u4f9d\u7136\u53ef\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u4fd7\u8bdd\u8bf4\uff0c\u5de5\u6b32\u5584\u5176\u4e8b\uff0c\u5fc5\u5148\u5229\u5176\u5668\u3002\u5728\u7f16\u8bd1\u5185\u6838\u524d\uff0c\u9700\u8981\u914d\u7f6e\u4e00\u4e0b\u7f16\u8bd1\u73af\u5883\uff0c\u5728\u7ec8\u7aef\u8f93\u5165: sudo&nbsp;ap [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[14,150],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-Technical_literature","tag-linux","tag-ubuntu"],"views":1411,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}