Time to flash is now - but how?

This was recently absolutely necessary, and it probably still is. I flashed like a week ago, and this is the command that I used and wrote down in my logbook:

sudo ./scripts/librem5-flash-image --stable --dir ./

I also had difficulties in getting the image. I’m not sure if the command above expects that you have already downloaded (and maybe untarred the image in the scripts directory).

This would be great. Preferably the instructions on this page should work perfectly and should be very clear.

1 Like

Yes, my edits are to that page. It’s a work-in-progress.

Broadly speaking --dir DIR should be used if you do actually do two passes … one to download the image and one to flash the image.

2 Likes

I wonder if it is possible to let the script prompt for input:

  1. Install stable release with LUKS (disk encryption - recommended)
  2. Install stable release without LUKS (no disk encryption)
  3. Install unstable release with LUKS (disk encryption)
  4. Install unstable release without LUKS (no disk encryption)
  5. Install downloaded release <==more prompts needed
1 Like

It’s written in Python. May the source be with you.

I think I would use the word “latest” rather than “unstable”. And with this approach, I wouldn’t even mention the word “LUKS”. Just “disk encryption” will do.

Perhaps that behaviour could be an option e.g. if no arguments specified then walk the user through it (but if any arguments are specified then assume that the user knows precisely what he or she wants, and has asked for that).

Rather than try to cover all possible combinations, maybe it would be better to ask individual questions. Defaults can cover the recommendation.

However my focus at the moment is accepting the script as it is and coming up with instructions that give the best possible chance of success with that script.

2 Likes

Thank you, I see your point.
Since I don’t know Python I would be joining the dark side. :smile:

Of course, I was only making some suggestions.

That is even a better way of doing things.

1 Like

I’m not as experienced as you and have only just over a years experience reading here, and elsewhere and jiggering the devices OS, and learning more than one should have to. That is why I am skeptically leery.

1 Like

OK, I thought so.
I’ve send my L5 the first time to Germany, and next time to the US.
All went fine. Sending and receiving the L5 was no problem.
I only have problems with my countrie’s way of handeling import/tax duties.
I had to pay them again, but this is something beyond control of Purism.

1 Like

and @irvinewade

Now trying the

Under " Make sure you have installed all python dependencies sudo apt build-dep .. I get the following gibberish:

pure1@pure-pc:~/librem5-flash-image$ sudo apt build-dep …
E: Unsupported file … given on commandline
E: Must specify at least one package to check builddeps for
pure1@pure-pc:~/librem5-flash-image$

I’m stuck at this and in a holding pattern. Low on fuel. I’ll await new instructions.
~s

1 Like

I see a slightly different command:
sudo apt build-dep . .

1 Like

Voila! It did something. Ended at:

Processing triggers for man-db (2.9.4-2) …
@ anyone?
After following the rest (almost) of the commands I still get:
pure1@pure-pc:~/librem5-flash-image$ ./scripts/librem5-flash-image
2024-04-29 13:08:20 INFO Looking for librem5r4 luks byzantium image
2024-04-29 13:08:29 ERROR No matching image found
pure1@pure-pc:~/librem5-flash-image$

Where do I get one those “luks byzantium” things and should it be somehow placed in to the pure1@pure-pc:~/librem5-flash-image$ folder?

The steps I followed are what I assume are the latest install found in Reflashing the Phone

If I had dynamite, I’d reflash this the easy way.
~s

1 Like

Are you shure this is right?
On the re-flashing page I cannot find “librem5r4

1 Like

Yeppers. It’s in “scripts”

pure1@pure-pc:~/librem5-flash-image$ dir scripts
librem5-devkit-flash-image librem5r2-flash-image Makefile
librem5-flash-image librem5r3-flash-image
librem5_flash_image.py librem5r4-flash-image
pure1@pure-pc:~/librem5-flash-image$

BTW. I just follow orders and cut & paste.

1 Like

What happens when you just run:

./scripts/librem5-flash-image

Info:
I’m gonna get some sleep now, it’s near midnight.

2 Likes

pure1@pure-pc:~/librem5-flash-image$ ./scripts/librem5-flash-image
2024-04-29 13:52:49 INFO Looking for librem5r4 luks byzantium image
2024-04-29 13:52:58 ERROR No matching image found

Weird huh! Have good rest.
~s

1 Like

Are you aware that
Google layoffs: Sundar Pichai-led company fires entire Python team for ‘cheaper labour’

~s

1 Like

:frowning: OK I think both commands are wrong. (I’ve added that to my list of things to edit.) However most of the time, you can ignore that command anyway. I have never done it (because I have assumed that I have everything that is needed already installed, which admittedly may not pan out as an assumption).

On this point you are better off following post 16 above which just directs you to install some hard-coded dependencies in step 1. I think you have probably already got past that step.

Reiterating … I suggest you add --stable as an argument when you run the shell script to flash the phone.

That would be in addition to your choice of variant (encrypted or unencrypted) - but at the end of the day, if you can complete the flash process at all, you will be in a good position to flash with the variant that you actually want.

2 Likes

luks builds are failing, see Image Build [Image Builds] [Jenkins]

looking into the build logs of these builds show

ERROR: command failed: ['cryptsetup', 'luksClose', '/dev/mapper/crypt_root']

Device /dev/mapper/crypt_root is still in use.

Creating disk image
Creating partitions
Using bootoffset: 5mib 5242880 bytes
Using bootsize 493mib: 512000000 bytes
EEEK! Something bad happened...
command failed: ['cryptsetup', 'luksOpen', '--key-file', 'passphrase.txt', u'/dev/mapper/loop37p2', 'crypt_root']

Device crypt_root already exists.

.
.
.
By default librem5-flash-image script downloads the luks variant, so try the plain variant.

3 Likes

This time it at least had a happy ending. t’s not the same since last up-grade/date - change where there is a icon with a dinosaur, and other additions I can’t remember. Still cannot get rid of the orange square with a small ! in it the square over the mobile bars, top left. Meaning, still can’t send text w/. image (small image - the one below)

But this time around #7 I think, resulted in:

I gather there are a lot of update/grades to get down.

I did what @irvinewade and @amarok and @shopping4purism and yourself suggested. Together, it installed this time.

Now to bring it up to snuff. sudo apt update says there are 131 “packages” update…
Wow, I updated and upgraded (I think) without asking how. Like a spitball, some things still stick in my head.

4 Likes

You can remove the exclamation mark by toggling mobile data off and on.

Great news!
I dear not mention it, but perhaps now is a good time to create a backup image of your phone by using jumpdrive.
With such image it is far more easy to restore the state of your L5 compared to flashing the L5.

2 Likes