Possible to make/save Librem 5 distro + data as an image file?

I have been trying ./boot-purism-librem5.sh --variant luks but I always seem to get the same response, that being ./boot-purism-librem5.sh: 3: uuu: not found

I just want to understand some things:
1/ do I need to install anything, other than the Jumpdrive, to get this to work.
2/ if so, can anyone tell me how and why trying to cmake or make the mfgtools keeps failing on me? (please check the code I’ve provided below)

So I followed these commands:

git clone https://github.com/nxp-imx/mfgtools.git
cd mfgtools
sudo apt-get install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++
cmake . && make

I made it all the way to cmake .&& make but I get this error here:

Checking for module 'zlib' 
--   No package 'zlib' found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
  uuu/CMakeLists.txt:9 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
See also "/home/USER/mfgtools/CMakeFiles/CMakeOutput.log".
See also "/home/USER/mfgtools/CMakeFiles/CMakeError.log".

Is there anything that I could be missing?

Did you try to install zlib?

Thanks @Gavaudan but all I got is E: Unable to locate package zlib

Yes, but you would need to check the version that you have of that distro and track that back to the version of Ubuntu upon which that version is based - and then you will know whether uuu should be in the repo or you have to build it yourself from source (although of course it is open to any distro to exclude software that would otherwise be there - so it depends on how closely it is based on Ubuntu).

Try zlib1g (I would myself, but I’m not near any kind of Debian machine).

1 Like

Oh, I see where you are coming from now.

According to the system monitor, this is a MATE 1.24.0 but the wikipedia page states that it’s Ubuntu 20.04 LTS (Focal Fossa).

I have a feeling this needs to be made from source, huh?

Quoting from the link in post 4 above:

These instructions are for Ubuntu 20.04 (focal) but should point you in the right direction for other Linux distros.

Building uuu should not be needed as of Ubuntu 21.04 (hirsute) because uuu is included in the distro. You would still need to build Jumpdrive however.

So, yep.

You might try a Ubuntu Live Boot.

(Purism has made Jumpdrive available as a download so you wouldn’t need to build it from source.)

1 Like

Although I’m a little late to the party, I have to say, now that I got around to setting up Jumpdrive and took a partition image (drive image too), it gives a whole new flexibility and safety to using L5. Tested it and it’s one simple way to return to previous working state when I test stuff since all the apps and settings return too - better than flashing a basic state L5 image. Took 2 hours on slow USB2 to make and one hour to return. Very straight forward to have this. Two thoughts:

  • Isn’t this an overlooked selling point? A new additional positive feature - there isn’t similar available in iOS and Android, is there?
  • Can this be used as a way in and is there a simple way (sw switch perhaps in L5 mobile settings?) to prevent the use of Jumpdrive?
4 Likes

I can’t believe I looked past that.

You know, although I would love one built from source on my current distro, I think I will take that advice for the mean time.

Thanks everyone. I hope I haven’t sounded impatient or anything, but I really am grateful for your help.

I’ll let you all know how I get on.

Thanks again

1 Like

btw, I don’t suppose you know if jumpdriving works from a raspberry pi aka an arm64 device?

Does restoring from a recent DejaDup backup accomplish the same? (genuine question)

I don’t know but there’s just no need for it. You take the uSD card out and image it on any computer.

I was doing dd | gzip with a fully configured but relatively empty Librem 5 running Jumpdrive and it only took 9 minutes to image. So it is basically limited by the read speed of the eMMC drive, is able to compress the empty space well (and the empty space is being compressed on the host anyway). This speed is around USB 2.0 speeds, so I doubt that USB 3.0 would make much difference (but I probably was using a USB 3.0 port on the host). Consequently, I am wondering why yours took 2 hours?

It’s complicated. I think Apple would argue that you should assimilate yourself into the AppleBorg and then Apple will take care of everything. :wink:

In reality, it is complicated. For example, if you had to blow everything away on your iPhone then it will automatically want to redownload the apps that are associated with your account and in theory if the apps are storing their config in the iCloud, the config might come back too. (Whether this is any good depends on the speed of your internet. Last time I did this, which was quite recently, it was tedious in the extreme. Takes hours to redownload all the apps.) And in theory you can store all your documents in the iCloud too - but what sane person would do that? :wink:

Current stable version of Trisquel is too old and lacks the package. I see that Trisquel 11 contains it already.

I see that you have troubles identifying the package names of dependencies, so compiling it manually will be painful.

I’d recommend you to try compiling the package, with a bit of luck it should be able to handle all the dependencies automatically:

sudo apt install git-buildpackage
gbp clone https://salsa.debian.org/DebianOnMobile-team/mfgtools
cd mfgtools
sudo apt build-dep .
gbp buildpackage --no-sign
sudo apt install ../uuu_1.4.193-1_amd64.deb

(adjust the final deb filename if necessary)

It should work.

You can’t take eMMC out.

1 Like

I understand that but the mainstream Raspberry Pi devices don’t have eMMC. (Some of the Raspberry Pi Compute Modules have eMMC.)

The question was (or at least I interpreted it this way) whether Raspberry Pi can be used as a host to launch Jumpdrive on a Librem 5 to image its eMMC.

2 Likes

sudo apt build-dep got me this, I’m afraid:

 sudo apt build-dep .
    Note: using directory '.' to get the build dependencies
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies.
     builddeps:. : Depends: debhelper-compat (= 13)
    E: Unable to correct problems, you have held broken packages.

And gbp buildpackage got me this:

gbp:info: Creating /home/USER/mfgtools_1.4.193.orig.tar.gz
gbp:info: Performing the build
 dpkg-buildpackage -us -uc -ui -i -I
dpkg-buildpackage: info: source package mfgtools
dpkg-buildpackage: info: source version 1.4.193-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Henry-Nicolas Tourneur <debian@nilux.be>
 dpkg-source -i -I --before-build .
dpkg-buildpackage: info: host architecture amd64
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper-compat (= 13) help2man libzip-dev zlib1g-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i -I failed
gbp:error: 'debuild -i -I' failed: it exited with 29

I think I may need to stick with using the ubuntu live distro for now, but many thanks for trying

My bad then. Yes, I interpreted the question completely differently. It will be up to @TM20 to clarify the intent.

Sorry, I was just really searching for what my options are really. Even if I could just say Jumpdrive my device, it would be more than enough, whether I dd or clone from another computer afterwards or whatever.

That is a different level, I think. You can backup/replace/version (from top to bottom) whole files, file parts/contents, single disc partitions, whole discs, and finally physical discs. Deja is a level or two higher. Each has their benefits and drawbacks (speed, size, granularity etc.). For one particular use case that partition image is good for, is to wipe what is underneath and start over - if you don’t know what changes have taken place (a possible glitch, intrusion or in my case, I’ve messed up the system by using the wrong commands and deleted a bunch of stuff and can’t remember what I need to replace). At worst, the system might not even be usable to run a restoration from backup. That being said, file level back up is better for versioning those etc.

I think my slowness was not due to L5 but the old USB of the desktop computer and HD used. And with proper USB C (3) it would be totally different. The slowest part sets the speed of the whole. But, even at that, it’s only an hour to get the L5 to pre set up working condition including all my personal tweaks, so no complaints.

1 Like