Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install error: No such file or directory: '/tmp/calamares-root-zzj6p_tb/boot/refind_linux.conf' #41

Open
alsemenov opened this issue Nov 10, 2024 · 15 comments

Comments

@alsemenov
Copy link

I downloaded cachyos-desktop-linux-241003.iso and tried to install. I selected manual disk partitioning, rEFInd boot manager, created 2048MiB partition for boot and reused existing 100MiB /boot/efi partition from Windows 11.
The installation proceeds normally, but at the very end I get the error "No such file or directory: '/tmp/calamares-root-zzj6p_tb/boot/refind_linux.conf'". Full log https://termbin.com/96bk

BTW, the link "report bug" in README points to calamares/calamares repository instead of CachyOS/cachyos-calamares

@ptr1337
Copy link
Member

ptr1337 commented Nov 10, 2024

With the upcoming release we will move away having /boot/efi and /boot for refind.

Please setup a 2GB /boot and then the rest a root.
You can find the upcoming release ISO here:
https://cdn77.cachyos.org/ISO/desktop/241110/cachyos-desktop-linux-241110.iso

@alsemenov
Copy link
Author

Please, clarify the partityon type for single /boot. Should it be fat32 or ext4?

Also, please, clarify whether such setup will allow to boot existing Windows 11 installation?

@ptr1337
Copy link
Member

ptr1337 commented Nov 10, 2024

Please, clarify the partityon type for single /boot. Should it be fat32 or ext4?

Also, please, clarify whether such setup will allow to boot existing Windows 11 installation?

Refind should automatically detect the EFI of windows.

/boot fat32

@alsemenov
Copy link
Author

With new image cachyos-desktop-linux-241110.iso I have got the same error. Please, see full log https://termbin.com/94vm

@ptr1337
Copy link
Member

ptr1337 commented Nov 11, 2024

I can not reproduce in QEMU with manual partitoning.

@1Naim
Copy link
Member

1Naim commented Nov 11, 2024

With new image cachyos-desktop-linux-241110.iso I have got the same error. Please, see full log https://termbin.com/94vm

Correct me if I'm wrong, but it looks like you're not applying the boot flag to the FAT32 partition.

@alsemenov
Copy link
Author

alsemenov commented Nov 12, 2024

Correct me if I'm wrong, but it looks like you're not applying the boot flag to the FAT32 partition.

I am sure I marked the checkbox for boot flag.
I have found the following line in logs:

2024-11-11 - 21:58:24 [6]: virtual Calamares::JobResult SetPartFlagsJob::exec()
2024-11-11 - 21:58:24 [6]:     Setting flags on "/dev/nvme0n1" partition "/dev/nvme0n1p4" 
     "boot" 

Also, please, look at the state of SDD after installation have failed - flag boot is present
Screenshot_20241112_143551

@alsemenov
Copy link
Author

I think refind-install did nothing, either because of some error. It is strange that log do not contain any output of refind-install script. For example, script contains line
echo "Creating $RLConfFile; edit it to adjust kernel options."
I suspect that refind-install did nothing because there are two FAT32 partitions with boot flag.

@1Naim
Copy link
Member

1Naim commented Nov 16, 2024

refind-install did nothing because there are two FAT32 partitions with boot flag

That's likely the issue. There's supposed to be only one.

@alsemenov
Copy link
Author

Is there any option or tweak to get refind-install output in the logs?

@alsemenov
Copy link
Author

After another installation failure, I managed to run refind-install manually. It reported error about secure boot is turned on and did nothing else. Secure boot was indeed enabled and this is my fault. However, it took me a lot of time to find out the actual reason. I guess, less motivated person would give up after second attempt. Could you make the installer more user friendly:

  • add check about secure boot in the very begininng of installation process, now tha failure happens only after everything is installed (i.e. after 5-15 minutes from start).
  • collect the output of refind-install
  • add the check if execution of refind-install have failed and show user friendly message (along with the execution logs)

@1Naim
Copy link
Member

1Naim commented Nov 17, 2024

That doesn't seem consistent. If secure boot was enabled, you wouldn't be able to boot into the ISO.

@alsemenov
Copy link
Author

refind-install did nothing because there are two FAT32 partitions with boot flag

That's likely the issue. There's supposed to be only one.

It turns out it is not an issue for refind-install, according to its code, it just select some FAT32 partition and installs there. In my case this seems to be wrong partition, because after successfull install and reboot there are no signs of refind

@alsemenov
Copy link
Author

That doesn't seem consistent. If secure boot was enabled, you wouldn't be able to boot into the ISO.

I use Ventoy, which supports secure boot.

@alsemenov
Copy link
Author

Finaly I installed CachyOS on my computer. I'd like to provide a summary of all actions and all issues.

Initial steps to reproduce:
I have brand new PC with Windows 11 preinstalled. The secure boot is on by default. My purpose is to share its SSD between Windows and Linux.

  1. Install Ventoy on USB flash drive
  2. Copy CachyOS iso image to USB flash drive
  3. Turn on secure boot (or forget to turn it off). Install Ventoy keys according to Ventoy instructions, so it is possible to secure boot from USB flash druve.
  4. Boot from USB flash drive into live CachyOS, start installer
  5. Select rEFInd and manual disk partitioning, create partitions as recommended by CachyOS wiki (preserve all Windows partitions).
  6. Get the error "No such file or directory: '/tmp/calamares-root-zzj6p_tb/boot/refind_linux.conf'". Full log https://termbin.com/96bk

Here we meet first two problems:
Issue A. Have to wait till the very end of installation to get the error.
Issue B. The error is not relevant to problem. There is no clue in the logs about secure boot. Output of refind-install is not logged. Also the execution refind-install is not checked for errors. I managed to execute it manually and found out the actual reason (i.e. secure boot is turned on).

Continue with the steps
7. Disable secure boot
8. Remove newly created CachyOS partiotions, but keep Windows partitions.
9. Install CachyOS again from scratch
Installation is successfull, but
Issue C. I am able to boot only Windows. There is no sign of rEFInd boot manager.
Investigation shows that refind-install is executed without agruments, in this case it looks for any FAT32 partition and installs itself there. In my case this happens to be Ventoy FAT32 partition on USB flash drive! Ok. I copy rEFInd files manually to the right partition and run efibootmngr (from CashyOS live image) to register the rEFInd boot loader (as rEFInd documentation recommends).
Issue D efibootmngr from CashyOS live image does not work properly on my PC. The corresponding record is created, but it disappears after reboot. So I am still not able to boot CachyOS. I tried different approach. I booted EFI shell from the CachyOS live image boot menu and registered the installed rEFInd from there using bcfg command. This time it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants