Help! Anyone can share a way to do a full image backup on the computer of the eMMC on the Librem5?
Looking at JumpDrive documentation I can read:
“Extract the downloaded JumpDrive release archive for the Librem 5, put the device into flash mode, then run the boot-purism-librem5.sh
script from the release.”
Do you know if this makes a permanent change on the phone?
Can Jumpdrive be installed on SD instead?
It is not permanent, as you can always reflash the Librem 5 with a new image.
I doubt it, but feel free to try if you have already prepared a backup plan.
No; despite of its name, the “flash mode” is used to boot Jumpdrive from RAM.
So, hypothetically, if I open terminal and cd into my SD card and then execute sudo dd if=/dev/mmcblk0 of=./dump.img bs=4M status=progress
this seems to successfully dump contents. At the moment I am executing this command while also booted from /dev/mmcblk0 which is obviously dumb. But if I booted from SD, shouldn’t this be a safe operation?
Is that perhaps easier than getting some software named jumpdrive that I’m not familiar with? dd
has been incredibly useful for me and is present on every linux distro I have ever touched.
Edit: I was able to apt install kpartx
and then use that from some online guide to mount the 128GB img created on my 500GB sd card on my liberty phone… As a note, the 500GB SD card currently doesn’t have PureOS bootable on it, so it’s just a data drive. So im guessing the backup created with dd
described above probably has some file corruption because I created the eMMC backup while it was itself running.
But it certainly seems mountable. I’m able to cd
into the mounted backup after using cryptsetup to mount it (cryptsetup did first require entering my LUKS password, which makes sense).
Do whatever you want, it’s just a GNU/Linux computer after all.
Jumpdrive is simply a tool that lets you expose phone’s internal memory over USB as if it was a USB drive. It’s a tiny Linux distro that you boot over USB and does nothing but the above, so you can safely access the drive while it isn’t mounted by anything else on the phone.
You could boot it from a SD card (or even eMMC) as well, but I haven’t written a guide on how to do it so far, and I assume nobody else did either
Here is the way I did it…
Complete imaging and reflash was and is successful I was also able to flash to another L5 and have 2 identical phones.
Turning the phone on (using power button for example) while holding the Vol+ button is enough to put the phone into flashing mode. The problem is that there’s absolutely no indication that it did turn on - everything remains as black and dark as when it’s off, and the only way to know that you succeeded is to connect it via USB and to check whether it shows up in flashing mode on the bus.
…which is why the instructions tell you to do things in a way that gives you immediate feedback; however, when you know how it all actually works it turns out you don’t have to challenge your dexterity at all
Thank you for the input I appreciate you.
I was getting an error saying something along the lines of …A failure to initialize and something may be wrong with the eMMC.
What i found was that while holding the power and volume up together and releasing both quickly as soon as I saw the first indication of Jumpdrive booting, the error went away…the first indication being some words in the upper left corner of the screen indicating it was initializing. I was getting the error holding the buttons down thinking I had to release them when I saw the Jumdrive graphic…but was wrong.
Other than that it has been working flawlessly ever since as descibed in my post:grin:
I appreciate all the Purism team and the forum members for the outstanding work and assistance for the fine products that are available and the support.
Ah, that’s just too old Jumpdrive. It randomly works or not, and the solution is simply to retry… or to use a newer version, but the latest official one is very old and still contains this bug
A version that always boots reliably can be downloaded from CI pipeline at Pipelines · sebastiankrzyszkowiak / Jumpdrive · GitLab
To add to the previous reply: No, it doesn’t.
What “flash mode” really means is “send data and commands over USB”. So the phone will do whatever the host tells it to do … and in the case of Jumpdrive, the host will load Jumpdrive over the USB connection into the memory of the phone and then the phone will run Jumpdrive.
And that is exactly what I use to backup (image) my eMMC drive once I have booted Jumpdrive. dd
FTW.
So, to be clear, I am using the dd
command but it is running on the host computer. One benefit of that is that I am actually piping dd
through gzip
(to compress the backup) and my host computer, I am sure, is able to compress data faster than the Librem 5.
The clear advantage of backing up by booting from uSD card is that you can do a backup of the eMMC drive completely standalone, any time, any place. You are not dependent on the availability of a host computer.
The disadvantage might be that if you completely hosed your eMMC drive, you might no longer be able to boot from uSD card and would have to use Jumpdrive anyway. So it’s not bad to have it available on some host computer.
It’s unpredictable as to how “corrupt” it will be. It certainly won’t be a clean backup. If nothing else, when you go to mount the backup, it will complain that it was not cleanly dismounted (because the image was taken when the file system was mounted).
I could say more but … I would never do what you just did. dd
is great for a known good backup image, but it must be done when the file system is not mounted. But I think you understand that already.
Thanks for the info and the link. You rock!
Postmarketos has some info on booting from the sdcard for the Librem5 as well as on how to fully backup the eMMC:
https://wiki.postmarketos.org/wiki/Purism_Librem5_(purism-librem5)#eMMC_Backup_/_Restore
Probably modifying the created sdcard image to instead boot jumpdrive would be a decent starting point for users feeling adventurous without your guide.
Jumpdrive does also export the uSD card though. So that is an invitation to make a mistake (if you have booted from the uSD card).
@dos
Can you please explain what needs to be done when following the provided link.
What should I do at that page to get the latest jumpdrive (without the mentioned bug)?
Can someone confirm:
All HKS switched off means all devices are enabled?
Many thanks.
Yes, correct.
I would have interpreted this in the exact opposite sense i.e. disable all devices. Switch them off. Kill them.
For most operations in Jumpdrive, you won’t need any of the peripherals that are affected by the state of the kill switches and by disabling those devices you reduce the power requirement at boot (particularly given that you are being directed to “boot” without any power from the battery i.e. dependent solely on the USB power source).
I interpret it as all hardware kill switches disabled. If they are all enabled, then Lockdown Mode occurs. Similar wordings are inactive against active or dormant against engaged.
Sorry, I wasn’t suggesting that you are wrong, only that the text is highly ambiguous and is in desperate need of clarification from someone who knows (@dos) and then I can try to get the documentation updated (either way).
I’ve never had a problem using Jumpdrive (or using Serial Download mode more generally). It may be that it mostly doesn’t matter and the documentation is just trying to cover some niche scenario where it does matter.