summaryrefslogtreecommitdiff
path: root/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
diff options
context:
space:
mode:
authornippy <nippy@nippy-Mac-mini.lan>2026-08-29 15:59:11 +0200
committernippy <nippy@nippy-Mac-mini.lan>2026-08-29 15:59:11 +0200
commit776a713fcd7216d0d688c4fe33215ee8d3b4391a (patch)
treebb7a860c3c53c71cf4c5b80de1f7d00e0b13770d /releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
parentcda2f7feeeb95ad109f942d3a52d2c8b52269218 (diff)
downloadRaveOS-build-iso-776a713fcd7216d0d688c4fe33215ee8d3b4391a.tar.gz
RaveOS-build-iso-776a713fcd7216d0d688c4fe33215ee8d3b4391a.zip
fix
Diffstat (limited to 'releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install')
-rwxr-xr-xreleng/airootfs/usr/share/calamares/kernel-install/95-raveos.install38
1 files changed, 22 insertions, 16 deletions
diff --git a/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install b/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
index 316204c..4bb0c6b 100755
--- a/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
+++ b/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
@@ -22,19 +22,19 @@ ENTRY_FILE="$ENTRY_DIR/raveos.conf"
LINUX_IMAGE="/vmlinuz-linux-cachyos"
INITRAMFS_IMAGE="/initramfs-linux-cachyos.img"
-# --------------------------------------------------
-# Microcode (must be first initrd)
-# --------------------------------------------------
+# CPU Microcode detection (Intel vs AMD)
MICROCODE=""
-[ -f "$BOOT_ROOT/intel-ucode.img" ] && MICROCODE="/intel-ucode.img"
-[ -f "$BOOT_ROOT/amd-ucode.img" ] && MICROCODE="/amd-ucode.img"
+CPU_VENDOR="$(grep -m1 'vendor_id' /proc/cpuinfo 2>/dev/null | awk '{print $3}' || true)"
+if [ "$CPU_VENDOR" = "GenuineIntel" ] && [ -f "$BOOT_ROOT/intel-ucode.img" ]; then
+ MICROCODE="/intel-ucode.img"
+elif [ "$CPU_VENDOR" = "AuthenticAMD" ] && [ -f "$BOOT_ROOT/amd-ucode.img" ]; then
+ MICROCODE="/amd-ucode.img"
+else
+ [ -f "$BOOT_ROOT/intel-ucode.img" ] && MICROCODE="/intel-ucode.img"
+ [ -f "$BOOT_ROOT/amd-ucode.img" ] && MICROCODE="/amd-ucode.img"
+fi
-# --------------------------------------------------
-# Root device detection
-# --------------------------------------------------
-# findmnt can come back empty depending on the chroot/mount-namespace
-# context this hook runs in (e.g. during pacstrap). Fall back to
-# /proc/mounts, and finally /etc/fstab (once it exists), before giving up.
+# Root device detection with fallback
ROOT_SRC="$(findmnt -no SOURCE / || true)"
ROOT_FS="$(findmnt -no FSTYPE / || true)"
ROOT_OPTS="$(findmnt -no OPTIONS / || true)"
@@ -51,9 +51,6 @@ if [ -z "$ROOT_SRC" ] && [ -f /etc/fstab ]; then
ROOT_OPTS="$(awk '$2 == "/" {print $4; exit}' /etc/fstab)"
fi
-# /proc/mounts and /etc/fstab may give "UUID=xxxx"/"PARTUUID=xxxx" directly
-# instead of a /dev/ path -- resolve to an actual device node so the blkid
-# lookups below work either way.
case "$ROOT_SRC" in
UUID=*|PARTUUID=*|LABEL=*)
RESOLVED="$(blkid -t "$ROOT_SRC" -o device 2>/dev/null || true)"
@@ -63,7 +60,7 @@ esac
OPTIONS="rw quiet splash"
-# LUKS
+# LUKS Encryption & Root Device Fallbacks
if [[ "$ROOT_SRC" == /dev/mapper/* ]]; then
UUID="$(blkid -s UUID -o value "$ROOT_SRC" || true)"
if [ -n "$UUID" ]; then
@@ -73,7 +70,16 @@ if [[ "$ROOT_SRC" == /dev/mapper/* ]]; then
fi
else
PARTUUID="$(blkid -s PARTUUID -o value "$ROOT_SRC" || true)"
- [ -n "$PARTUUID" ] && OPTIONS="root=PARTUUID=$PARTUUID $OPTIONS"
+ if [ -n "$PARTUUID" ]; then
+ OPTIONS="root=PARTUUID=$PARTUUID $OPTIONS"
+ else
+ UUID="$(blkid -s UUID -o value "$ROOT_SRC" || true)"
+ if [ -n "$UUID" ]; then
+ OPTIONS="root=UUID=$UUID $OPTIONS"
+ else
+ OPTIONS="root=$ROOT_SRC $OPTIONS"
+ fi
+ fi
fi
# --------------------------------------------------