A dd solution is provided:
unzip -p 2015-11-21-raspbian-jessie.zip 2015-11-21-raspbian-jessie.img | dd of=/dev/sdb bs=1M
however dd is contra-indicated with the availability of cat
. I would like to constrain the question to answers that do not use dd
solutions. Solutions engaging cat
(good) or pv
(better) to write to the SD card are preferred over dd
.
An image of an SD card was successfully copied to sdcard.image with the cat
command and burned to a second SD card:
sudo sh -c 'pv /dev/disk2 >sdcard.image'
/dev/disk2
is the SD card
The SD card image is 32GB and was zipped to an 8GB file: sdcard.image.zip. From the command line, how does one unzip and burn the file? Assume there is not enough space to unzip the image to the Macbook's SSD.
The goal is to avoid writing the 32GB file to the laptop's SSD and burn the compressed image directly to the SD card.
dd
solutions given that they are contra-indicated in favor ofcat
. – gatorback Jan 27 '20 at 21:27unzip
as the input you probably do wantdd
in the pipeline to coalesce part block reads into single block-sized writes. (iflag=fullblock
). – Chris Davies Jan 27 '20 at 21:39/dev
entries→inodes) for storage devices: block special devices (a.k.a. “cooked”), e.g.,hd0
, and character special devices (a.k.a. “raw”), e.g.,rhd0
. The raw device interface permitted more-or-less direct access to the hardware, which was sometimes beneficial (especially in the case of large block sizes) and often deleterious (especially in the case of small block sizes). … (Cont’d) – G-Man Says 'Reinstate Monica' Feb 03 '20 at 08:58/dev/hd0
, the driver would keep those bytes in a buffer in kernel memory, and write (or “flush”) them out to the hardware only when the process had written another 470 bytes (i.e., for a total of 512) or a long period of time had elapsed. (I apologize if this comes across as pedantic. I assume that you already know this, but I wanted to be sure that we were on the same page.) … (Cont’d) – G-Man Says 'Reinstate Monica' Feb 03 '20 at 08:58