Booting the Librem 5 Linux installation on your desktop PC's hardware

I have that idea and I would like to know if it is possible (even if there has to be some work to be done) and what you think about it.

Wouldn’t it be cool to use your Librem 5 as the primary or leading device? You plug it in your full size monitor and connect it to your keyboard and mouse and use it like a desktop PC. So far so good, but an up to date dekstop PC will propably always have more horse power than every mobile device.

If we go a step further we could degrade the desktop hardware from a autonomous linux installation to a slave running the linux already installed on the mobile (Librem 5). That way we would have one system with all our data (microSD cards up to 2TB :D) and we have full power hardware acceleration when needed or available.

We have already an Linux installation on the Librem 5. We also have desktop PC hardware and we have a USB connection between them. Also it is already possible to boot up a linux system from USB. 1. We could do so with a live system for purpose of testing, installation, anti-virus, forensics etc… 2. We could install a linux system on a USB storage like if it is a ordinary harddisk. 3. There is something called a “frugal install”. Seems to be a linux image similar to a life system, but copied onto the harddisk.

Actually I do not understand all the differences between these three approaches completely, yet, but it seems that we do not have to start by zero.

In an older book about linux system administration I read that it would be possible to share parts of the linux installation (over the network) between multiple linux system running parallel. Thats seems plausible to me, because some parts of a linux installation are static to a high degree, like the binaries of installed software. They are only changed when software is installed, deleted or updated. So comes handy for us.

It get more difficult when we look at parts that change at runtime like log, temporary data, user generated data etc.

When we want to boot up the linux installation on our mobile on the desktop PCs hardware we must decide what happends with the mobile system. The problems of shared data decrease if we decide to run one system at a time only, either the desktop or the mobile. If we decide to keep the mobile running while the desktop hardware runs another instance of the linux installation than maybe it would help to separate the workspace in filesystem which both instances use from each other.

I would be glad if you say: “Yeah, that works, just do this…”. :smiley:
Realistically I don’t expect anything, but maybe we can discuss if it is possible and how and what steps would be needed to be taken and if it is a good idea anyway.

Thanks for reading.

I think the closest you could get (without major development effort) would be to put a Linux on a separate USB-drive and have it use the data (and/or profile) of the L5 that you also attach to the PC.

Background:
First, L5 image is ARM64, your PC needs an AMD64 image. Close, but no match :wink:
Of course, you could put a secondary image on the SD card or internal storage, but I doubt you could use this as boot drive for a PC - most certainly not if the L5 is powered off, and likely not without development effort when it is powered on.
Second, when the L5 is powered on, the profile (/home/prolog/*) is in use. It is probably a bad idea to access it from two devices at the same time.
One could develop a special mode that allows access to the profile (and/or SD-card) exclusively either to the L5 or the PC it is attached to - effectively being logged out from the L5 while using the profile on the PC.
Skipping the profile and just share the data partition on the SD card would be much simpler.

All in all… I don’t think it’s worth the hassle.
In convergence mode, the L5 should be capable to fulfill all basic office needs, and the next generation will even be better at that.

Until then, when you have the need, just share the data partition with the PC via network.

The road to hell is paved with good extensions. :slight_smile:

Clearly this isn’t a Day 1 feature.

The idea of a device (including a phone) becoming a server when connected via USB is not entirely new. I think there are protocols that are designed to allow safe, shared access to files (i.e. the phone can continue operating normally).

The “server” mode could extend beyond merely sharing its files but also to offering other services to the PC, such as use of the GPS / other sensors / modem for voice calls and SMSs / touchscreen.

Offering use of the modem for data is pretty standard (tethering). Unclear whether that will be available at Day 1.

Says who? :slight_smile: Your PC could itself be ARM64.

The distro that the phone uses could in any case be built for AMD64.

However there’s a big can of worms either way.

  • even making it boot on the PC
  • covering for hardware that is present on the PC but absent on the phone
  • covering for hardware that is present on the phone but absent on the PC

If you just want to boot the phone’s distro on the PC, some kind of emulator (with or without JIT compilation) may work. It remains to be seen whether an emulator without JIT would actually run faster on the PC than the real thing on the phone, and you still need to cover for hardware mismatch.

Thanks for answering.

I wonder if Multiarch could be of any help. Sound it is more the other way around. To crossbuild or run software of different architectures to/on one target architecture. I did not dive into that, yet.

https://wiki.debian.org/Multiarch/

This hole idea seems to be megalomaniac but nonetheless it would be a killer feature. :smiley: I keep that idea in mind as a long term one. If you like you can do that, too and bookmark.

Booting may be more challenging than running an isolated “foreign” binary. If we ignore the BIOS itself then you would presumably need support within the BIOS to boot an ARM binary on x86_64. Perhaps not impossible but may go beyond what Multiarch plans to cover.

I’ve never viewed the 32/64 problem as being a key problem in the open source world. Any legacy 32 bit stuff can (and should) just be compiled, or fixed and compiled, to run as 64 bit. That is half the point of open source.

Not too many regular computer devices are 32 bit any more anyway. When even your phone has a CPU that supports the 64 bit instruction set, I wouldn’t be too sad if mainstream computing said goodbye to i386 and 32-bit ARM.

No. Multiarch is only for compatible architectures. If your CPU supports x86 and amd64, you can install them multiarch.
As your amd64 CPU does not support arm64, you can’t multiarch it, despite the similar looking names :wink:

The multiarch concept could possibly be enhanced in a way that most binaries would be installed in parallel for multiple architectures, but it seems much simpler to have separate partitions for each arch and then share the data partition.