Skip to content

Instantly share code, notes, and snippets.

View msmafra's full-sized avatar

Marcelo dos Santos Mafra msmafra

  • Brazil
  • 13:38 (UTC -03:00)
View GitHub Profile

image

CachyOS Kernel for Fedora with Secure Boot

Did you just install kernel-cachyos and got hit by bad shim signature when booting? Me too. This is how I fixed it.

First, make sure you have Secure Boot with mokutil --sb-state.

Note, there's a second way of doing this by using sbctl, but I didn't want to wipe my Secure Boot keys.

Installing the CachyOS Kernel

@msmafra
msmafra / get_latest_release.sh
Created May 18, 2025 21:01 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@msmafra
msmafra / btrbk-o
Last active March 9, 2023 19:33
btrbk simple wrapper
#!/usr/bin/env bash
#####################################################
# Simple BTRBK Wrapper for using with cron or systemd timers
# https://github.com/digint/btrbk/issues/520
#####################################################
# shellcheck disable=SC1001
LC_ALL=C
LANG=C
VERSION="0.1"
declare SCRIPT_NAME
#!/bin/bash
[[ "$(id -u)" -eq 0 ]] || (echo "Got root?" ; exit 5)
command -v btrfs > /dev/null || (echo "Command not found: btrfs" ; exit 4)
for folder in $* ; do
mount | awk '{print $3}' | grep "$(pwd)/${folder}" && echo "${folder} has a submount?" && exit 1
btrfs sub list . | grep "${PWD##*/}/${folder}" && echo "${folder} has a subvolume?" && exit 2
[ -e ${folder}.temp ] && echo "${folder}.temp already exists?" && exit 3 || true
mv ${folder} ${folder}.temp
btrfs sub create ${folder}