{"id":550,"date":"2014-03-05T03:04:56","date_gmt":"2014-03-05T01:04:56","guid":{"rendered":"http:\/\/wp.oktay.com\/?p=550"},"modified":"2014-12-31T11:45:31","modified_gmt":"2014-12-31T09:45:31","slug":"resize-an-raspi-sd-card-imgage","status":"publish","type":"post","link":"https:\/\/wp.oktay.com\/?p=550","title":{"rendered":"resize an raspi sd card image"},"content":{"rendered":"<p>losetup -f &#8211;show my.img<br \/>\n-> we have now mounted image as loop0<\/p>\n<p>partprobe \/dev\/loop0<br \/>\n-> we have now the partitions which is required for gparted<\/p>\n<p>gparted \/dev\/loop0<br \/>\n-> resize as usual now and apply<\/p>\n<p>losetup -d \/dev\/loop0<br \/>\n-> loop not needed anymore<\/p>\n<p> fdisk -l my.img<br \/>\n-><br \/>\nPlatte my.img: 8068 MByte, 8068792320 Byte<br \/>\n255 K\u00f6pfe, 63 Sektoren\/Spur, 980 Zylinder, zusammen 15759360 Sektoren<br \/>\nEinheiten = Sektoren von 1 \u00d7 512 = 512 Bytes<br \/>\nSector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>\nFestplattenidentifikation: 0x000981cb<\/p>\n<p>                                     Ger\u00e4t  boot.     Anfang        Ende     Bl\u00f6cke   Id  System<br \/>\nmy.img1            8192      122879       57344    c  W95 FAT32 (LBA)<br \/>\nmy.img2          122880    15759359     7818240   83  Linux<\/p>\n<p>&#8212;<br \/>\nso, end is at 15759359     (*512 bs)<\/p>\n<p>so:<br \/>\ntruncate &#8211;size=$[(15759359+1)*512] my.img<\/p>\n<p>this should work now. if not, let me know.<\/p>\n<p>new created SD card can resized then again with gparted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>losetup -f &#8211;show my.img -> we have now mounted image as loop0 partprobe \/dev\/loop0 -> we have now the partitions which is required for gparted gparted \/dev\/loop0 -> resize as usual now and apply losetup -d \/dev\/loop0 -> loop not needed anymore fdisk -l my.img -> Platte my.img: 8068 MByte, 8068792320 Byte 255 K\u00f6pfe, 63&hellip; <a class=\"more-link\" href=\"https:\/\/wp.oktay.com\/?p=550\">Continue reading <span class=\"screen-reader-text\">resize an raspi sd card image<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-550","post","type-post","status-publish","format-standard","hentry","category-bash","entry"],"_links":{"self":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts\/550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=550"}],"version-history":[{"count":4,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts\/550\/revisions"}],"predecessor-version":[{"id":576,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts\/550\/revisions\/576"}],"wp:attachment":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}