diff --git a/bastion/scripts/build-asahi-rootfs.sh b/bastion/scripts/build-asahi-rootfs.sh index 063ef8b..092a35b 100755 --- a/bastion/scripts/build-asahi-rootfs.sh +++ b/bastion/scripts/build-asahi-rootfs.sh @@ -160,11 +160,13 @@ fi echo "==> Injecting lab configuration into rootfs..." # Firstboot script +mkdir -p "$WORK_DIR/rootfs/usr/local/bin" echo "$FIRSTBOOT_SCRIPT" > "$WORK_DIR/rootfs/usr/local/bin/lab-firstboot.sh" chmod 755 "$WORK_DIR/rootfs/usr/local/bin/lab-firstboot.sh" echo " Installed: /usr/local/bin/lab-firstboot.sh" # Systemd service +mkdir -p "$WORK_DIR/rootfs/etc/systemd/system" cat > "$WORK_DIR/rootfs/etc/systemd/system/lab-firstboot.service" << 'UNIT' [Unit] Description=Lab first-boot LVM setup @@ -201,12 +203,12 @@ fi # Ensure lvm2 and xfsprogs are installed (should be in server image already) echo " Checking required packages..." -if [ -f "$WORK_DIR/rootfs/usr/sbin/pvcreate" ]; then +if [ -f "$WORK_DIR/rootfs/usr/sbin/pvcreate" ] || [ -f "$WORK_DIR/rootfs/usr/bin/pvcreate" ]; then echo " lvm2: present" else echo " WARNING: lvm2 not found in rootfs. LVM setup may fail." fi -if [ -f "$WORK_DIR/rootfs/usr/sbin/mkfs.xfs" ]; then +if [ -f "$WORK_DIR/rootfs/usr/sbin/mkfs.xfs" ] || [ -f "$WORK_DIR/rootfs/usr/bin/mkfs.xfs" ]; then echo " xfsprogs: present" else echo " WARNING: xfsprogs not found in rootfs. LVM setup may fail."