{"id":37,"date":"2012-04-30T08:52:51","date_gmt":"2012-04-30T00:52:51","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=37"},"modified":"2012-04-30T08:52:51","modified_gmt":"2012-04-30T00:52:51","slug":"linux%20fdisk%e5%91%bd%e4%bb%a4%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/37.html","title":{"rendered":"Linux fdisk\u547d\u4ee4\u4f7f\u7528\u65b9\u6cd5"},"content":{"rendered":"<p><span style=\"font-size:medium;\"><span style=\"font-size:x-small;\">&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr> <\/span>\u4e00\u5757\u786c\u76d8\u53ea\u80fd\u6709\u56db\u4e2a\u4e3b\u5206\u533a(hda1,had2,hda3,hda4)<\/span> <\/p>\n<p>&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr> <span style=\"font-size:18px;\">\u4e00\u4e2a\u4e3b\u5206\u533a\u53ef\u4ee5\u8f6c\u6362\u4e3a\u4e00\u4e2a\u6269\u5c55\u5206\u533a\u3002<\/span><span style=\"color:#990033;font-size:18px;\">\u5728\u6269\u5c55\u5206\u533a\u4e0a\uff0c\u53ef\u4ee5\u4ee5\u94fe\u8868\u7684\u65b9\u5f0f\u5efa\u7acb\u903b\u8f91\u5206\u533a<\/span><\/p>\n<p><span style=\"font-size:18px;\"><span style=\"color:#990033;\">&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr>Linux\u4e0b\u903b\u8f91\u5206\u533a\u81eahda5\u7f16\u53f7\uff0chda1\u3001hda2\u3001hda3\u3001hda4\u9884\u7559\u4e3a\u56db\u4e2a\u4e3b\u5206\u533a<\/span>\u3002<\/span><\/p>\n<p>&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr> <span style=\"color:#ff0000;font-size:18px;\">\u67e5\u770b\u786c\u76d8\u5206\u533a\u4fe1\u606f fdisk -l<\/span><\/p>\n<p><span style=\"font-size:medium;\">\u4e00\u3001\u521b\u5efa\u5206\u533a<\/span><\/p>\n<p>&nbsp;<wbr><\/p>\n<p><strong><span style=\"color:#ff0000;\">&nbsp;<wbr><span style=\"font-size:18px;\">&nbsp;<wbr> fdisk <em>\/dev\/sda<\/em><\/span><\/span><\/strong><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">Command (m for help):&nbsp;<wbr><br \/>\n&nbsp;<wbr>&nbsp;<wbr> a toggle a bootable flag<br \/>\n&nbsp;<wbr>&nbsp;<wbr> b edit bsd disklabel<br \/>\n&nbsp;<wbr>&nbsp;<wbr> c toggle the dos compatibility flag<br \/>\n&nbsp;<wbr>&nbsp;<wbr> d delete a partition ;\u5220\u9664\u4e00\u4e2a\u5206\u533a<br \/>\n&nbsp;<wbr>&nbsp;<wbr> l list known partition types;<\/span><span style=\"font-size:18px;\">\u5217\u51fa\u5206\u533a\u7c7b\u578b<\/span><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">m print this menu ;\u5217\u51fa\u5e2e\u52a9\u4fe1\u606f\uff1b<br \/>\n&nbsp;<wbr>&nbsp;<wbr> n add a new partition ;\u6dfb\u52a0\u4e00\u4e2a\u5206\u533a\uff1b\u5305\u62ec\u4e24\u4e2a\u9009\u9879<\/span><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:medium;\"><span style=\"color:#990033;\">&nbsp;<wbr>&nbsp;<wbr>\u8f93\u5165e \u786c\u76d8\u4e3a\u6269\u5c55\u5206\u5272\u533a(extend)\u3002<\/span><\/span><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:medium;\"><span style=\"color:#990033;\"><span style=\"font-size:medium;\"><span style=\"color:#990033;\">&nbsp;<wbr>&nbsp;<wbr><\/span><\/span>\u8f93\u5165p \u786c\u76d8\u4e3a\u4e3b\u5206\u5272\u533a(primary)\u3002<\/span>&nbsp;<wbr><\/span><span style=\"font-size:18px;\"><br \/>\n&nbsp;<wbr>&nbsp;<wbr> o create a new empty DOS partition table<br \/>\n&nbsp;<wbr>&nbsp;<wbr> p print the partition table ;\u5217\u51fa\u5206\u533a\u8868\uff1b<br \/>\n&nbsp;<wbr>&nbsp;<wbr> q quit without saving changes ;\u4e0d\u4fdd\u5b58\u9000\u51fa\uff1b<br \/>\n&nbsp;<wbr>&nbsp;<wbr> s create a new empty Sun disklabel<br \/>\n&nbsp;<wbr>&nbsp;<wbr> t change a partition's system id ;\u6539\u53d8\u5206\u533a\u7c7b\u578b\uff1b<br \/>\n&nbsp;<wbr>&nbsp;<wbr> u change display\/entry units<br \/>\n&nbsp;<wbr>&nbsp;<wbr> v verify the partition table<br \/>\n&nbsp;<wbr>&nbsp;<wbr> w write table to disk and exit ;\u628a\u5206\u533a\u8868\u5199\u5165\u786c\u76d8\u5e76\u9000\u51fa\uff1b<br \/>\n&nbsp;<wbr>&nbsp;<wbr> x extra functionality (experts only) ;\u6269\u5c55\u5e94\u7528\uff0c\u4e13\u5bb6\u529f\u80fd\uff1b<\/span><\/p>\n<p style=\"text-indent:2em;\"><span style=\"color:#990000;font-size:medium;\">\u7528fdisk\u66f4\u6539\u5206\u533a\u8868\u540e\uff0c\u4f7f\u66f4\u6539\u7684\u5206\u533a\u8868\u7acb\u5373\u751f\u6548\uff0c\u9700\u8981\u8fd0\u884cpartprobe\u547d\u4ee4\u3002<\/span><\/p>\n<p style=\"text-indent:2em;\">&nbsp;<wbr><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">\u4e8c\u3001\u683c\u5f0f\u5316<\/span><\/p>\n<p style=\"text-indent:2em;\">&nbsp;<wbr><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">mkfs.<em><span style=\"color:#ff0000;\">\u5206\u533a\u7c7b\u578b<\/span><\/em> \u547d\u4ee4\u6765\u683c\u5f0f\u5316\u5206\u533a\uff0c\u6bd4\u5982\u6211\u60f3\u683c\u5f0f\u5316 sda3\u4e3aext3\u6587\u4ef6\u7cfb\u7edf\uff0c\u5219<\/span><span style=\"font-size:18px;\">mkfs.ext3 \/dev\/sda3<\/span><\/p>\n<p style=\"text-indent:2em;\">&nbsp;<wbr><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">\u4e09\u3001\u52a0\u8f7d\u6587\u4ef6\u7cfb\u7edf<\/span><\/p>\n<p style=\"text-indent:2em;\">&nbsp;<wbr><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">\u52a0\u8f7d sda3\u5230\u76ee\u524d\u7cfb\u7edf\u6765\u5b58\u53d6\u6587\u4ef6<\/span><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">mkdir \/mnt\/sda3<\/span><\/p>\n<p style=\"text-indent:2em;\"><span style=\"font-size:18px;\">mount \/dev\/sda3 \/mnt\/sda3<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp; \u4e00\u5757\u786c\u76d8\u53ea\u80fd\u6709\u56db\u4e2a\u4e3b\u5206\u533a(hda1,had2,hda3,hd [&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":[81,14,82],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-Technical_literature","tag-fdisk","tag-linux","tag-82"],"views":1398,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/37","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=37"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}