{"id":431,"date":"2019-08-21T01:49:24","date_gmt":"2019-08-20T15:49:24","guid":{"rendered":"https:\/\/blog.hegars.com\/?p=431"},"modified":"2023-08-05T22:04:51","modified_gmt":"2023-08-05T12:04:51","slug":"mounting-a-partition-from-a-image-file","status":"publish","type":"post","link":"https:\/\/blog.hegars.com\/?p=431","title":{"rendered":"Mounting a partition from a image file"},"content":{"rendered":"\n<p># file WWN.hdd<br> WWN.hdd: DOS\/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 1, 1953525167 sectors, extended partition table (last) <\/p>\n\n\n\n<p>#fdisk .\/WWN.hdd<\/p>\n\n\n\n<p>Welcome to fdisk (util-linux 2.33.1).<br>\nChanges will remain in memory only, until you decide to write them.<br>\nBe careful before using the write command.<\/p>\n\n\n\n<p>GPT PMBR size mismatch (1953525167 != 1852556895) will be corrected by write.<\/p>\n\n\n\n<p>Command (m for help): p<\/p>\n\n\n\n<p>Disk .\/WWN.hdd: 883.4 GiB, 948509130752 bytes, 1852556896 sectors<br> Units: sectors of 1 * 512 = 512 bytes<br> Sector size (logical\/physical): 512 bytes \/ 512 bytes<br> I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br> Disklabel type: dos<br> Disk identifier: 0x00002913<\/p>\n\n\n\n<p>Device                Boot Start        End    Sectors   Size Id Type<br> .\/WWN.hdd1          1 1852556895 1852556895 883.4G ee GPT<\/p>\n\n\n\n<p>losetup?<br><\/p>\n\n\n\n<p>mount with offsets <br># mount -o ro,loop,offset=512 .\/WWN,hdd \/mountpoint<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Calculate the starting sector number<\/h2>\n\n\n\n<p>Sector size times the start sector son the the above its 1 x 512 = 512<\/p>\n\n\n\n<p># mount -o ro,loop,offset=$((1*512)) .\/WWN,hdd \/mountpoint<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p># file WWN.hdd WWN.hdd: DOS\/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 1, 1953525167 sectors, extended partition table (last) #fdisk .\/WWN.hdd Welcome to fdisk (util-linux 2.33.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. GPT PMBR size mismatch (1953525167 != [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/431"}],"collection":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=431"}],"version-history":[{"count":2,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions"}],"predecessor-version":[{"id":2409,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions\/2409"}],"wp:attachment":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}