[[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
signature.asc
Description: Digital signature
-- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
