Installing CachyOS alongside other os gives problem

I wanted to see if it is possible to install CachyOS alongside another Linux which was installed with systemd-boot and luks/btrfs.

Here my test in a VM

  1. installed EndeavourOS with systemd-boot and btrfs
  2. renamed btrfs subvolumes in EndeavourOS aso and rebooted. All ok
  3. booted from CachyOS installation iso
  4. Ran: cryptsetup open /dev/vda2 live-root (I was told that only a name starting with live- prevents Calamares to fail installing which was true )
  5. Started the installer and did ‘Manual Partitioning’, i.e mounted /dev/vda1 with keep and mountpoint /boot. Then chose the btrfs volume with mount point /.
  6. Then installed

Result: All went fine with the exception that the two non-cachyos (i.e. EndeavourOS) conf files in /boot/loader/entries were deleted

Is this a bug or a feature? :innocent:

What is Endeavour using for creating/managing entries? CachyOS uses sdboot-manager which probably doesn’t take into account entries from side distros.

EndeavourOS uses dracut which AFAIK manages these entries.

No, that doesn’t sound right. dracut doesn’t have that functionality.

I just see that /etc/sdboot-manage.conf has

REMOVE_OBSOLETE="yes"

That explains it.

It is a bad behavior in a case I tested.

To add here. That file also has

REMOVE_EXISTING="no"

Perhaps both values should harmonize. Just my 2 Cents.

Yeah, likely. sdboot-manager isn’t smart enough to be aware of entries from other distros so it just marks them as obsolete and remove them. If you set that to no, and run sudo sdboot-manage gen, does it not delete EndeavourOS entries?

Not 100% sure, but it looks like they have their own package kernel-install-for-dracut for this

Ah, so it’s using kernel-install from systemd presumably. Please try what I suggested above. If it doesn’t work then I’ll need to ask around other people in the team because it’s two different implementations

Exactly. I changed it to no and when running sdboot-manage gen the eos entries persist.

Just checked. Your guess it correct!

Ack, I guess what you can do in CachyOS is remove sdboot-manager and follow these steps.

edit: Please let me know how it works out. Your mileage may impact our future choices :smile:

Before I go this way one question: Wouldn’t it simply help to have

REMOVE_EXISTING="no"
REMOVE_OBSOLETE="no"

in /etc/sdboot-manage.conf and all is good?

Not really, let’s say you install a few other kernels in CachyOS and one day decide to remove them. There will be orphan entries in /boot/loader/entries. They’re not gonna show up in the boot menu nor will it break anything, but orphans are bad :slight_smile:

Up to you really, I personally find it broken functionality. If you’re okay with that, then you can use it this way.

edit: can you send me the file tree of /boot/loader/entries?

1 Like

Yes you are right. So it means that sdboot-manager isn’t designed to deal gracefully with foreigners in /boot?! :grin:

Here the files in /boot/loader/entries

/boot/loader/entries/
/boot/loader/entries/linux-cachyos.conf
/boot/loader/entries/linux-cachyos-fallback.conf
/boot/loader/entries/5ac188ff5b33479698366ec3b0c101f4-6.13.4-arch1-1-fallback.conf
/boot/loader/entries/5ac188ff5b33479698366ec3b0c101f4-6.13.4-arch1-1.conf

Yeah, I guess so. This is also breaks two CachyOS installs on the same drive, re: Installing two versions of CachyOS on the same hard drive. Ashamed to say I’ve only realized this now.

The question I have here is, why does EndeavourOS allow this? Couldn’t the same system that EndeavourOS uses be copied to CachyOS, considering that both are Arch Linux-based distros and both use systemd-boot for booting?

Did you not read the thread? Essentially, we’re using different tools to manage boot entries. What we’re using is “dumber” and isn’t aware of entries made by other distributions sharing the same EFI partition, so it just deletes them when the pacman hook is triggered.

Sorry, I certainly didn’t read the whole thread, just the final conclusions.

Anyway, I hope that in the future CachyOS can make the jump to the same tool that EndeavourOS uses. In the meantime, I’ll still have to do what I do now: install EndeavourOS after installing CachyOS, this way the boot menu is respected and I can log into both systems. But obviously, installing two CachyOS distributions on the same computer will have to wait…

1 Like

I’m wondering what could happen if we install CachyOS with grub boot manager instead of systemd-boot.

References:

  1. Offered Boot Managers | CachyOS
  2. Boot Manager Configuration | CachyOS