uboreas / centos-8-minimal

Create minimal CentOS 8 installation ISO with customized packages.
62 stars 30 forks source link

Adding kickstart file #8

Open tmrtn opened 4 years ago

tmrtn commented 4 years ago

Hello,

I want to add a kickstart file to the (latest) ISO. Unfortunately, this causes the following error:

/usr/sbin/fetch-kickstart-disk: line 24: rmdir: command not found

Do you have any idea how to fix this? I tried several different kickstart files. ksvalidator doesn't show any problems. Any help would be appreciated.

alex4108 commented 4 years ago

I append my isolinux.cfg with the KS URL Then I put the KS URL on a CDN

This way I can update KS without remastering the ISO ;)

tmrtn commented 4 years ago

Thanks for your input. Unfortunately, external KS is not an option due to missing network configuration.

ezbik commented 4 years ago

Here is my patch for adding kickstart

@@ -562,6 +566,17 @@ function cmcreateiso() {
       out="CentOS-${ver}-x86_64-minimal.iso"
    fi
    echo " ~ Creating ISO image"
+
+    echo '= mod bootloader start'
+
+
+    set -e
+    cp ks.cfg ${dp}/isolinux/
+    sed -i '/linuxefi/s@$@ inst.ks=hd:LABEL='$lbl':/isolinux/ks.cfg@' ${dp}/EFI/BOOT/grub.cfg
+    sed -i '/initrd=initrd.img/s@$@ inst.ks=hd:LABEL='$lbl':/isolinux/ks.cfg@'  ${dp}/isolinux/isolinux.cfg
+    set +e
+    echo '= mod bootloader end'
+
    cd "${dp}"
    chmod 664 isolinux/isolinux.bin
    rm -f "${pw}/${out}"
shake commented 2 years ago

I have test and working.