In my most recent case using this, I downloaded the .img, then according to bash_history
did this:
sudo dd if=./librem5r4.img of=/dev/sda bs=10M status=progress
This overwrote the SD card with a bootable partition. Upon booting, it automatically expanded to fill the card. It’s a terrabyte card, so it is infinitely big relative to everything else.
Once booted from the SD card, my bash history shows the following:
sudo dd if=/dev/mmcblk0 of=./my-liberty.img bs=10M status=progress
At this point, I removed the SD card from the device, and put it into a different new device I wanted to replace my daily driver with.
Then, I booted the SD card – same partition, new hardware – and ran the opposite of the prior command:
sudo dd of=/dev/mmcblk0 if=./my-liberty.img bs=10M status=progress
(note that if
and of
are reversed.)
The result of the operation is that the eMMC
on the new device matches the eMMC
on the old device, having flashed to be its direct replica. And this was accomplished from L5 without using the laptop, from what I recall. (I don’t have timestamps and the first command actually is in my bash history a whole bunch of times, flashing multiple SD cards from the handset. But I probably did it all without PC, because why not.)
Sorry that I omitted the commands in my other post. The point of what I was saying was moreso that learning to use dd in general is advantageous, so it’s possible that posting explicit commands is contrary to that and encourages users to think of dd
as a line to copy rather than an idea for something useful to use in any direction.
Edit: Although my above .bash_history is specific to doing a transfer from an old device to a new device, a user could apply the same principle to flash their Librem 5 with no additional hardware beyond the SD card. The difference would be to omit the middle command – don’t clone eMMC. And instead, redownload librem5r4.img
from Purism on the SD card storage that we’re booted from, then write it onto the (not currently in use) eMMC while the SD card’s OS is running.