<div dir="ltr"><div dir="ltr"><div>You didn&#39;t have to do all that.  The mkisofs command takes care of all of this.  Please see the mkisofs manpage.</div><div><br></div><div>This may help:</div><div><a href="https://bencane.com/2013/06/12/mkisofs-repackaging-a-linux-install-iso/">https://bencane.com/2013/06/12/mkisofs-repackaging-a-linux-install-iso/</a></div></div><div dir="ltr"><br></div><div>-C<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 13, 2018 at 2:39 PM Rick Hornsby &lt;<a href="mailto:richardjhornsby@gmail.com">richardjhornsby@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div id="m_2101785290858830304bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto"><br></div><p class="m_2101785290858830304airmail_on">On November 13, 2018 at 12:33:27, Roberto C. Sánchez (<a href="mailto:roberto@connexer.com" target="_blank">roberto@connexer.com</a>) wrote:</p> <div><blockquote type="cite" class="m_2101785290858830304clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span><div><div></div><div>You need to pass the &#39;-s&#39; option to ls:<br><br>-s, --size<br>print the allocated size of each file, in blocks</div></div></span></blockquote></div><div id="m_2101785290858830304bloop_customfont" style="margin:0px"><br></div><div id="m_2101785290858830304bloop_customfont" style="margin:0px">Thanks for the helpful replies, everyone. I started re-working the problem, looking at it from the perspective of dealing with the size *before* using dd - shrinking the filesystem using resize2fs, and then shrinking the partition to match, rather than trying to shrink the entire card image as a single unit. After that, then I can take an image of the shrunk SD card.</div><div id="m_2101785290858830304bloop_customfont" style="margin:0px"><br></div><div id="m_2101785290858830304bloop_customfont" style="margin:0px">Researching the approach, I came across a super easy been-there-done-that shell script which can take the image and shrink it appropriately for the Pi:</div><div id="m_2101785290858830304bloop_customfont" style="margin:0px"><br></div><div id="m_2101785290858830304bloop_customfont" style="margin:0px"><span class="m_2101785290858830304Apple-tab-span" style="white-space:pre-wrap">        </span><a href="https://github.com/Drewsif/PiShrink/blob/master/pishrink.sh" target="_blank">https://github.com/Drewsif/PiShrink/blob/master/pishrink.sh</a><br></div><div id="m_2101785290858830304bloop_sign_1542137001127542016" class="m_2101785290858830304bloop_sign"><br></div><div id="m_2101785290858830304bloop_sign_1542137001127542016" class="m_2101785290858830304bloop_sign">Bonus, this also sets up the pi to automatically expand to fill the card, which I was also going to have to figure out how to do. He does some interesting things in the script, especially at the end using parted and truncate.</div></div>
_______________________________________________<br>
colug-432 mailing list<br>
<a href="mailto:colug-432@colug.net" target="_blank">colug-432@colug.net</a><br>
<a href="http://lists.colug.net/mailman/listinfo/colug-432" rel="noreferrer" target="_blank">http://lists.colug.net/mailman/listinfo/colug-432</a><br>
</blockquote></div>