How to reset L5 eMMC booting to default state?

I flashed a bad image on my Librem 5 and now it doesn’t work. Totally my own fault, described in another thread.

But someone reached out to me in a private message and suggested that I try to write over the boot partition with an updated one, in case this might help. To be clear, this is an L5 which will not boot, and I wrote over the entire eMMC with the flash script that flashes back to PureOS Byzantium at least 3 times.

Is there a way that all of those attempts at flashing – which I can verify with Jumpdrive did change the eMMC contents – would have not re-imaged the boot partition? Or is there another boot / bootloader storage outside of the eMMC that the person messaging me might be thinking of, and that I could somehow independently access?

I’m curious because it sure seems like flashing “the wrong image” on my Librem 5, as software, has destroyed it. And I guess that makes sense that that was always a possibility but I’m mostly a software guy and it’s usually fun to think that we can try a different software on our devices and that if that doesn’t work, we could revert back - like what you would get on an x86 PC with some enthusiast Linux variant.

So I’m hopeful that what the person in the private message sent me is correct that there is some boot sector I need to image that I don’t know about, or maybe a second eMMC or second part of eMMC that I need to access independently.

2 Likes

I am probably totally useless (and possibly worse) but can you somehow connect it to another computer, open a terminal, and somehow use software like Gparted to access the Librem 5 boot partition?

1 Like

Given your symptoms (blinking green LED) I don’t think that’s it, but it won’t hurt to try anyway.

Run this command in u-boot: mmc partconf 0 0 7 0. This resets the eMMC boot partition setting back to the user partition.

You can do it either over serial console or with uuu using ucmd.

5 Likes

Thank you @dos !

I am writing you this message of thanks from the Librem 5 that is now magically allowed to boot again by doing what you said!

However, I was only able to boot from my non LUKS SD card. The LUKS eMMC recently flashed instance was spinning waiting for cryptsetup password, but not creating the onscreen keyboard during boot to enter that password. Is there another different uboot incantation that enables the onscreen keyboard?

What documentation should I read to learn these things so that I do not burn up your time, good sir? I would not have guessed ucmd mmc 0 0 7 0 on my own, and yet this made a nonbooting device become a booting device - where I can use it to write you this message.

Thanks again and even if you just read this message and laugh, and don’t have time to reply, I hope you have a wonderful day. (I know it often is the way of the world that when people know things, like how you knew the 0 0 7 0, they end up under appreciated and eventually replaced by the less experienced people who don’t know things. So, I really appreciate your time.)

5 Likes

The DAS U-Boot documentation:

The U-Boot Documentation — Das U-Boot unknown version documentation

1 Like

Can you provide an update on the current state?

Can you boot at all from the eMMC drive now?

After applying the fix from dos above, I would be inclined to reflash from scratch, given that your phone has spent a lot of time in some really weird states.

2 Likes

I flashed the eMMC with a non-default image. That is to say, before the “saga” I booted to an SD card and used dd to copy the mmcblk off to a big external hard drive.

After it was in the state described above where it could only boot from SD card, I used dd to put back the image from on that external backup drive.

After that, it appeared to boot very normally and let me enter LUKS password and everything. But I wondered if maybe it was running hotter than it used to, or possibly a little slower. Maybe I’m just growing accustomed to the additional Liberty Phone performance; I’m not sure.

2 Likes

I guess we may never know whether your phone’s brief visit inside the Google-borg has made any other persistent changes.

I’m glad to hear that Android did not permanently brick your phone.

3 Likes

Yeah. To be clear, basically I ordered a Librem 5, liked it, ordered a Liberty Phone, and since then only occasionally used the Librem 5. More often frequently I use it as a form of expensive spare battery charger.

So, on “my phone” I have intentionally never even installed Waydroid. Been somewhat lean, although I suppose as time goes on the idea that it would be some untouched secure place of beauty is still questionable. I’ve connected to insecure public WiFi a few times, etc., and recently even added the ppa for Brave Browser without doing a lot of research on the security implications of that, because I was interested whether it would outperform Epiphany and Firefox ESR at 1080p video on Byzantium.

But even when the backup became a backup, and I did all the crazy things with it like installing Waydroid (+Google Play Services and Google Play Store) and disassembling the device and breaking off bits inside (and ordering replacements) and now attempting to run Android… Admittedly when faced with the “it’s probably super dead” reality, I was a bit let down. It was sure a relief to see it run again.

4 Likes

Just to be clear and so people don’t get ideas: booting a GNU/Linux image meant for another i.MX8MQ board would also be a very bad idea:)

Build some AOSP-based distro with Mesa and Purism’s kernel tree, potentially adjusting the kernel config a bit for what Android recommends. Integrating everything to work well is another matter, but if you just want it to boot to GUI it really shouldn’t be hard.

4 Likes

Yep,

a very bad idea

but fortunately in this one case, for this one user, recoverable.

2 Likes