Search code examples
beagleboneblackddxz

dd a compressed *.xz image into a partition


I'm trying to copy a compressed image into a partition inside a Beaglebone. Usually, it is a 2 step process:

xz -d console.img.xz # console.img is created
dd if=console.img of=/dev/mmcblk0p3

Is there a way, I can do it in a single step without uncompressing the file *.img.xz? This is because after uncompressed the image, it is too big for the current partition.


Solution

  • This seems to work, if that is what you mean:

    xz -d < console.img.xz - | dd of=/dev/mmcblk0p3