Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Joe MacDonald <joe@deserted.net>
To: openembedded-devel@lists.openembedded.org
Subject: Re: State of the art for creating an image that you can dd to an SD card
Date: Tue, 24 Jun 2014 20:12:03 -0400	[thread overview]
Message-ID: <20140625001201.GA31512@deserted.net> (raw)
In-Reply-To: <53AA0672.7070606@balister.org>

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

[[oe] State of the art for creating an image that you can dd to an SD card] On 14.06.24 (Tue 16:14) Philip Balister wrote:

> What's the best available solution for creating an image you can dd to
> an SD card? It seems like this wheel has been invented several times and
> I am wondering if people are converging on one approach.

I don't know about that, but I always resort to the same methodology a
friend of mine used to call "stone axes and hammers" (that is, simple,
basic tools that are efficient if not elegant).

   dd if=/dev/zero of=rootfs.img bs=1M count=<however_many_meg_I_need>
   mke2fs -j rootfs.img
   mount -o loop rootfs.img /mnt
   tar -C /mnt -[jJz]xf <path_to_image>
   umount /mnt

> Bonus points for resizing the linux partition.

Half marks for solving half the problem?  :-)

   dd if=/dev/zero >> rootfs.img
   e2fsck -f junk.img
   resize2fs rootfs.img

It would probably work to shrink it by doing something like resize2fs -M
then doing a dd with if=junk.img of=smaller-junk.img, but I don't ever
recall needing to shrink and image where I didn't just go create a
smaller image and use something like pax or rsync to copy the data from
one to the other.

> 
> How are people doing this today?
> 
> Philip
-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2014-06-25  0:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 23:14 State of the art for creating an image that you can dd to an SD card Philip Balister
2014-06-25  0:12 ` Joe MacDonald [this message]
2014-06-25 10:07 ` Paul Eggleton
2014-06-25 18:38   ` Philip Balister
2014-06-25 18:55     ` Denys Dmytriyenko
2014-06-25 23:13       ` Diego Sueiro
2014-06-25 23:27         ` Philip Balister
2014-06-25 23:45           ` Diego Sueiro
2014-06-26 18:09             ` Denys Dmytriyenko
2014-06-26 19:23               ` Ash Charles
2014-06-26 19:28                 ` Philip Balister
2014-06-26 20:12                   ` Ash Charles
2014-06-26 23:43                     ` Denys Dmytriyenko
2014-06-26 23:46                       ` Philip Balister
2014-06-26 23:55                         ` Denys Dmytriyenko
2014-06-26 23:50                 ` Denys Dmytriyenko
2014-06-26 23:53                   ` Ash Charles
2014-06-26 22:06               ` Diego Sueiro
2014-06-25 19:04     ` Brian Hutchinson
2014-06-26 18:00       ` Denys Dmytriyenko
2014-07-05 22:05 ` Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140625001201.GA31512@deserted.net \
    --to=joe@deserted.net \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox