Error installing cachyOS with code 1. How to resolve?

I’m trying to dual boot on the same disk. I know it’s not the best option, but it’s the only one I have. I created the partition to install Linux previously, within Windows. I also disabled hibernation while I was in Windows.

Secure boot and fast BIOS mode are disabled in the BIOS.

The USB drive and Windows are in GPT format.

I’ve already tried installing cachyos with grub, limine, and system-boot, always following the wiki exactly. None of them worked.

On the system partition, I tried ext4 and btrfs, but neither worked.

When configuring the partitions, I chose manual partitioning and followed the wiki exactly, but it didn’t work.

I also tried recreating the pendrive with Ventoy and downloading the CachyOS ISO again, and it still didn’t work.

I’ve been trying to install this system for three days now, if anyone can help me I would be very grateful.

ERROR MESSAGE:

The bootloader could not be installed. The installation command grub-install --target-x86\_64-efi-efi-directory=/boot/efi-bootloader-id=cachyos --force returned error code 1.

LOG:

09:55:42 \[1\]: void 09:55:42 \[1\]:

Calamares:: ViewManager::onInstallationFailed(const QStrings, const QString&) ERROR: Installation failed: “Erro de instalação do carregador de inicialização”

09:55:42 \[6\]:

message: “Erro de instalação do carregador de inicialização”

09:55:42 \[6\]:

void Calamares:: ViewManager::onInstallationFailed(const Strings, const (String)

details: 0 carregador de inicialização não pode ser instalado. O comando de instalação grub-install–target-x86\_64-efi-efi-directory=/boot/efi --bootloader-id-cachyos-force retornou o código de erro 1

09:55:42 \[6\]:

Calamares will quit when the dialog closes.

09:55:42 \[6\]:

DEBUG (Qt): QML Component (default slideshow) deactivated

09:55:42 \[6\]: 09:55:42

\[6\]: void Config::doNotify (bool, bool)

Notification not sent; completion: failed

09:55:42 \[6\]:

\[6\]: void {anonymous):: PowerManagementInterface::uninhibitSleep()

09:55:43 09:55:43 \[6\]: Sleep was never inhibited.

Can you still boot into Windows?

If so, you still have a working EFI. The problem is likely that the EFI is too small for the cachyos installer to install its bootloader. This has come up before on this forum and others if you do a search.

I experienced a similar case. The problem was that the boot sector was too small. The easiest solution was to increase the boot sector to at least 4 GB for Limine via Windows. After doing that, you can install CachyOS without any problems. I reinstalled Windows from scratch, but it should probably also work using additional Windows third-party tools or via Linux commands.


How to Create a 4 GB EFI Partition via CMD During Windows Installation

Open the Terminal: On the very first Windows setup screen (where you select your language and keyboard layout), press Shift + F10 on your keyboard to open the DOS command line window.

  1. Launch the Disk Partitioning Utility: Type the following command and press Enter:

    diskpart
    
    
  2. Select Your Primary Drive: Identify your main storage drive (usually Disk 0) and target it by executing:

    list disk
    select disk 0
    
    
  3. Wipe the Drive (Removes All Data): Convert the disk layout to the modern GPT standard by entering:

    clean
    convert gpt
    
    
  4. Create the Large 4 GB Boot Partition: Generate the dedicated EFI System Partition with your desired size layout (4096 Megabytes) and format it using the FAT32 file system:

    create partition efi size=4096
    format quick fs=fat32 label="System"
    
  5. Exit the Interface: Close out the utility and the command line box:

    exit
    exit
    
  6. Proceed with Installation: Close the command window and proceed with the standard Windows setup wizard.


You can find the exact manual layout specifications on the CachyOS Manual Partitioning Wiki.

Yes, I can boot into Windows. The problem is that I created the partitions exactly the size the wiki says, so how come there’s not enough space for the bootloader?

I created the partitions exactly the size the wiki says, so how come there’s not enough space for the bootloader?

You already have a boot sector of 100mb - which isn’t enough even for GRUB.

So, your partition scheme has two EFI partitions on the same drive.

It’s possible but not advised and Windows won’t like it at all when it updates.

Its enough for grub fine as long as you do not need extra space for extra reasons.

My shared multiboot ESP with Cachy and at least 3 kernels installed next to windoze is using a total of 35 mb.


But as to the thread .. if using any of the fancy setups that include things like snapshots then 2gb is the minimum and you might want more like 4gb.


I actually notice at least 2 ESPs.
Of course if you already are using either of them and intend to reformat then you should be aware that you will lose any boot files already residing on those partitions.

Also make sure you are not selecting the first 100mb ESP for use.

I used GParted from CachyOS in live mode to increase the size of the Windows EFI partition. Now it’s over 1GB. But I tried to install it and got the same error.

It’s unclear what I have to do. I tried installing by creating an EFI partition exactly as the wiki says, and it failed. Then I tried not creating an EFI partition, just increasing the one already created by Windows so that it could be used by cachyOS as well, but that also failed. What do I do?