\u547d\u4ee4<\/a>\uff0c\u8fd9\u6837\u4e00\u4e2a\u5fae\u578blinux\u7cfb\u7edf\u5c31<\/p>\n\u80fd\u8fd0\u884c\u4e0a\u53bb\u4e86\u3002<\/p>\n
\u5b89\u88c5\u6d41\u7a0b<\/p>\n
1\u3001\u5c06\u7b2c\u4e8c\u5757c\u76d8\u65b0\u5efa\u4e24\u4e2a\u5206\u533a\uff0c\u4e4b\u540e\u6307\u5b9a\u6587\u4ef6\u7cfb\u7edf\u518d\u4f4e\u683c\uff1a<\/p>\n
<\/p>\n
\u65b0\u5efa\u4e86\u4e24\u4e2a\u5206\u533asdb1\u548csdb2\u800c\u4e14\u90fd\u6307\u5b9a\u4e86ext4\u4f4e\u683c\u3002sdb1\u62ff\u6765\u653e\u7f6e\/boot<\/p>\n
\u76ee\u5f55\uff0c\u4e5f\u5c31\u662f\u5728\u5f00\u673a\u65f6\u88ab\u5f53\u6210\u6839\u6765\u5f15\u5bfc\u7684c\u76d8\u5206\u533a\uff0c\u6240\u4ee5\u53ef\u4ee5\u8bf4\u662f\u865a\u62df\u7684\u6839<\/p>\n
\u65e2\u7136\u865a\u62df\u7684\u7ed9100M\u7684\u7a7a\u95f4\u5c31\u8db3\u591f\u4e86\u3002\u800csdb2\u662f\u62ff\u6765\u50a8\u5b58\u771f\u6b63\u7684\u6839\u7684\uff0c\u6240\u4ee5\u7a7a<\/p>\n
\u95f4\u987b\u8981\u5927\u4e00\u4e9b\u7ed9\u4e861G\u3002\u5728\u6b64\u987b\u8981\u6ce8\u610f\u7684\u662f\uff0c\u82e5\u662f\u7528\u7684centos5\u505a\u7684\u53ef\u80fd\u4e0d\u652f\u6301<\/p>\n
ext4\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u5c31\u7528ext3\u5c31\u884c\u4e86\u3002<\/p>\n
2\u3001\u65b0\u5efa\u76ee\u5f55\uff0c\u6302\u8f7d\u5206\u533a<\/p>\n
\u5728\/mnt\u4e0b\u65b0\u5efa\u4e24\u4e2a\u76ee\u5f55\/boot\u548c\/sysroot,\u62ff\u6765\u50a8\u5b58\u5185\u6838\u6587\u4ef6\u548c\u5f53\u6210\u6839\u4f7f\u7528\u3002\u521b<\/p>\n
\u5efa\u5b8c\u76ee\u5f55\u5c31\u628a\u6628\u5929\u65b0\u5efa\u5728sdb\u4e0b\u7684\u4e24\u4e2a\u5206\u533a\u5206\u522b\u6302\u8f7d\u81f3\u76ee\u5f55\u4e0b\uff1a<\/p>\n
3\u3001\u5b89\u88c5grub\u3001\u590d\u5236\u5185\u6838\u6587\u4ef6\uff1a<\/p>\n
<\/p>\n
\u5c3d\u7ba1\u5728\u5b89\u88c5grub\u65f6\u8fd8\u6709\u4e00\u79cd\u65b9\u5f0f\u90a3\u5c31\u662f\u7528setup\u5b89\u88c5\uff0c\u5e76\u4e14\u5728\u6b64\u65f6\u4e0d\u8981\u7528setup<\/p>\n
\u6765\u5b89\u88c5\uff0c\u7531\u4e8esetup\u4e0d\u652f\u6301\u5728\u4e00\u4e2a\u4e3b\u673a\u4e0a\u5f15\u5bfc\u7b2c\u4e8c\u6b21grub\uff0c\u6240\u4ee5\u8fd8\u662f\u7528install<\/p>\n
\u6709\u4ee5\u4e0a\u5c31\u53ef\u4ee5\u770b\u5f97\u4e0b\u6765\u4e86\/mnt\/boot\u5c31\u662f\u50a8\u5b58\u5185\u6838\u6587\u4ef6\u7684\u3002<\/p>\n
4\u3001\u5728\/mnt\/sysroot\u4e0b\u65b0\u5efa\u4e00\u4e9b\u6839\u6587\u4ef6\u76ee\u5f55\uff0c\u5c06bash\u590d\u5236\u5230\/mnt\/sysroot\u4e0b\u8fb9\uff0c<\/p>\n
\u5207\u6362\u5230\/mnt\/sysroot\u4e0b\u6d4b\u8bd5\u4e00\u4e0b\uff1a<\/p>\n
\u5728\u6b64\u8bf4\u660e\u4e00\u4e0bcp.sh\u8fd9\u4e2a\u811a\u672c\uff0c\u8fd9\u662f\u4e00\u4e2a\u590d\u5236\u4e00\u4e9b\u53ef\u6267\u884c\u547d\u4ee4\u4ee5\u53ca\u6240\u4f9d\u8d56\u7684\u5171<\/p>\n
\u4eab\u5e93\u5230\u53e6\u4e00\u4e2a\u76ee\u5f55\u4e0b\u8fb9\uff0c\u5728\u8fd9\u6240\u6307\u7684\u662f\u590d\u5236\u5230\/mnt\/sysroot,\u8fd9\u4e2a\u76ee\u5f55\u53ef\u4ee5\u8fdb<\/p>\n
\u811a\u672c\u91cc\u4fee\u6539\u7684\u3002\u811a\u672c\u4e0d\u662f\u5236\u505a\u8fd9\u4e2a\u5fae\u578blinux\u7684\u91cd\u70b9\uff0c\u6240\u4ee5\u5728\u8fd9\u5c31\u4e0d\u591a\u8bf4\uff0c\u53ea<\/p>\n
\u662f\u8ba9\u4f60\u4eec\u6653\u5f97\u8fd9\u79cd\u547d\u4ee4\u662f\u901a\u8fc7\u8fd9\u6837\u4e00\u4e2a\u65b9\u6cd5\u590d\u5236\u8fc7\u53bb\u7684\u3002\u5c06bash\u590d\u5236\u8fc7\u53bb\u540e\uff0c<\/p>\n
<\/p>\n
\u4e3a\u4e86\u524d\u9762\u7684\u5370\u8bc1\u53ef\u4ee5\u5c06\u4e00\u4e9b\u7b80\u5355\u7684\u53ef\u6267\u884c\u547d\u4ee4\u4e5f\u590d\u5236\u8fc7\u53bb\u5982:ls,cp,mv\u7b49\uff0c\u6b64<\/p>\n
\u65f6\u53ef\u4ee5\u4f7f\u7528tree\u547d\u4ee4\u67e5\u770b\u4e00\u4e0b\/mnt\/sysroot\u76ee\u5f55\uff0c\u7ed3\u6784\u6709\u70b9\u6839\u7684\u96cf\u578b\u4e86\u5427\uff01\u7136<\/p>\n
\u540e\u4f7f\u7528chroot\/mnt\/sysroot\u5207\u6362\u5230\u81ea\u5df1\u5236\u505a\u7684\u5c0f\u7cfb\u7edf\u91cc\u3002<\/p>\n
5\u3001\u73b0\u5728\u7cfb\u7edf\u7684\u96cf\u578b\u4e0b\u6765\u4e86\u5e76\u4e14\uff0c\u8fd8\u7f3a\u4e4fgrub\u7684\u5185\u6838\u5f15\u5bfc\u6587\u4ef6\uff0c\u6240\u4ee5\u73b0\u4eca\u8fd8\u5f15<\/p>\n
\u5bfc\u4e0d\u4e86\u7cfb\u7edf\u7684\u542f\u52a8\uff0c\u6240\u4ee5\u63a5\u51fa\u6765\u8981\u6536\u5230\u7f16\u8f91\u4e00\u4e2a\u5185\u6838\u6587\u4ef6\uff1a<\/p>\n
\u524d\u54ea\u4e00\u5f20\u622a\u56fe\u662f\u7ed9bash\u521b\u5efa\u4e86\u4e00\u4e2a\u94fe\u63a5\u53ebsh\u7531\u4e8e\u7cfb\u7edf\u9ed8\u8ba4\u67e5\u627eshell\u7684\u65f6\u4faf<\/p>\n
\u90fd\u662f\u627esh\u7684\u3002\u7531\u4e8e\u8981\u628a\u7b2c\u4e8c\u5757c\u76d8\u9886\u5230\u4e00\u4e2a\u65b0\u7684PC\u673a\u4e0a\u5f53\u6210\u4e00\u4e2a\u5fae\u578blinux<\/p>\n
\u7cfb\u7edf\u4f7f\u7528\u7ea2\u5e3dlinux\uff0c\u6240\u4ee5\u7ed9root\u7684\u4ecd\u662f(hd0,0)\uff0croot\u4e5f\u662f\u5728\u65b0PC\u673a\u4e0a\u7684sda2\u7684\u3002<\/p>\n
6\u3001\u73b0\u5728\u82e5\u662f\u5c06c\u76d8\u9886\u5230\u4e00\u4e2a\u65b0\u7684PC\u673a\u4e0a\uff0c\u53ea\u80fd\u4ee5bash\u8fd0\u884c\u8fd8\u4e0d\u80fd\u7528init\u6765<\/p>\n
\u5f15\u5bfc\uff0c\u6240\u4ee5\u63a5\u51fa\u6765\u8981\u7f16\u8f91\u4e00\u4e2ainit\u811a\u672c\uff0c\u8ba9\u7cfb\u7edf\u4ee5init\u6765\u8fd0\u884c\uff1a<\/p>\n
<\/p>\n
\u4ece\u91cc\u9762\u7684\u8fd9\u4e2a\u811a\u672c\u91cc\u770b\u4ee5\u770b\u7684\u4e0b\u6765\uff0c\u7b2c\u4e00\u884c\u6709\u6548\u6570\u636e\u662f\u5728\u5f00\u673a\u65f6\u4ee5\u7ea2\u8272\u663e\u793a<\/p>\n
mylinux\u7684\u6b22\u8fce\u4fe1\u606f\u3002\u4e0b\u8fb9\u4e24\u884c\u662f\u6302\u8f7d\u4e86\u5728\/etc\/fstab\u4e0b\u8fb9\u7684\u4e24\u4e2a\u4f2a\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n
\/bin\/bash\u91cc\u9762\u7684\u90a3\u4e00\u884c\u662f\u53c8\u5c06\u6839\u5206\u533a\u4ee5\u8bfb\u5199\u7684\u65b9\u6cd5\u91cd\u65b0\u6302\u8f7d\u4e86\u4e00\u6b21\u3002<\/p>\n
\u6ce8\u610f\uff1a\u5728\u865a\u62df\u673a\u4e0a\u505a\u7684\u5efa\u8bae\u4e0d\u8981\u8fd9\u6837\u4ee5\u8bfb\u5199\u65b9\u6cd5\u6302\u8f7d\u7531\u4e8e\u5bbf\u4e3b\u673a\u4e0e\u76ee\u6807\u673a\u4e00\u8d77\u8fd0<\/p>\n
\u884c\uff0c\u90fd\u8bfb\u5199\u6570\u636e\u7684\u8bdd\u4f1a\u9020\u6210\u7cfb\u7edf\u5d29\u6e83\u3002\u5728\u8fd9\u4e3a\u4e86\u6d4b\u8bd5\u5c31\u4ee5\u8bfb\u5199\u65b9\u6cd5\u6302\u8f7d\u4e86<\/p>\n
7\u3001\u4ee5\u4e0a\u5b9e\u73b0\u4e86\u4ee5init\u811a\u672c\u5f15\u5bfc\u6b65\u5165\u7cfb\u7edf\uff0c\u4f46\u8981\u542f\u7528\u7cfb\u7edf\u7684\u7f51\u8def\u529f\u80fd\uff0c\u7ed9\u7cfb\u7edf\u914d\u7f6e<\/p>\n
IP\u8fd8\u5b9e\u73b0\u4e0d\u4e86\uff0c\u8fd9\u4e48\u63a5\u51fa\u6765\u5c31\u7ed9\u7cfb\u7edf\u52a0\u4e0a\u7f51\u5361\u6a21\u5757\u80fd\u5b9e\u73b0\u7f51\u8def\u529f\u80fd\uff1a<\/p>\n
\u65b0\u5728\/mnt\/sysroot\/lib\u4e0b\u8fb9\u5efa\u4e00\u4e2a\u76ee\u5f55modules\u62ff\u6765\u653e\u7f6e\u4ece\u5bbf\u4e3b\u673a\u4e0a\u590d\u5236\u7684\u7f51\u8def\u6a21\u5757<\/p>\n
\u4e0b\u8fb9\u7684cp\u5c31\u4e0d\u7528\u89e3\u91ca\u4e86\u5427\uff0c\u5c31\u662f\u4ece\u5bbf\u4e3b\u673a\u4e2d\u5c06\u7f51\u8def\u6a21\u5757\u590d\u5236\u51fa\u6765\u3002\u4e3a\u4e86\u9a8c\u8bc1\u7f51\u8def\u662f\u5426<\/p>\n
\u53ef\u7528\uff0c\u6211\u4eec\u987b\u8981\u7528cp.sh\u8fd9\u4e2a\u811a\u672c\u5c06\u4e00\u4e9b\u7f51\u8def\u547d\u4ee4\u590d\u5236\u8fc7\u53bb\u3002<\/p>\n
\u8bf4\u660e\uff1ainsmod\u547d\u4ee4\u662f\u52a8\u6001\u88c5\u8f7d\u6a21\u5757\u5c0f\u578blinux<\/strong>\uff0c\u524d\u9762\u53ea\u9700\u8ddf\u4e0a\u6a21\u5757\u8def\u5f84\u5373\u53ef\u3002<\/p>\n<\/p>\n
8\u3001\u4e3a\u4e86\u80fd\u4f7f\u7f51\u5361\u529f\u80fd\u5728\u5f00\u673a\u7684\u65f6\u4faf\u624d\u80fd\u81ea\u884c\u8fd0\u884c\uff0c\u987b\u8981\u5c06\u7f51\u8def\u6a21\u5757\u52a0\u4e4binit\u8fd9\u4e2a\u811a\u672c<\/p>\n
\u91cc\uff0c\u5f00\u673a\u6b65\u5165\u7cfb\u7edf\u5c31\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\uff1a<\/p>\n
\u5982\u524d\u9762\u5212\u7ea2\u7ebf\u7684\u524d\u9762\u5c31\u662f\u628a\u7f51\u5361\u6a21\u5757\u52a0\u8f7d\u81f3\u81ea\u5df1\u7684linux\u7cfb\u7edf\u91cc\uff0c\u5212\u7ea2\u7ebf\u7684\u5c31\u662f\u7ed9\u81ea\u5df1<\/p>\n
\u5236\u505a\u7684\u5fae\u578blinux\u5206\u914d\u7684ip\u5c0f\u578blinux<\/strong>\uff0c\u5982\u4eca\u5f00\u673a\u6b65\u5165\u7cfb\u7edf\u80fd\u591f\u76f4\u63a5\u5206\u914d\u5230ip\uff1a<\/p>\n\u5982\u4eca\u5fae\u578blinux\u7cfb\u7edf\u65e9\u5df2\u5236\u505a\u5b8c\u6210\u4e86\uff0c\u7f51\u5361\u6a21\u5757\u4e5f\u52a0\u8fdb\u53bb\u4e86\u4e5f\u7b97\u662f\u4e00\u4e2a\u5185\u6838<\/p>\n
\u65b9\u5f0f\u7684linux\u4e3b\u673a\uff0c\u82e5\u662f\u8fd8\u987b\u8981\u54ea\u4e9b\u529f\u80fd\u6a21\u5757\u90fd\u53ef\u4ee5\u52a0\u8fdb\u53bb\uff0c\u6e10\u6e10\u5efa\u7acb\u3002<\/p>\n
\u6ce8\u610f:\u518d\u5f00\u673a\u6d4b\u8bd5\u4e4b\u524d\u53cd\u590d\u68c0\u6d4b\u597d\/mnt\/boot\u4e0b\u8fb9\u7684vmlinuz\u548cinitramfs.img<\/p>\n
\u6587\u4ef6\u548c\/mnt\/boot\/grub.grub.conf\u6587\u4ef6\uff0c\u662f\u5426\u6709\u9519\u8bef\u6216\u662f\u4fe1\u606f\u8f93\u5165\u6709\u8bef\u7684\u5730\u65b9\u3002<\/p>\n
\u603b\u7ed3<\/p>\n
\u5728\u5236\u505a\u8fd9\u4e2a\u5fae\u578blinux\u65f6\uff0c\u6700\u91cd\u8981\u7684\u662f\u8981\u5bf9\u5185\u6838\u548clinux\u7cfb\u7edf\u7684\u5de5\u4f5c\u539f\u7406\u8981<\/p>\n
\u6709\u7279\u522b\u6df1\u523b\u7684\u4e86\u89e3\u4ee5\u53ca\u5728\u5236\u505a\u8fc7\u7a0b\u4e2d\u7684\u6089\u5fc3\u8ba4\u771f\uff0c\u800c\u5e76\u975e\u662f\u8981\u6709\u591a\u9ad8\u7684\u6280<\/p>\n
\u672f\u3002\u5176\u5b9e\u5728\u5236\u505a\u8fc7\u7a0b\u4e2d\u4f1a\u9047\u89c1\u8bb8\u591a\u8fd9\u6837\u90a3\u6837\u532a\u5937\u6240\u601d\u7684\u95ee\u9898\uff0c\u800c\u4e14\u6c89\u4e0b\u5fc3<\/p>\n
\u8ba4\u771f\u6392\u67e5\uff0c\u6e10\u6e10\u90fd\u4f1a\u89e3\u51b3\u4e86\uff0c\u5f53\u4f60\u56de\u5934\u65f6\u53d1\u89c9\u4e5f\u4e0d\u8fc7\u8fd9\u4e48\u561b\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5236\u4f5c\u5fae\u578blinux\u7cfb\u7edf\u6d41\u7a0b\u8fd9\u91cc\u6240\u8bf4\u7684\u5236\u4f5c\u4e00\u4e2a\u5fae\u578blinux\u5c31\u662f\u5728\u4e00\u4e2a\u88c5\u6709linux\u7cfb\u7edf\u7684\u4e3b\u673a\u4e0a\u88c5\u4e0a\u4e24\u5757\u78c1\u811a\u672c\u4e0d\u662f\u5236\u4f5c\u8fd9\u4e2a\u5fae\u578blinux\u7684\u91cd\u70b9\uff0c\u6240\u4ee5\u5728\u8fd9\u5c31\u4e0d\u591a\u8bf4\uff0c\u53ea\u73b0\u5728\u5fae\u578blinux\u7cfb\u7edf\u5df2\u7ecf\u5236\u4f5c\u5b8c\u6210\u4e86\uff0c\u7f51\u5361\u6a21\u5757\u4e5f\u52a0\u8fdb\u53bb\u4e86\u4e5f\u7b97\u662f\u4e00\u4e2a\u5185\u6838<\/p>\n","protected":false},"author":1,"featured_media":285358,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-285357","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/285357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=285357"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/285357\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/285358"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=285357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=285357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=285357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}