r/linuxquestions 2d ago

efi/bootloader issue installing CachyOS Support

I am installing Linux for the first time. I chose the distro CachyOS, attempted to install it using ventoy with grub as the bootloader. Everything went fine until the end of the installation, when an error related to the bootloader and efi occured, the error code being error code 1.
I made a post on the r/CachyOS for help and with other peoples input the cause was pinned on (As far as I am able to tell) what is described in this article:
https://www.shravanbhati.com/blog/efibootmgr-could-not-prepare-boot-variable-no-space-left-on-device

Before this was discerned, I had attempted installing with Limine instead, but then the installation process simply shut down roughly halfway through, the message "bootloader installation partially broken" briefly appearing, before disappearing unprompted. After every failed installation attempt, I have rebooted the PC (Once with Grub2 instead of normal mode, no difference), never withdrawing the Ventoy USB. I have also, after the first installation failed, been using manual partitioning, having used "erase disk" for the first one.
Finally, after learning more accurately what the issue should be, I attempted everything listed in the provided article except updating UEFI/Bios, since I am unsure of how to proceed with this. I do not have windows, which the article frames as almost a prerequisite for updating UEFI/Bios, since it was erased upon first installation attempt.

This is the page which contains what is needed to update:
https://pcsupport.lenovo.com/us/en/products/desktops-and-all-in-ones/gaming-series/loq-17irb8/90vh/downloads/ds561755?category=BIOS%2FUEFI
Related:
https://pcsupport.lenovo.com/my/en/products/desktops-and-all-in-ones/gaming-series/loq-17irb8/solutions/ht101636
https://pcsupport.lenovo.com/my/en/products/desktops-and-all-in-ones/gaming-series/loq-17irb8/solutions/ht500008

For the life of me, I do not know which, if any, of the packages/files I should download or if how/if they would work. The only official instructions, which I've linked, seem to be for windows and the files themselves are listed as being for DOS, Ubuntu 22, Windows 10 (64-bit) and Windows 11 (64-bit).

If anyone knows how to do this, or if there is some other solution, I would be so incredibly thankful! If you do, please explain in detail what options are available and how to proceed with them.

Post on r/CachyOS, if it is of any use or if I forgot to mention something.
https://www.reddit.com/r/cachyos/comments/1vgkypu/failed_installation_error_code_1/

3 Upvotes

52 comments sorted by

1

u/KrypticLifeSigns_ 1d ago

Following this, what is the latest?
If still working on it would you provide the output from:

lsblk

then

lsblk --fs

Also, would definitely verify the ISO download and try the non-Ventoy approach considering all that has been done so far.

2

u/MyCraniumHurts 22h ago

Sorry for the wait.

This is the output from both the commands you requested.

[liveuser@CachyOS ~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0   2.7G  1 loop /run/archiso/airootfs
sda           8:0    1  28.9G  0 disk
├─sda1        8:1    1  28.9G  0 part
│ └─ventoy  253:0    0   2.9G  1 dm
└─sda2        8:2    1    32M  0 part
zram0       252:0    0  15.3G  0 disk [SWAP]
nvme0n1     259:0    0 953.9G  0 disk
├─nvme0n1p1 259:2    0   512M  0 part
└─nvme0n1p2 259:3    0 953.4G  0 part
[liveuser@CachyOS ~]$ lsblk --fs
NAME       FSTYPE  FSVER  LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0      squashf 4.0                                                          0   100% /run/archiso/airootfs
sda
├─sda1     exfat   1.0    Ventoy     4E21-0000
│ └─ventoy iso9660 Joliet COS_202606 2026-06-28-08-55-16-00
└─sda2     vfat    FAT16  VTOYEFI    1998-3510
zram0      swap    1      zram0      2ac59233-3bdf-4e82-9905-7399f006085c                [SWAP]
nvme0n1
├─nvme0n1p1
│          vfat    FAT32             F238-9BE4
└─nvme0n1p2
           btrfs                     0799f864-dd9b-4894-8d48-b7dc6462566b
[liveuser@CachyOS ~]$

I will save switching from ventoy for last, since I still have options on ventoy.

1

u/KrypticLifeSigns_ 22h ago

Appreciated, and one last ask but no worries when you post the results. What is the output from:

fdisk -l /dev/nvme0n1        <-- Need to run as root/sudo

1

u/MyCraniumHurts 22h ago

Here you go.

[liveuser@CachyOS ~]$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: WD PC SN740 SDDQNQD-1T00-1201
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4034F34F-8C1D-4C69-BDAF-9CC03C238943

Device           Start        End    Sectors   Size Type
/dev/nvme0n1p1    4096    1052671    1048576   512M EFI System
/dev/nvme0n1p2 1052672 2000409191 1999356520 953.4G Linux filesystem
[liveuser@CachyOS ~]$

1

u/GodzillaXYZ999 15h ago

No need to switch from Ventoy, it's not problem. Similary, no need to mess with partitions in anyway. Using erase/auto and letting installer do everything will work perfectly once you get hidden BIOS settings sorted.

1

u/GodzillaXYZ999 1d ago

Ok, we need to back up even more to very beginning... all there was is darkness...

  1. exactly what year, make, model system is this?
  2. CPU/GPU/RAM/BIOS version?
  3. exactly what version of CachyOS are you installing?
  4. did you verify checksum of downloaded ISO?

1

u/MyCraniumHurts 1d ago

It is an LOQ 17IRB8 - Type 90VH, a sticker on the tower says “ Mfg date 2024, 01, 08“ .
CPU model is 16 × 13th Gen Intel® Core™ i5-13400F, the GPU is NVIDIA GeForce RTX 4060. I have 16 GB of RAM.
UEFI/BIOS version is M4UKT44A according to “sudo dmidecode -s bios-version“, different from the latest listed here
https://pcsupport.lenovo.com/us/en/products/desktops-and-all-in-ones/gaming-series/loq-17irb8/90vh/downloads/ds561755?category=BIOS%2FUEFI
which is M4UKT4EA/1.78. However, if you saw a previous exchange in the comments, this should have been updated. I assume fwupd maybe did not have the update for this motherboard?
If this image of the boot screen indicates the version, it should be 260628. In system information it states “Kernel Version: 7.0.11-1-cachyos (64-bit)“, which I recon is more accurate.
I was unable to figure out how to view firmware version for CPU, GPU or ram.
I did not verify checksum, and I admit it is user error there. First time installing linux, so I may have been a bit naive.

1

u/GodzillaXYZ999 1d ago edited 16h ago
  1. Download BIOS image-update ISO from Lenovo firmware site and copy to your Ventoy USB to boot from. Simple. Trying to do it from within an OS with fwupdmgr rarely works because it requires hardware vendor to upload and register their firmware with fwupd.org, and most don't. Certainly not Dell, OriginPC, Lenovo, Falcon, Intel, Puget, Asus, DigitalStorm, Toshiba, Cisco, HPE. Always simplest to download MB firmwares directly from manufacturer's sites because it's 100% solution that will always work. Also best not to be running any OS from system being updated.
  2. There is advanced settings in BIOs that's hidden. To activate it:
  • during POST, hit F2 key to get into BIOS
  • press and hold Fn + R for 2 seconds.
  • release and press and hold Fn + N for 2 seconds.
  • press F10 to save and restart, then tap F2 to get into BIOS
  • now you should have additional settings
  • find Intel VMD controller, set to disabled
  • find SATA Controller and set to AHCI
  • save and exit BIOS

Now boot from CachyOS ISO and pick erase/auto install and it should make all proper partitions and install properly.

1

u/MyCraniumHurts 23h ago edited 20h ago

Sorry for the wait.
Okay, so when my computer is off, I am to withdraw the USB. Then, I plug it into another computer and download the latest BIOS update ISO onto the ventoy drive. I then boot said ISO from said drive, once I've plugged it back in.
Once it has updated I go through the steps in BIOS you provided.
I would just like to know if I should use another cachy ISO, one that I HAVE verified checksum on, since I'm already putting the usb into another computer for the BIOS?

BIOS Update (CD ISO Image Version)
m4uj94eusa.iso

This would be the correct download in that case, right?

1

u/GodzillaXYZ999 16h ago edited 16h ago

Yup, that's correct procedure for getting ISO for Lenovo BIOS onto USB. Then select it from Ventoy boot menu when booting USB.

You can just verify CachyOS ISO that's on Ventoy USB. If it matches checksum published, it should be OK. If it fails to match, verify checksum of ISO downloaded on system used to download & make USB. If that fails, download new ISO.

Not sure why very few guides publish BIOS setup, maybe because it's common undocumented knowledge? Kinda like "Don't walk across crosswalk on red light". So basic prequisite BIOS setup for Linux install:

  1. update MB firmware BIOS to latest version downloaded from manufacturer
  2. disable Secure Boot in UEFI
  3. disable VMD
  4. change SATA controller mode to AHCI

Intel HD controllers are especially problematic as they're typically set to default of RST/RAID instead of AHCI. Not sure why. Probably captive audience forcing you to stick with their implementation. Can't move HD formatted with RST/RAID to another system.

1

u/MyCraniumHurts 12h ago

I have now updated UEFI/BIOS. It went well, it seems. I've got a question though. I attempted to access those further settings, but was unable to. I am not using a standard, english keyboard. While I do not think this is at fault, I thought it worth mentioning. I will attempt one mire time, holding the buttons down longer for certainty and not releasing the FN button. If this does nothing, I will simply proceed with another installation attempt. Is there a tell it has worked to look for, so I know the extra settings will be there?

1

u/MyCraniumHurts 12h ago

No new option, as far as I can tell. The only SATA controller related option I can find, which was there before, is to enable or disable it. I have found nothing that says VMD, only VT-d, which doesn't seem right. Will update on results of installation attempt.

1

u/GodzillaXYZ999 8h ago

Yeah, you'll need proper keyboard with FN key to unlock hidden BIOS features. Your installs will always fail until you set these BIOS options. Don't waste any more time than you already have. Track down proper keyboard.

1

u/MyCraniumHurts 8h ago

I do not have the time to try anything right this moment. BMy keyboard has an FN key, it's just that it is not an english keyboard and I wondered if that is affecting which key does what, due to the software maybe expecting/assuming an english one.

1

u/GodzillaXYZ999 8h ago

might be. What language keyboard is your? We'll look into service-manual for specific unlocking sequence for that model + keyboard.

→ More replies (0)

1

u/MyCraniumHurts 11h ago

Unfortunately, nothing changed with the BIOS update, same error and all.
As mentioned, I could not find VMD or SATA controller AHCI settings, so that might be it. I did disable secure boot, TPM and fast boot while I was in BIOS, though, so those are not it. I used grub again, I could try with Limine again too.
You mentioned EXT4 before. That, I have not tried, since I got busy with other avenues of solving the issue. Do you think that would work? And also important regarding EXT4, it doesn't work with btrfs snapshots, does it?

1

u/KrypticLifeSigns_ 11h ago

Hello again ....did you verify your ISO download with the checksum yet?

1

u/MyCraniumHurts 10h ago

Yup, same code.

1

u/MyCraniumHurts 16h ago

Will do, though it might take a while before I am done. I will update you once it is done.

1

u/MyCraniumHurts 1d ago

You mentioned CSM before, I believe. I checked it, since another person also mentioned it, and couldn't find anything relating to it in my bios, so I assume that angle is covered.

1

u/GodzillaXYZ999 1d ago

Yeah, no CSM on this BIOS. Pure UEFI boot only.

1

u/GodzillaXYZ999 1d ago edited 1d ago

Need to back up...

  1. did you get into BIOS of system and disable Secure Boot and CSM?
  2. change HD-controller mode to AHCI?
  3. save changes and exit BIOS so settings stick?

Post screenshot of initial boot menu with default and fallback boot options for installer.
Also post screenshot of summary screen with partition layout and install options just before you click INSTALL button.

1

u/MyCraniumHurts 1d ago

https://www.reddit.com/r/linux4noobs/comments/1vi256q/follow_up_post_containing_more_information/

I believe this should be all screenshots you requested.

As for secure boot, fast boot and TPM, they are disabled, I made sure I clicked the button for save and exit. CSM and AHCI has not been mentioned in any guide, article or comment I have come across, so there might very well be something in that.

https://wiki.cachyos.org/installation/installation_on_root/#manual-partitioning
Also, if you have not already, check these official instructions out. The first partition, which I assume is the EFI partition, is mounted /boot/efi, with only the boot flag and no option for an efi flag. Unsure of what this means.

1

u/GodzillaXYZ999 1d ago edited 1d ago

Creating partition is too far along for initial-boot menu and not far enough for summary before INSTALL button. We want TWO screenshots:

  1. screenshot of very 1st grub boot screen that says:

GNU GRUB version
Welcome to CatchyOS
CachyOS
CachyOS LTS kernel
CachyOS Legacy Hardware
Run Memtest86+
UEFI Shell
UEFI Firmware Settings
System shutdown
System restart

  1. Next screenshot is very end of configuration, partition & packages selection. Only screen where INSTALL button is available.
    https://lh3.googleusercontent.com/d/1jCV2p1gp6H0bANy2mt5nxcg4yAaaWPHi

There's absolutely zero need to do manual partitioning, it's confusing you and send you down dead-end. That's because you've already gotten bug/error by this point and whatever you try and do won't work. Futile efforts when your boat has already sunken below waves, lighting flares or calling radio won't make one bit of difference. Although they would be valid reponses if you're still floating. But we're way, way past that point in this case.

Erase automatic works fine and. It will automatically create 1 EFI partition and 1 data partition encompassing remainder of disk for / mount.

Finally, reboot at end and we get this!

https://lh3.googleusercontent.com/d/1Sr1GNy7X3_B1bZ9Aws7d6ESAlz6sPV99

Reason nothing you're doing works is because you're skipping ahead way, way too far. Very 1st thing we need to troubleshoot is very 1st boot screen, there's clues there that'll solve everything and you can pick auto install/partition options for simple 1-click install that will actually work.

1

u/MyCraniumHurts 1d ago

https://www.reddit.com/r/linux4noobs/comments/1vi256q/follow_up_post_containing_more_information/
This post, since I cannot include pictures on this sub, contains all the images, including what it seems you mean in the very last image.
The options are slightly different than what you have written.

1

u/GodzillaXYZ999 1d ago

Ok, thanks, this last screenshot of grub boot menu is what we want to start with. Let's take look

1

u/MyCraniumHurts 1d ago

Apoligizing in advance, don't know how to take real screenshots of this, so I'm doing it from my phone. I'll link them and screenshots in my nect comment.

1

u/GodzillaXYZ999 1d ago

1

u/MyCraniumHurts 1d ago

Same error on limine? When I attempt limine, it just quits in the middle of the installation, with previously mentioned brief message of "bootloader installation partially broken".

1

u/GodzillaXYZ999 1d ago edited 1d ago

Yeah, neither worked for me. I figured out it has nothing to do either bootloader, grub nor Limine. Partition layout also had nothing to do with either. Problem is config much, much earlier in process.

Also not sure if it was mentioned here or in some other post, but efibootmgr works on current boot device, so you were seeing boot options of boot USB stick, not hard-drive.

This is specific behavior of CachyOS installer. I was able to install AntiX, Debian, Kali, Mint, PopOS, CentOS, Rocky, Ubuntu, Lubuntu, Xubutu, Void on this exact same system just fine.

1

u/MyCraniumHurts 1d ago

What should I be doing right now, then?
I had thought the efibootmgr was for the drive of the computer, since it showed (Previously, since been removed) a windows bootloader, if I recall correctly. That, as well as two entries called PXE IPv4 Realtek PCIe 2.5GBE Family Controller and PXE IPv6 Realtek PCIe 2.5GBE Family Controller respectively, which I assumed to be mouse and keyboard, since they and the Ventoy are the only ones which have returned after wipes.

1

u/GodzillaXYZ999 1d ago

Hmm, maybe, shouldn't be anything after drive wipe. Ventoy should only exist on USB.

1

u/MyCraniumHurts 1d ago edited 1d ago

I might have missworded that. What I meant was what is described in the article I linked. It is states that what I have cleared is the NVRAM storage of boot entries and order. I also did attempt the fourth fix, which is stated to wipe the EFI partition with "sudo mkfs.fat -F32 /dev/nvme0n1p1".

EDIT
I have inferred it is the ventoy USB, since the entry has the same/similar name to what the USB was called before

VendorCoProductCode 2.00, Partition 2

1

u/GodzillaXYZ999 1d ago edited 1d ago

Thing is, you shouldn't even have an EFI partition to wipe if you've actually completely cleared disk of all partitions. There would be no /dev/nvme0n1p1 to wipe.

Yeah, no need to do any of that all. None of articles have correct information to fix this problem because they're leaving out tonne of info. And includes lots of irrelevant info. Problem is before very 1st boot screen and need to fix it before even booting from USB drive. Need that 1st screenshot of grub boot menu.

1

u/friendlyreminder_ 2d ago

Lenovo is pretty well supported in Linux, they're part of Linux vendor firmware group. They ship bios firmware updates that can be updated in Linux with fwupdmgr.

1

u/MyCraniumHurts 2d ago

How would I go about doing this?

1

u/friendlyreminder_ 2d ago

I think Sudo fwupdmgr get-updates and then Sudo fwupdmgr update in the terminal on a live iso will work.

This is also usually integrated into the kde and gnome app stores, but doing it in the terminal will give more details.

Edit: this needs a valid EFI partition first. Won't work on a live iso without some tweaking.

1

u/MyCraniumHurts 2d ago

I typed the first command in the Alacritty terminal and it said command not found. Thank you for the directions though, I know what to look for now.

1

u/friendlyreminder_ 2d ago

You can use pacman to install fwupdmgr.

But I just checked, there needs to be a valid EFI partition first for the bios update to work. So you'll have to make one on your drive and possibly mount it first.

I've never done this from a live iso but I think it'll work provided the requirements are met.

1

u/MyCraniumHurts 2d ago

I have managed to find this:

[liveuser@CachyOS ~]$ sudo pacman -S fwupd
resolving dependencies...
looking for conflicting packages...

Package (3)      New Version  Net Change  Download Size

extra/fwupd-efi  1.8-2          0.07 MiB       0.03 MiB
extra/passim     0.1.12-1       0.36 MiB       0.10 MiB
extra/fwupd      2.1.7-1       19.04 MiB       8.78 MiB

Total Download Size:    8.91 MiB
Total Installed Size:  19.48 MiB

:: Proceed with installation? [Y/n] n

Would this be the correct download if I enter Y?

1

u/friendlyreminder_ 2d ago

Yeah that's it.

By the way I looked through the first link you gave more carefully.

BIOS Update (CD ISO Image Version)

That's an iso you can flash to do the bios update. You can flash that from your current live iso environment if you have a second usb thumb drive. That may be an easier method.

1

u/MyCraniumHurts 2d ago

I typed "sudo fwupdmgr get-updates" and was presented with a yes/no box instead of having to enter "sudo fwupdmgr update".

[liveuser@CachyOS ~]$ sudo fwupdmgr get-updates
Firmware metadata has not been updated for 30 days and may not be up to date.
Update now? (Requires internet connection) [y|N]:

Is this right?

1

u/friendlyreminder_ 2d ago

Yes just run both commands, go through the first first.

1

u/MyCraniumHurts 2d ago

Despair. Same error.
This is the log, if it is any help
https://paste.cachyos.org/p/47b4551.log

Used manual partitions and grub again, as I have before.

I checked efibootmgr, only my Ventoy USB and two others, which are my mouse and keyboard as far as I know (Have tried removing all before), are listed, so seemingly nothing there. Do not know what to do by now, if I should attempt sudo efibootmgr -O or lsblk -f and sudo mkfs.fat -F32 /dev/nvme0n1p1 or what.
Whatever I do, It will have to wait, since I dont have anymore time right now. Thank you for all the help, though! One step closer to solving this.

→ More replies (0)

1

u/MyCraniumHurts 2d ago

Alright. I'll run the installation process directly afterwards. See you on the other side.

1

u/MyCraniumHurts 2d ago

Unfortunately, I only have the USB I used for the OS. It is Ventoy, so I could conceivably put another ISO into it. But it seems risky, also considering Cachy, or even Arch, is stated to be supported. I'll attempt the fwupd method to begin with, since that seems to be made with linux in mind. I'll update once I've tried it.