Build a custom Fedora install CD

From Wiki
Revision as of 13:30, 16 March 2018 by Admin (Talk | contribs)

Jump to: navigation, search

Creating a custom boot CD for Fedora 26 kickstart.

Note: This configuration requires a DHCP address. To use a static IP the kickstart file must be modified with the proper network settings.

Mount the iso file.

sudo mount -o loop -t iso9660 /pub/fedora/releases/26/Server/x86_64/iso/Fedora-Server-dvd-x86_64-26-1.5.iso /var/mnt/iso/

Copy the iso for modifications:

mkdir fedora26
rsync -avHl /var/mnt/iso/ fedora26

Add a kickstart option to the isolinux/isolinux.cfg file The "install" line should look similar to below. The "LABEL=" entry will normally be a string like "Fedora-S-dvd-x86_64-${release}", you can use blkid to verify this.

blkid /pub/fedora/26/Server/x86_64/iso/Fedora-Server-dvd-x86_64-26-1.5.iso
label kickstart
  menu label ^Fedora 26 Kickstart Install
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-25 inst.ks= ip=dhcp

To embed the kickstart file in the iso file you can set to inst.ks=cdrom:/ks.cfg

Example kickstart files are available at the following URLs.

After you are done with these steps create an iso file using mkisofs:

sudo mkisofs -o fedora26-server-x86_64.iso -V Fedora-S-dvd-x86_64-25 -b isolinux/isolinux.bin -c isolinux/ -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T fedora26/

Burn the disc:

wodim --devices
wodim -v dev='/dev/sg2' fedora26_server_x86_64.iso

You should now be able to boot from the CD.