0

I'm running through the steps to add a kickstart to a CentOS 8 ISO. I've looked at Red Hat's documentation for RHEL5 through RHEL8, and several probably outdated web pages.

  • I know the dd command to burn the new ISO works with an unmodified ISO. The USB drive is bootable in that case.
  • I know I have a good kickstart file.
  • I've made the modifications to isolinux/isolinux.cfg to add ks=cdrom:/ks.cfg.
  • I even found the documentation about adding inst.ks=cdrom:/ks.cfg to EFI/BOOT/grub.cfg.

And in every case, mkisofs still won't make a bootable USB drive. The USB drive is readable, once the regular OS is running and it's bootable if I dd the existing ISO onto it. I think I've ruled out everything except for something missing in this command. (The -V volume name is taken directly from running the blkid command on the downloaded base ISO.)

mkisofs \
  -o ../CentOS-8.3.2011-x86_64-ks.iso \
  -b isolinux/isolinux.bin \
  -J -R -l -v \
  -c isolinux/boot.cat \
  -no-emul-boot \
  -boot-load-size 4 \
  -boot-info-table \
  -eltorito-alt-boot \
  -graft-points \
  -V "CentOS-8-3-2011-x86_64-dvd" .

Once I have this part figured out, I'll document the whole process. Everything I've found out there right now is at least two years old.

4
  • Your question contains a contradiction: "mkisofs still won't make a bootable USB drive" and "it's bootable if I dd the existing ISO onto it". Is it bootable or not? Mar 21 '21 at 4:31
  • @berndbausch - If I take the default ISO from CentOS and burn it onto the USB drive, the drive is bootable. If I then modify that ISO through the documented processes to add a kickstart file, run mkisofs, and burn the result onto the USB drive, the drive is readable but not bootable.
    – dafydd
    Mar 21 '21 at 4:56
  • 1
    To be honest, the mkisofs options are black magic to me, but the descriptions for RHEL 7 and 8 include a last step, isohybrid --uefi /tmp/yourname.iso. If you have a Red Hat subscription, these instructions are a few weeks old: access.redhat.com/solutions/60959. Mar 21 '21 at 8:41
  • @berndbausch - I'll give you credit for the "black magic" thought. After I gave up trying to tidy the mkisofs command, things like putting the arguments in alphabetical order, etc., the USB drive became bootable. I'm on to additional problems, but I have a solution for this one. Posting shortly.
    – dafydd
    Mar 23 '21 at 23:49
0

So, the solution was basically to quit trying to out-think the documentation. Don't edit the mkisofs command! Run it the way it's given in the documentation. The only modification I've made is to add the -v for verbose output. This was the page that I wound up working from.

d_build_dir=/tmp/iso
df_dest_iso=/path/to/CentOS-8.3-2011-x86_64-ks.iso
d_usb_device=/dev/sdb

cd ${d_build_dir}
time mkisofs \
  -o ${df_dest_iso} \
  -b isolinux/isolinux.bin \
  -J -R -l -v \
  -c isolinux/boot.cat \
  -no-emul-boot \
  -boot-load-size 4 \
  -boot-info-table \
  -eltorito-alt-boot \
  -e images/efiboot.img \
  -no-emul-boot \
  -graft-points \
  -V "CentOS-8-3-2011-x86_64-dvd" \
  -jcharset utf-8 .

isohybrid --uefi ${df_dest_iso}
implantisomd5 ${df_dest_iso}

umount ${d_usb_device}1
time dd if=${df_dest_iso} of=${d_usb_device} status=progress

One thing that page got wrong was that you need to do the implantisomd5 last. Otherwise, the isohybrid command will make changes to the ISO that will break the md5 verification hashes.

These steps get me a bootable ISO on a USB flash drive. It does not yet give me a usable installer. I'm still working my through getting usable isolinux.cfg or grub.cfg modifications. I'm keeping my notes at my github project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.