Installation failed: bootloader installation error

/usr/lib/calamares/modules/bootloader/main.py

        else:
            check_target_env_call([libcalamares.job.configuration["grubInstall"],
                                   "--target=" + efi_target,
                                   "--efi-directory=" + efi_directory,
                                   "--bootloader-id=" + efi_bootloader_id,
                                   "--force"])

should be this part where you can add the --removable like so:

else:
check_target_env_call([libcalamares.job.configuration[“grubInstall”],
“–target=” + efi_target,
–efi-directory=" + efi_directory,
“–bootloader-id=” + efi_bootloader_id,
“–removable --force”])

as dalto corrected me like so:

            check_target_env_call([libcalamares.job.configuration["grubInstall"],
                                   "--target=" + efi_target,
                                   "--efi-directory=" + efi_directory,
                                   "--bootloader-id=" + efi_bootloader_id,
                                   "--removable",
                                   "--force"])

only make sure to find the right scriptlet as it comes after the one for ZFS..

edit:

issue with the format.. may @dalto will know faster how to add the option..
:dotted_line_face: :face_in_clouds: :smirk:

1 Like

You can’t add combine args into a single arg like that.

Like this:

            check_target_env_call([libcalamares.job.configuration["grubInstall"],
                                   "--target=" + efi_target,
                                   "--efi-directory=" + efi_directory,
                                   "--bootloader-id=" + efi_bootloader_id,
                                   "--removable",
                                   "--force"])
1 Like

:man_facepalming:
indeed the ,

2 Likes

Ok, so I tried a bunch of stuff you suggested, and it worked I think, but is showing another errors now.
I did some tries on different things

  1. I booted on the live, created the table with gparted, updated the mirrors and then changed the calamares config as said on /usr/lib/calamares/modules/bootloader/main.py. Then I opened the installer and it showed an error related to pacstrap. Something similar to this post on endeavour forum

  2. I did all the same, but before, I ran the command sudo pacman -Sy archlinux-keyring mentioned in the link. It showed the same pacstrap error.

  3. I did the same but without creating the table with gparted, and now it “worked”, but it shows something about a “Boost.Python error in job “bootloader”” with this description:

<div><strong>&lt;class 'FileNotFoundError'&gt;</strong></div><div>[Errno 2] No such file or directory: '/tmp/calamares-root-_xii2tcm/boot/efi/EFI/endeavouros-9696/grubx64.efi'</div><div><br/>Traceback:</div><div><pre>File &quot;/usr/lib/calamares/modules/bootloader/main.py&quot;, line 778, in run
    prepare_bootloader(fw_type)

  File &quot;/usr/lib/calamares/modules/bootloader/main.py&quot;, line 749, in prepare_bootloader
    install_grub(efi_directory, fw_type)

  File &quot;/usr/lib/calamares/modules/bootloader/main.py&quot;, line 658, in install_grub
    shutil.copy2(efi_file_source, efi_file_target)

  File &quot;/usr/lib/python3.10/shutil.py&quot;, line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)

  File &quot;/usr/lib/python3.10/shutil.py&quot;, line 254, in copyfile
    with open(src, 'rb') as fsrc:</pre></div>

and it gave me this link with the procedure https://termbin.com/n5l2

  1. Then, for the sake of trying another thing I did the same as the point 3, but I added the option @pebcak said, --no-nvram, so my calamares file ended lookind like this:
check_target_env_call([libcalamares.job.configuration["grubInstall"],
                                   "--target=" + efi_target,
                                   "--efi-directory=" + efi_directory,
                                   "--bootloader-id=" + efi_bootloader_id,
                                   "--no-nvram",
                                   "--removable",
                                   "--force"])

Then I tried to install again and it showed the same pacstrap error, with this link https://termbin.com/738a.

  1. As I thought the pacstrap error was really weird I wiped the disk with gparted, downloaded the iso again, burned it to a different usb (though I don’t think is the usb, as I installed on another system EnOS with the same one without issue) with popsicle and tried the process again. Booting, updating mirrors, running sudo pacman -Sy archlinux-keyring, changing the calamares file with --no-nvram and --removable, opening the installer and it gave me the same Boost.Python error https://termbin.com/5ubc

I don’t know what’s the deal with the pacstrap error, as it seems random for me how it shows up and I don’t know if it’s important, but I’m using the 22_1_iso file on every try, and I’ve trying to install kde with printing options marked. With swap with hibernate too. I don’t know what else to try.

What is the hardware? Post the link

inxi -Faz | eos-sendlog

This is it: https://clbin.com/w4ynK

Yes. Don’t mess with Calamares. Too many legs… :octopus:

Run the grub install command (as suggested in Archwiki) and watch for error messages.

If the removable method fails (with some message), post the message. Then you can try the same thing, but manually (no grub command). It’s also in the linked Archwiki method. Use move (mv) command to copy the existing efi file (assuming it is there) to the fallback path (esp/EFI/BOOT/BOOTX64.EFI, where esp is your fat32 EFI partition, which you would have already mounted ).
Do one thing at a time and report error messages.


Note: In a partition with fat(32/16) file system, small and capital (latin) characters are the same thing, unlike with other Linux type file systems.

Would be interesting to see if archinstall would get it right.

I guess the problem is with the mirrors.

On one output you have mirrors from Chile only. I have no idea how well they work, but it has been proved to be advisable to have more than one countries on the list. So you could try using reflector-simple just before starting the install process, and add United States and Germany as mirror countries in addition to your country. Often US and DE mirrors are great choices worldwide.

1 Like

I agree with this 100%

Thank you all for the help and tips. Finally I had to get that system working for a sudden emergency in need for a working laptop, but I’m taking notes for trying again in the future. Great community :grinning:

It’s most likely a mirror issue so when you try the install it is best to update the mirrors and make sure you add US and DE when you do that.

I missed the evidence that suggest it’s a mirrors issue. The only useful messages talk about bootloader module failing.

I need to learn more about Python… :laughing: Maybe next decade… It’s too hot these days.

1 Like