Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/omarchy-iso-make
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
BUILD_RELEASE_PATH="$BUILD_ROOT/release"
mkdir -p "$BUILD_RELEASE_PATH"

OMARCHY_INSTALLER_REPO="${OMARCHY_INSTALLER_REPO:-basecamp/omarchy}"
OMARCHY_INSTALLER_REF="${OMARCHY_INSTALLER_REF:-master}"
OMARCHY_INSTALLER_REPO="${OMARCHY_INSTALLER_REPO:-d-cas/omarchy}"
OMARCHY_INSTALLER_REF="${OMARCHY_INSTALLER_REF:-fix/modernize-initramfs-hooks}"

DOCKER_ARGS=(
--rm
Expand Down
44 changes: 44 additions & 0 deletions configs/airootfs/root/.automated_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ install_arch() {
CURRENT_SCRIPT="install_base_system"
install_base_system > >(sed -u 's/\x1b\[[0-9;]*[a-zA-Z]//g' >>/var/log/omarchy-install.log) 2>&1
unset CURRENT_SCRIPT

# Fix kernel cmdline for systemd-based initramfs
fix_kernel_cmdline_for_systemd || echo "Cmdline fix skipped/failed - non-fatal"

stop_log_output
}

Expand Down Expand Up @@ -121,6 +125,46 @@ EOF
chmod +x /mnt/home/$OMARCHY_USER/.local/share/omarchy/default/waybar/indicators/screen-recording.sh 2>/dev/null || true
}

fix_kernel_cmdline_for_systemd() {
# Convert cryptdevice=PARTUUID= to rd.luks.name=UUID= for systemd-based initramfs
echo "Converting kernel cmdline to systemd syntax..."

# Check all common Limine locations
for LIMINE_CONF in \
"/mnt/boot/limine.conf" \
"/mnt/boot/EFI/limine/limine.conf" \
"/mnt/boot/efi/limine.conf" \
"/mnt/boot/EFI/BOOT/limine.conf"
do
[[ -f "$LIMINE_CONF" ]] || continue
grep -q "cryptdevice=PARTUUID=" "$LIMINE_CONF" 2>/dev/null || continue

# Settle device symlinks; don't care if udevadm missing
command -v udevadm >/dev/null 2>&1 && udevadm settle || true

# Extract PARTUUID without -P and without tripping -e on no-match
PARTUUID="$(
grep -o 'cryptdevice=PARTUUID=[^ :"]*' "$LIMINE_CONF" 2>/dev/null | head -1 | cut -d= -f3
)" || PARTUUID=""
[[ -n "$PARTUUID" ]] || continue

LUKS_DEVICE="/dev/disk/by-partuuid/$PARTUUID"
[[ -b "$LUKS_DEVICE" ]] || continue
cryptsetup isLuks "$LUKS_DEVICE" 2>/dev/null || continue

LUKS_UUID="$(cryptsetup luksUUID "$LUKS_DEVICE" 2>/dev/null)" || LUKS_UUID=""
[[ -n "$LUKS_UUID" ]] || continue

echo "Updating $LIMINE_CONF..."
cp -a "$LIMINE_CONF" "${LIMINE_CONF}.bak.$(date +%s)" 2>/dev/null || true

busybox_cmd="cryptdevice=PARTUUID=${PARTUUID}:root"
systemd_cmd="rd.luks.name=${LUKS_UUID}=root rd.luks.options=tries=0"

sed -i "s|${busybox_cmd}|${systemd_cmd}|g" "$LIMINE_CONF"
done
}

chroot_bash() {
HOME=/home/$OMARCHY_USER \
arch-chroot -u $OMARCHY_USER /mnt/ \
Expand Down