{"id":2779,"date":"2013-09-18T22:43:14","date_gmt":"2013-09-19T03:43:14","guid":{"rendered":"http:\/\/www.summet.com\/blog\/?p=2779"},"modified":"2013-09-18T11:47:28","modified_gmt":"2013-09-18T16:47:28","slug":"fixing-the-problem-where-gparted-parted-wont-see-a-partition-due-to-a-mac-partition-table","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2013\/09\/18\/fixing-the-problem-where-gparted-parted-wont-see-a-partition-due-to-a-mac-partition-table\/","title":{"rendered":"Fixing the problem where gparted (parted) won&#8217;t see a partition due to a mac partition table"},"content":{"rendered":"<p>I purchased an external HD that was &#8220;mac compatable&#8221; but I used it with a linux system and used fdisk to put two partitions on it.<\/p>\n<p>Later on, I wanted to use gparted to easily resize one of the partitions, but it refused to see any partitions at all on the disk.<\/p>\n<p>fdisk could still see them just fine, but reported &#8220;Partition type: mac&#8221;<\/p>\n<p>It turns out that the problem was that the disk originally came with a mac partition table in addition to (right after) the regular MBR Master Boot Record.<\/p>\n<p>I noticed that the first partition didn&#8217;t actually start until 63 sectors into the disk (at the beginning of the 2nd cylinder).<br \/>\n<code><br \/>\n   Device Boot      Start         End      Blocks   Id  System<br \/>\n\/dev\/sdb1              63  1171893554   585946746   83  Linux<br \/>\n<\/code><\/p>\n<p>So I used DD to copy the first cylinder to a file:<br \/>\n<code><br \/>\nsudo dd bs=512 count=62 if=\/dev\/sdb of=firstCyl.bin<br \/>\n62+0 records in<br \/>\n62+0 records out<br \/>\n31744 bytes (32 kB) copied, 0.000715733 s, 44.4 MB\/s<br \/>\n<\/code><\/p>\n<p>Looking at that bin file in an editor, I saw the string &#8220;Apple_partition_map&#8221; which is a dead givaway of what the problem was.<\/p>\n<p>So, I wrote out all zeros to the first cylinder:<br \/>\n<code><br \/>\n sudo dd bs=512 count=62 if=\/dev\/zero of=\/dev\/sdb<br \/>\n62+0 records in<br \/>\n62+0 records out<br \/>\n31744 bytes (32 kB) copied, 0.00165608 s, 19.2 MB\/s<br \/>\n<\/code><\/p>\n<p>And then I copied the first sector (512 bytes) back from the firstCyl.bin file I had made:<br \/>\n<code><br \/>\nsummetj@constantine:~$ sudo dd bs=512 count=1 if=firstCyl.bin of=\/dev\/sdb<br \/>\n1+0 records in<br \/>\n1+0 records out<br \/>\n512 bytes (512 B) copied, 0.00183878 s, 278 kB\/s<br \/>\n<\/code><\/p>\n<p>And it worked! Now gparted is no longer confused by the apple (mac) partition table that I zeroed out, and sees my partition.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I purchased an external HD that was &#8220;mac compatable&#8221; but I used it with a linux system and used fdisk to put two partitions on it. Later on, I wanted to use gparted to easily resize one of the partitions, &hellip; <a href=\"https:\/\/www.summet.com\/blog\/2013\/09\/18\/fixing-the-problem-where-gparted-parted-wont-see-a-partition-due-to-a-mac-partition-table\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,3,1],"tags":[],"class_list":["post-2779","post","type-post","status-publish","format-standard","hentry","category-commentary","category-linux","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/2779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=2779"}],"version-history":[{"count":0,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/2779\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=2779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=2779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=2779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}