{"id":68,"date":"2006-07-24T23:08:29","date_gmt":"2006-07-25T07:08:29","guid":{"rendered":"http:\/\/hongyu.org\/wordpress\/?p=68"},"modified":"2008-12-26T21:14:45","modified_gmt":"2008-12-27T05:14:45","slug":"format-hard-drive-using-fdisk","status":"publish","type":"post","link":"https:\/\/www.hongyu.org\/wordpress\/?p=68","title":{"rendered":"Format hard drive using fdisk"},"content":{"rendered":"<p>Got an ATA hard drive hooked to an external USB package and need to reformat the disk to ext3 system.<\/p>\n<p>First, I run fdisk to see what content it has<br \/>\nfdisk -l \/dev\/sda1<\/p>\n<p>Then, I re-partition it using<br \/>\nfdisk \/dev\/sda1<br \/>\nselect option d to delete the old partion,<br \/>\nand then option n to add a new partition, where I choose the primary partition instead of the extended one. There will be complaint about it&#8217;s too large, but since this disk is not going to be used as a boot disk, so I don&#8217;t care<\/p>\n<p>Next, I create the ext3 file system on the partition<br \/>\n\/sbin\/mkfs -t ext3 \/dev\/sda1<\/p>\n<p>After it&#8217;s done, I can mount it to my Linux system<br \/>\nmount \/dev\/sda1 \/disk3<\/p>\n<p>Optionally, I can change the percentage of reserved blocks using tune2fs, e.g., from the default 5% to 3%<br \/>\ntune2fs -m3 \/dev\/sda<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Got an ATA hard drive hooked to an external USB package and need to reformat the disk to ext3 system. First, I run fdisk to see what content it has fdisk -l \/dev\/sda1 Then, I re-partition it using fdisk \/dev\/sda1 select option d to delete the old partion, and then option n to add a &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.hongyu.org\/wordpress\/?p=68\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Format hard drive using fdisk&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/68"}],"collection":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":4,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":113,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/113"}],"wp:attachment":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}