Librem5 sd and boot order

That’s a second tier question though.

First question: Can the firmware boot from SD at all?

In particular, it must be possible to do this without doing a chain boot from the eMMC, in case the eMMC is hosed. This would be a prerequisite if you want to distrohop.

I don’t think anyone has ever answered this fundamental question. There are multiple topics that discuss this question - without a conclusion, I think.

Second question: Can it be made user-friendly?

This is always going to be relatively low level stuff, so may not be user-friendly.

Do you consider using the BIOS settings or boot disk menu on a regular x86 computer in order to adjust the boot order to be user-friendly?

Both typically involving bashing on some key as the computer is powered on. The boot disk menu tends to be easier to use than changing the boot order in BIOS settings. There is no keyboard on a Librem 5. Would it be acceptable to you if you had to attach a keyboard to change the boot order?

On a spiPhone you have to hold down various buttons during power on, like a Vulcan death grip.

1 Like

Good question, i don’t remember if someone told it was possible or not, because i could be confused with pinephone, but i hope so

a kind of selection on boot it’s fine for me, i think i.e. pressing vol down and vol up at the same time while booting could prompt the boot order and you will chose with the volume what bootable storage to u use

The i.MX 8M Quad can be fused to not allow booting from a microSD card.

I looked at the code at https://source.puri.sm/Librem5/uboot-imx/-/tree/librem5, but I couldn’t find anything to indicate whether booting from microSD is possible or not, but I don’t know what I’m looking for.

This post has some info:
https://community.nxp.com/thread/491892

3 Likes

It is my suspicion that
a) Purism won’t be fusing to disallow, and
b) it is nevertheless not possible at the current time

which would mean

c) the boot order is academic at the current time.

1 Like

One thing that I did find looking through the uboot code is that Purism has enabled the option to boot from the Cortex-M4F core on the i.MX 8M Quad, which makes sense to get the RYF certification.

3 Likes

The bootloader (u-boot) starts either from eMMC or USB (uuu). Bootloader cannot be launched from an SD card.

u-boot then loads the kernel, dtb and initramfs, also either from eMMC or USB (with uuu). Loading those from an SD card is theoretically possible, but will require drivers in u-boot since the SD card reader is a mass storage USB device behind a USB hub.

Once the kernel is loaded, it can mount the rootfs from any device. I’ve already successfully booted operating systems on Librem 5 with rootfs on microSD or external USB drive this way.

7 Likes

I personally think it makes more sense to boot off USB versus micro SD. Much faster that way. Kinda inconvenient to have a flash drive poking out the bottom of your phone, though, if you’re looking to take some OS for an extended spin.

1 Like

If you have stuffed up the contents of the eMMC drive and need to reinstall from scratch, it would be a great convenience to have a flash drive poking out the bottom of the phone - for the duration of that exercise. :wink:

That was my only real concern i.e. backup and restore and reinstall. Other than that I don’t have a particular desire to boot from SD card, and if I can do those things by booting from external USB then I am happy.

Thanks for your reply.
It will be possible somehow to backup and restore the whole emmc system in an easy way from usb with clonezilla like (dunno if support arm) what i really care is to backup and restpre the whole system

is it just me or have i become spoiled by the miriad of bootable-live-images out there that i spin up from an external usb-SSD (the cheapo kind) ?

booting from usb-thumb-drives is an exercise in patience :slight_smile:

This. :smile:

It will be possible somehow to backup and restore the whole emmc system

Not from the bootloader, but I’ve already done that with my device by booting Jumpdrive with uuu. It simply boots the Linux kernel from USB and then exports the eMMC and/or SD card via mass storage gadget with some simple scripts in initramfs.

It will be possible to have some noob friendly tool for doing it? a kind of image for usb that will do that automagically

“Image for usb”? No, I mean, booting from the kernel provided by PC via USB by using the flashing tool (but without actually flashing, just uploading to RAM).

I have a proof-of-concept fork of Jumpdrive: https://source.puri.sm/sebastian.krzyszkowiak/jumpdrive. All you need to do to build and boot it is:

make initramfs-purism-librem5.gz
uuu src/purism-librem5.txt

(you can boot the system with rootfs on an external USB drive and I did it once, but that’s not what I meant here :))

2 Likes

Still too complex for my very low knowledge, i hope in the future you could make this tool noob-proof :slight_smile:

If you keep sensitive information on your L5, you could boot the phone from an external USB drive that has a low profile (just a few milimeters), while maintaining an Android operating system (something familiar to the person who does the search) in EMMC. If someone is about to search your phone, you would just pull out the USB drive and reboot the phone before they take it from you. Hide the USB drive in your pocket where no one would think to look for it. Then when you get your phone back, you re-insert the usb drive and boot in to it again.

or insert it into some body-cavity … :joy:
look … giving advice in PRIVATE is ONE thing … but this is a PUBLIC thread … might i remind you that we do NOT want to HELP criminal people have an EASIER time avoiding JUSTICE …

tools can be used for BOTH evil and useful things … we should damn well remember that … :sweat:

1 Like

There are a lot of people out there that will find a way if they want to break the law. They don’t need my help. On the other hand, the average guy has a right to privacy. There is nothing wrong with helping anyone who wants to maintain their privacy. If they break the law, it’s on them. In the meantime, most governments right now are abusing the hell out of people’s privacy rights. Maybe now, the cop that searches your L5 will know to search your pockets and find your USB drive too.

That’s the real issue with this being a public discussion.

1 Like

so what was the point in the first place if we just give PUBLIC advice to BOTH parties ? :rofl:

assuming that there ACTUALLY are TWO parties :crazy_face: