I had to give my Legion Go away for repairs, in they in turn replaced the mainboard. I had been using a dual boot setup with Windows and CachyOS with systemd-boot in between.
Now with the mainboard replaced, the only boot entries I am finding are the ones for the windows partition. CachyOS still resides on my SSD, but is essentially lost right now.
I am a complete beginner to anything that comes close to this topic, so I wonder - How do I reinstall systemd-boot and get back my boot partition without ditching my current install? I am guessing I would have to boot onto a live stick and then run a few commands, but as this isn’t as easy as grub, I am happy about any pointers.
As you’ve said, you need to boot into a live environment and chroot into your system. You can use our tool cachy-chroot for that, and there is also a guide in the wiki. After mounting your root and EFI partitions, just run bootctl install. That should be it and you should see systemd-boot in your boot menu now.
Thanks for the heads-up! I wasn’t aware of this even existing.
I tried it out round about now, but I wasn’t able to mount /boot because it told me the partition was already mounted - even before I mounted it the first time. After I exited the tool and tried to bootctl install, it told me it didn’t find the partitions.
Does the bootctl install need to be run mid-chroot session?
I don’t need to do anything about the Windows partitions I presume?
Following up on that, I started a chroot session, declared my CachyOS partition (btrfs) as root partition, and tried mounting the /boot partition, told me right out of a fresh boot into the live environment it’s already mounted.
While inside the chroot session, running bootctl install tells me that it couldn’t find the EFI system partition. So it seems that the /boot partition is mounted, but at the same time isn’t.
Wondering what I am doing wrong. Do I need to actually remove the boot flag from the partition? Because in the Partition Manager it does not appear mounted at all.
File system "/boot" is not a FAT EFI System Partition (ESP) file system.
That unfortunately did not cut it. I have checked the other partitions in the partition manager again, but none of the others looks like the /boot partition that I had previously used. The only other partition that is possibly filled with EFI information is the one that windows uses.
It seems to me that the /boot partition got effed somehow?
Depending on which avenues I still have to go about this, what would other sources of input be here? Does it make sense to ask about something like this on StackOverflow perhaps?
Solution as discussed on Discord was to mount nvme0n1p4 (my prior boot partition) manually into /mnt/boot and then specifying that path in booctl like this: bootctl install --esp-path=/mnt/boot
Now systemd and my boot partition are back up and running again!