Cachy OS

This is a master post documenting my adventures when installing and configuring CachyOS, as well as a place where I write down commands that may come in handy.

Commands

chwd

chwd is a tool to install packages and drivers for hardware.

bugreport

sudo cachyos-bugreport.sh

creates a bug report.

kerver

kerver displays a summary of kernel version, I/O scheduler etc.

sbctl-batch -sign

For secure boot https://wiki.cachyos.org/features/cachyos_settings/#sbctl-batch-sign

ufw

To configure firewall, use sudo ufw commands. You can also use KDE Plasma settings. https://wiki.cachyos.org/configuration/post_install_setup/#configuring-firewall-ufw

Global Menu

Copied from the wiki:

# To enable global menu support, run the command and restart the app.
sudo pacman -S appmenu-gtk-module libdbusmenu-glib

Gaming

DLSS Swapper

dlss-swapper updates the DLSS DLLs and presets to the latest available versions provided by NGX Updater and dlss-swapper-dll relies on the DLLs already present in the game’s directory.

game-performance

For other games, launch them with game-performance <command>

Dual Booting Windows

I have Windows installed on a different disk and CachyOS installation wiki only describes (and says it’s not 100% reliable) the situation when the systems share one drive.
Let’s see if I manage to make them work.

I have turned off Hibernation, BitLocker, Secure Boot as the instruction says.
I haven’t shrunk the Windows partition, since it’s on a separate drive.
I have chosen systemd-boot, so I’m following the instructions for that.

First,

lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT

I have found out that sda1 is my Windows EFI partition. Makes sense, the drive is plugged into SATA.

sudo mkdir /mnt/WinBoot
sudo mount /dev/sda1 /mnt/WinBoot
sudo cp -r /mnt/WinBoot/EFI/Microsoft/ /boot/EFI
sudo umount /mnt/WinBoot
sudo rm -r /mnt/WinBoot

I’ll restart and see the effects.

It takes so long to boot, showing nothing but a black screen. Have I fucked it up? This PC has had issues in the past, the exact RAM sticks aren’t listed as supported on the mobo page 😬 It sometimes booted straight to UEFI and had to be rebooted a few times to work.
Right now even the keyboard isn’t lighting up, not a good omen.

I took out the Linux SSD out of the system, no change. The DRAM and CPU diodes are yellow on my MSI MAG B850 TOMAHAWK MAX WIFI.

Ok, maybe I was too impatient. Windows boot up after some time, interesting.
I put the Linux SSD stick back in and pushed the power button.
Windows login screen showed up, but with a default (?) background instead of the Mercedes F1 the’ve pushed recently. Maybe it’s because I chose to shut down instead of restart, but fast restart should be turned off after running the command I found in CachyOS installation wiki. The option doesn’t even show in Power Options.

I restarted the PC, went into MSI CLICK BIOS X and checked the boot order. Unfortunately, it doesn’t show all the disks/partitions and it showed only the SATA Windows one.

I probably bricked my Linux boot. Let’s see if I can reach it from Windows. The drive is visible from the UEFI/BIOS/whatever this is.
Hey, I can copy the Linux EFI contains to the Windows one, can’t I?

I don’t know if I can. The disk doesn’t show up on Windows’ Disk Management utility. I don’t know how it used to look before.

mountvol lists only the partitions visible by Windows. How would I even go about formatting the Linux drive if I can’t see it?
Let’s see, I still have the CachyOS installation USB stick.

I spammed F11 during boot up to enter boot device selection and the only option presented to me was… Enter setup. Neither the Windows SATA SSD nor the Linux is visible in the setup. Are the disks just bad?
I moved UEFI USB Key and UEFI USB Hard Disk options up to the top of the order. I don’t know how the mobo differs between the two and can’t be bothered to research that.

Before the next try, I made sure that all the SATA cables sit nicely and put the heat shield back on the Linux SSD (I doubt it’s that, but whatever, it’s 2AM on a Sunday night).
Windows booted and the Linux Disk is visible, however mountvol returns only one more partition than before. Disk Management sees that the disk is divided into 3 partitions…

While I was trying a command found on superuser.com, being sabotaged by Windows 11’s Terminal, I heard a whistling noise, as if someone was boiling water in another flat. But it was coming from my PC, I touched the heat shield and I think it was the SSD. Maybe booting up without the heat shield was indeed causing issues.
While investigating, I even forgot that the PC was supposed to boot from the USB stick with CachyOS.
Restart with the SSD in – the sound again.
Restart without the SSD – silence.

So I guess it’s fried. I have a second stick of the same model laying around, but maybe it’s time to finally buy a new one and be relatively sure that my problems are not caused by hardware.

Pause for now.

Installing CachyOS

I bought a new drive, Samsung 990 Evo Plus, which has more storage space and a smaller form factor than the previous SSD I had. Since it’s completely new drive, I had to create a new partition table – I went with GPT over MBR.

I then created partitions for boot, root and home, accoring to the instructions from CachyOS wiki. Chose Plasma Desktop as the desktop environment, put in my user credentials. Then I reverified the partitions and good thing I did that, because I hadn’t set a mounting point for my home partition! BTW, when installing Windows, you choose the partition the system will be installed at. It doesn’t seem to be the case here, probably the mounting points are used for that, but I’m no expert.

NO WAY, I clicked “back” once too many and it cleared my partitions settings. Be carefu not to do that. Well, filling out the cofig for the n-th time, I gave in and actually abided by the instructions when it comes to the partitions size. The wiki says that the boot partition for systemd-boot must be at least 2048 MiB in size, while the config wizard has the size in MB, so that would be around 2148 MB. For the root partition I gave 20972 MB, the rest for home. Probably wouldn’t make a difference, but maybe me clicking that “back” button was the universe giving me a sign. Funa fact: it didn’t reset the user credentials I’d put in before.

My final partitions configuration looks like this:

I started the installation aaaand… it failed. create-pacman-keyring returned error code 1. I didn’t have such problems during the installation on the whistling SSD… I’m seeing some time warp or clock problems in the log, but the system time seems correct, timedatectl shows that the time is synchronised. Surely rerunning the process will do the trick, right?

The partitions are already there, so I’m just setting the mount points for them. Oh, there’s a choice to keep data or format, so I’m formatting them as well.

IT IS ALIVE!

I had to tweak my UEFI settings for the Linux Boot Manager to be on top and after booting to CachyOS, I started Cachy-Update to make sure everything is up to date. Then I put my PC to sleep for some time. I mention this, because when I woke it up, the login screen seemed unresponsive for sometime, but then it logged me in. I made my cursor bigger in Plasma settings and proceeded to setup the dual boot for Windows.

Dual Booting Windows 2

Once again, I’m following instructions from CachyOS Wiki for systemd-boot.

❯ lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT
NAME        FSTYPE    SIZE MOUNTPOINT
sda                 953,9G
├─sda1      vfat      200M
├─sda2                 16M
├─sda3      ntfs    952,8G
└─sda4      ntfs      925M
sdb         iso9660  59,8G
├─sdb1      iso9660   2,9G
└─sdb2      vfat       23M
zram0       swap     30,3G [SWAP]
nvme1n1               1,8T
├─nvme1n1p1 btrfs    20,5G /var/tmp
├─nvme1n1p2 btrfs     1,8T /home
└─nvme1n1p3 vfat        2G /boot
nvme0n1             465,8G
└─nvme0n1p1 ntfs    465,8G

I see that sda1 is most probably the Windows boot partition, so I mount it into my system:

sudo mkdir /mnt/WinBoot
sudo mount /dev/sda1 /mnt/WinBoot

sudo cp -r /mnt/WinBoot/EFI/Microsoft/ /boot/EFI

sudo umount /mnt/WinBoot
sudo rm -r /mnt/WinBoot

I restarted into different OSes a couple times and it usually worked. Twice when Windows was autochosen I got this screen:

The only option was to reboot into UEFI settings, check the boot order and restart.

Initial configuration

I run sudo chwd -a, which runs CachyOS Hardware Detection auto configuration. It had already installed amd and nvidia-dkms-580xx, so it skipped them. I have to remember to run it when I finally get a new GPU.

I open Shelly package manager and choose Flatpak, AppImage, Firmware and Recommended as package sources (everything except AUR).

systemd-boot configuration

> sudo cat /boot/loader/loader.conf
default @saved
timeout 5
console-mode keep

The default config looks good, but I would like to have Windows as the first entry. Let’s see if I manage to do that.

The loader.conf manual presents the following options that seem interesting to me:

  • console-mode – size of the console, I’ll check if setting it to max makes the visible entries be bigger.
  • editor – The man page says it’s enabled by default, but maybe not in CachyOS, because I haven’t seen it.
  • auto-poweroff – shows a Power Off entry

NOTE: https://wiki.cachyos.org/configuration/boot_manager_configuration/#systemd-boot says the per-kernel configs are int /boot/loader/entry, but they’re in /boot/loader/entries. I will try to see how I can fix that in the wiki.

My full conf file looks like this now:

default @saved
timeout 5
console-mode max
editor on
auto-poweroff on

After restarting the PC, I saw no changes to the entries size and read up on the editor, so I’m removing those lines.

To be able to change Windows entry’s position, I have to add it manually.

# /boot/loader/entries/windows.conf

title Windows
efi /EFI/Microsoft/Boot/bootmgfw.efi
sort-key a

It worked! However, I now have 2 Windows entries, so I’m adding auto-entries off to my config file.

Leave a Comment

Your email address will not be published. Required fields are marked *