[colug-432] creating sparse disk images

Chris Punches punches.chris at gmail.com
Mon Nov 12 20:39:22 EST 2018


I have to correct myself -- Grub2 is not installed to the MBR.  Sorry!

On Mon, Nov 12, 2018 at 8:32 PM Chris Punches <punches.chris at gmail.com>
wrote:

> You don't need a sparse file.  And you're telling dd to copy the whole
> disk and that's what it's doing.  It's a 16GB card.  If you had partitions
> you would refer to them as /dev/sdc{1..4}
>
> To make an iso file from a directory you want to use something like
>
> `mkisofs -o ${ISO_PATH} ${DIRECTORY}`
>
> Keep in mind you still have no bootloader.  You'll want to install one if
> you want to actually boot from that disk.  Grub2 is nice.
>
> -C
>
> On Mon, Nov 12, 2018 at 5:41 PM Roberto C. Sánchez <roberto at connexer.com>
> wrote:
>
>> On Mon, Nov 12, 2018 at 07:02:25PM -0300, Rick Hornsby wrote:
>> >    A normal RaspberryPi image from Raspian is ~1.5GB as a zip, and as
>> far as
>> >    I can tell, around or about 4GB when expanded and burned to an SD
>> card.
>> >    I’m having a hard time taking the SD card and creating a sparse
>> image from
>> >    it. I think “sparse” is what I want — I burned the image to a 16GB
>> SD card
>> >    made some changes and then tried to use dd to create an image of the
>> >    modified card, and no matter what I do I’m always ending up with a
>> 16GB
>> >    image file. The changes I made include installing a couple of
>> packages, a
>> >    couple of python modules, and setting up some python scripts to run
>> as a
>> >    service on boot. Nothing major.
>> >    I’ve tried to run zerofree on the card (to ensure the free space is
>> all
>> >    0x00), and then specifying ‘conv=sparse’ to dd but it made no
>> difference.
>> >    I tried making the image on Linux and Mac. dd seems to be very
>> similar on
>> >    both.
>> >    # dd if=/dev/sdc of=/tmp/sd_card.img conv=sparse
>>
>> It has been some time since I had to do something like this, but after
>> creating the image with dd, you need you use something like rsync or
>> qemu-img to turn the image into a proper sparse file.  I have used both
>> and either one should do what you need.
>>
>> --
>> Roberto C. Sánchez
>> http://people.connexer.com/~roberto
>> http://www.connexer.com
>> _______________________________________________
>> colug-432 mailing list
>> colug-432 at colug.net
>> http://lists.colug.net/mailman/listinfo/colug-432
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20181112/04f140b5/attachment-0001.html 


More information about the colug-432 mailing list