Install failure(s) with pacstrap error/bootloader

Hi, I’m trying to install EndeavourOS with i3wm/BSPWM, but the installations fails with different error messages. Most of the time it is “installation failed with pacstrap error”, but sometimes “bootloader installation error”. The latter also says this:
The bootloader could not be installed. The installation command <pre>grub-install --target=i38-pc --recheck --force /dev/nvme0n1</pre> returned error code 1.
I should add that /dev/nvme0n1 is one of my three drives, one which Windows 11 is installed on, while I’m trying to install EndeavourOS on /dev/sdb, a dedicated drive. I think the latter is where grub/bootloader for dualbooting was installed on before I attempted to install EndeavourOS on it. Is this where the error may be coming from?

I’ve looked up some potential solutions - the keyring update: https://is.gd/KGqZvC, updating mirrors before installation, creating manual GPT table in GParted, but nothing seems to work.

I have two log files: one for the pacstrap error: https://termbin.com/5pq0 and one for the bootloader error: https://termbin.com/7g2w

Other details: I used rufus to create the USB and am using online installer.

From the live session, the output of

sudo parted -l

and

efibootmgr -v

should provide some clues as to your disk layout and the existing EFI boot entries.

Please post the output as text and format it by highlighting it and pressing Ctrl-E.

Provide details of your installation mode, automatic or manual etc.
Assuming that your system supports UEFI boot mode, go into firmware settings and disable Legacy/CSM boot mode and boot your live usb in UEFI mode.

Also, the issue with pacstrap might be solved by refreshing your mirrors from the Welcome app pop-up prior to launching the installer.

2022-11-12 - 14:09:59 [6]: [PYTHON JOB]: "pacstrap: error: failed retrieving file 'attr-2.5.1-2-x86_64.pkg.tar.zst' from archlinux.grena.ge : Failed to connect to archlinux.grena.ge port 443 after 6 ms: Connection refused" 
2022-11-12 - 14:09:59 [6]: [PYTHON JOB]: "pacstrap: error: failed retrieving file 'libnftnl-1.2.3-1-x86_64.pkg.tar.zst.sig' from archlinux.grena.ge : Failed to connect to archlinux.grena.ge port 443 after 1 ms: Connection refused" 
2022-11-12 - 14:09:59 [6]: [PYTHON JOB]: "pacstrap: warning: failed to retrieve some files" 
2022-11-12 - 14:09:59 [6]: [PYTHON JOB]: "pacstrap: error: failed to commit transaction (unexpected error)" 
2022-11-12 - 14:09:59 [6]: [PYTHON JOB]: "pacstrap: Errors occurred, no packages were upgraded." 
2022-11-12 - 14:09:59 [6]: [PYTHON JOB]: "pacstrap: ==> ERROR: Failed to install packages to new root"

Thank you for the reply.

sudo parted -l:

Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name    Flags
 1      1049kB  500GB  500GB  ntfs         Shared  msftdata


Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sdb: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type     File system     Flags
 1      1049kB  203GB  203GB   primary  ext4            boot
 2      203GB   240GB  37.0GB  primary  linux-swap(v1)  swap


Model: Kingston DataTraveler 80 (scsi)
Disk /dev/sdc: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  31.0GB  31.0GB  primary  fat32        boot, lba


Model: TEAM TM8FP6512G (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name                  Flags
 1      1049kB  511GB  511GB  ntfs         Basic data partition  msftdata
 2      511GB   512GB  652MB  ntfs                               hidden, diag

efibootmgr -v:
EFI variables are not supported on this system.

As I mentioned in the OP, I did attempt refreshing mirrors, but I will try that again.

Looks like you are booting with Legacy/Bios mode.
Your Windows seems to be installed in Legacy/MBR mode as well since there is no ESP on that disk.

    ERROR: Installation failed: "Bootloader installation error" 
2022-11-12 - 14:25:21 [6]:     .. - message: "Bootloader installation error" 
2022-11-12 - 14:25:21 [6]:     .. - details: The bootloader could not be installed. The installation command <pre>grub-install --target=i386-pc --recheck --force /dev/nvme0n1</pre> returned error code 1.

If you are going to install EnOS on /dev/sdb on a disk with msdos partiton table in Legacy/Bios mode you would need to choose /dev/sdb (the disk and not a partition on it) as the location for the installation of the bootloader.

There is a dropdown menu at the bottom of the screen where you make the choices of which disk to install to, the filesystem etc.

Thank you, I will change the bootloader location and do the mirror thing in the next attempt and then report results.

1 Like

Good luck!

I changed the mirror to a different country plus selected several countries, then run the installer and selected this in partitions/bootloader: https://i.imgur.com/ypBqKwn.png , but got the “Failed to run pacstrap” error which in Details said “Failed to run pacman”. The log is here: https://termbin.com/2jri

If I switch Storage Book Option Control from Legacy to UEFI in BIOS and then select a different place for bootloader, could that change anything?

2022-11-12 - 15:47:32 [6]: [PYTHON JOB]: "pacstrap: error: failed retrieving file 'libusb-1.0.26-1-x86_64.pkg.tar.zst.sig' from archlinux.grena.ge : Failed to connect to archlinux.grena.ge port 443 after 1 ms: Connection refused" 
2022-11-12 - 15:47:32 [6]: [PYTHON JOB]: "pacstrap: error: failed retrieving file 'licenses-20220125-1-any.pkg.tar.zst' from archlinux.grena.ge : Failed to connect to archlinux.grena.ge port 443 after 1 ms: Connection refused" 
2022-11-12 - 15:47:32 [6]: [PYTHON JOB]: "pacstrap: warning: failed to retrieve some files" 
2022-11-12 - 15:47:32 [6]: [PYTHON JOB]: "pacstrap: error: failed to commit transaction (unexpected error)" 
2022-11-12 - 15:47:32 [6]: [PYTHON JOB]: "pacstrap: Errors occurred, no packages were upgraded." 
2022-11-12 - 15:47:32 [6]: [PYTHON JOB]: "pacstrap: ==> ERROR: Failed to install packages to new root"

Failed to connect to archlinux.grena.ge

You seem to be getting the same problematic mirror yet again.

You could edit /etc/pacman.d/mirrorlist and remove this mirror.
Or manually generate a mirrorlist here:

https://archlinux.org/mirrorlist/

You would then need to edit this file and remove # in front of the server names. Next you would need to replace /etc/pacman.d/mirrorlist with this new file.

Not when it comes to this mirror issue.

However if you change this now to UEFI and install your EnOS in UEFI mode, you won’t be getting a boot entry on the Grub boot menu for Windows. Still it would be possible to bring up Bios’ one-time-boot menu and choose what system to boot from. But then you would need to have CSM enabled.

My suggestion would be to install all your systems in the same mode. Nothing wrong with installing in Legacy mode.

There seems to be an issue with mirrors indeed - if I switch mirror to a different country, then click OK, wait until the process is finished, and then reopen Update Mirrors, the previous country is selected instead of the one I switched to.

I would try your suggestion of editing the file, but if I try to download a text editor that I can use to edit it with sudo privileges, I get messages in terminal telling me the mirrors are returning 404 errors. Is there any other way of editing/replacing the file with sudo while in live boot?

You don’t need to download a text editor.
There must be one included in the live iso. I guess it might be xed. Look into tthe application menu.
Otherwise you could use nano in terminal.

Thank you, the default editor was not allowing me to save the file with privileges but I used nano instead.

I opened the file, but it did not list that mirror. Then I used the mirror generator website, replaced the contents of the file with the generated list, uncommented the servers, saved and tested the result by trying to install an app using sudo pacman -S. The results in terminal tell me the mirrors I have inserted into the file are returning the 404 error. So no matter which mirror from different countries I use, it can’t reach the servers? Is this a known issue? If I use offline installation of EndeavourOS, maybe that will be a workaround?

Try sudo pacman -Sy SOME_PACKAGE

EX: sudo pacman -Sy mousepad

Post the output.

Also perhaps post:

cat /etc/pacman.d/mirrorlist

That worked, and then the EndeavourOS installation was also successfully completed! Thank you so much for the help - I don’t think I would’ve been able to identify the mirror as the issue by going through the logs myself, especially as I got different error messages at different times. I appreciate your help a lot.

1 Like

Glad to hear you got it working! Also, happy to have been able to help!
Enjoy your system and have a great weekend!

:enos_flag: :handshake:t5:

1 Like

you can use sudo xed top use editor with admin rights on ISO

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.