Does not allow you to download the script for restoring the phone librem 5

I tried two different connection points, the Internet is stable. Nothing helps (((( Please help me solve the problem.

I tried to repeat the procedure several times and errors pop up at different times. I repeat, the Internet speed is excellent…

Check if all the Hardware kill switches are in off position

1 Like

Another thing the command ./scripts/librem5-flash-image does not provide the disk encryption out of the box. For getting is you should be using the ./scripts/librem5-flash-image --dist byzantium --variant luks command

You are right now within wrong librem5-flash-image folder, definitively! You might like to use su rights but not under /root directory. Therefore (from your current standing point):
ls -la
Content of current (obsolete one) librem5-flash-image folder should be EMPTY!
rmdir librem5-flash-image
exit ( or and only if you insist : cd /home/etc.)
mkdir MY_L5_Byzantium_Flash

@serlibrem: Try adding --download-attempts 0.

@Quarnero: sorry, I don’t follow what you’re trying to say there and how that would be supposed to help.

1 Like

From @serlibrem post:
fatal: destination path 'librem5-flash-image' already exists and is not an empty directory.

Otherwise my post (suggestion) is wrong indeed:

~/librem5-flash-image/scripts# ./librem5-flash-image
2022-04-13 20:33:28,866 INFO Looking for librem5r4 plain byzantium image
2022-04-13 20:33:32,625 INFO Found disk image Build 10877 'plain librem5r4 byzantium image' from Wed Apr 13 02:44:19 2022
2022-04-13 20:33:34,309 INFO Found uboot Build 82 from Fri Sep 10 20:19:03 2021
2022-04-13 20:33:34,309 INFO Downloading to ./tmp_librem5-flash-image__0w8v429
2022-04-13 20:33:34,898 INFO Downloading image from
                                                                                                        2022-04-13 20:38:22,804 INFO Calculating sha256sum of ./tmp_librem5-flash-image__0w8v429/librem5r4.img    
2022-04-13 20:39:23,779 INFO Downloading uboot from
 80%|███████████████████████████████████████████▎          | 860160/1073880 [00:00<00:00, 2141448.77it/s]
            Turn all Hardware-Kill-Switches off
            Remove battery
            Hold volume-up
            Insert the USB-c cable: (red light blinks, no green light)
            Reinsert the battery: (red light is constantly on, the script will continue)

100%|█████████████████████████████████████████████████████| 1073880/1073880 [00:11<00:00, 2141448.77it/s]
^C2022-04-13 20:45:49,119 ERROR CTRL-C pressed.
2022-04-13 20:45:49,120 INFO Cleaning up.

When I flash with ./scripts/librem5-flash-image --dist byzantium --variant luks, my root partition is quite small.

1 Like

Yes, that is the problem with the LUKS image. It sees only 3 GB disk space and not 32GB. So a manual change is required

I followed @Loki’s instructions here when I flashed my Librem 5

Yeah, but that’s harmless, as I can see that the script they’re using is already in the latest version anyway.


I would still repeat/recommend (rather than suggest) to @serlibrem to move away from /root with cd /home/his_user_name folder and repeat:

git clone


1 Like

root@pureos:~/librem5-flash-image# $ ./scripts/librem5-flash-image --download-attempts 0
Could not find command-not-found database. Run ‘sudo apt update’ to populate it.
$: command not found

root@pureos:~/librem5-flash-image# ./scripts/librem5-flash-image --dist byzantium --variant luks command
usage: librem5-flash-image [-h] [–dir DIR] [–dist DIST] [–skip-cleanup] [–skip-flash]
[–download-attempts DOWNLOAD_ATTEMPTS] [–variant {plain,luks}]
[–board {devkit,librem5r2,librem5r3,librem5r4}] [–debug] [–image-job IMAGE_JOB]
[–uboot-job UBOOT_JOB] [–udev]
librem5-flash-image: error: unrecognized arguments: command

You typed some extra stuff there. Try this:

./scripts/librem5-flash-image --dist byzantium --variant luks --download-attempts 0


your git clone… was dirty. (fatal: destination path ‘librem5-flash-image’ already exists and is not an empty directory.)

Maybe it will help if you remove/delete it, and restart that cloning over a stable connection.
Afterwards you can download the 1.1 GB Image of Librem again. If that does not help you can use wget and the Link of that file to download it directly without the script. However you have to save that file in at the location where the download script would place and save the data.

Edit: Can you post a sha512sum for your librem5-flash-image or librem5r4.img.xz file?

1 Like

Yes, I’d like to very agree with you with/for those three reasons:
– if currently some questionable Live PureOS Calamares system installer setup in use (for this purpose),
– “maybe” is not an option there, it is mandatory to “remove/delete” current content of the 'librem5-flash-image' directory/folder (I’ve already proposed to avoid it, as is, the one in use, anyway),
– if at least one of above two environments not changed (actually cannot see clearly … perhaps Downloading to ./tmp_librem5-flash-image__XXXXXXX have not enough room to complete …) even mkdir my-second-approach and cd my-second-approach, before git clone ..., will not help there (@serlibrem please try again with mkdir ...).

In short: :~# or just ~ sign needs to be replaced with: /, like this:

:~# cd /home

Please restart/repeat here related procedure from there.

Download: 50%|███████████████████████████▌ | 2086830773/4169273648 [1:43:56<1:23:59, 413195.13it/s2022-04-14 08:07:36,661 INFO Cleaning up.████▍ | 2409672476/4500000256 [1:43:56<1:18:37, 443135.04it/s]
Traceback (most recent call last):
File “/root/librem5-flash-image/./scripts/librem5-flash-image”, line 475, in
File “/root/librem5-flash-image/./scripts/librem5-flash-image”, line 448, in main
download_image(urljoin(image_ref[‘url’], ‘artifact/{}.xz’).format(IMAGE.format(board)),
File “/root/librem5-flash-image/./scripts/librem5-flash-image”, line 206, in download_image
OSError: [Errno 28] No space left on device

1 Like

Well, here you have your problem served right to you:

No space left on device

Free up some space.