# - keep initrd if present
# - create a grub config with PARTUID to ease boot from various devices automaticaly
# - add a UEFI startup.nsh script for autoboot
-# - does not allocate swap
+# - remove any configured swap is fstab
# - accept .hddimg, wic and wic.xz as sources
LANG=C
sed -i "/menuentry 'install'/,/^}/d" $GRUB_CFG
# Delete any LABEL= strings
sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
-
+ # detect config initrd=microcode.cpio
+ if grep -q microcode $GRUB_CFG; then
+ warn "initrd=microcode.cpio detected, might not work on all boot configurations"
+ fi
sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
sed -i "s@vmlinuz @vmlinuz root=$ROOTFS_PARTUUID @" $GRUB_CFG
fi
fi
# Delete any LABEL= strings
sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_BOOT
-
+ # detect config initrd=microcode.cpio
+ if grep -q microcode $SYSTEMDBOOT_BOOT; then
+ warn "initrd=microcode.cpio detected, might not work on all boot configurations"
+ fi
sed -i "s@ root=[^ ]*@ @" $SYSTEMDBOOT_BOOT
sed -i "s@options @options root=$ROOTFS_PARTUUID @" $SYSTEMDBOOT_BOOT
fi
else
cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed"
fi
+debug "removing any swap entry in /etc/fstab"
+sed --in-place '/swap/d' $ROOTFS_MNT/etc/fstab
printf "flushing data on removable device. May take a while ... "
sync --file-system $ROOTFS_MNT