1

I wish to create an ISO file containing CentOS 7 x64 for unattended/kickstart installations.

For CentOS 6, it worked like a charm. But for CentOS 7, I am unable to create a bootable ISO image.

This is what I did:

  • Mounted the original .ISO:

    mkdir /tmp/iso
    mount /work/CentOS-7-x86_64-Minimal-1503-01.iso /tmp/iso -o loop
    
  • Copying the files to a new directory:

    mkdir /work/kickstart 
    rsync -avz /tmp/iso/ /work/kickstart/
    
  • Creating a new iso:

    genisoimage -untranslated-filenames -volid 'CentOS-7.0-KS-x86_64' -J -joliet-long -rational-rock -translation-table -input-charset utf-8 -x  ./lost+found -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img  -no-emul-boot -o /work/centos7.iso -T /work/kickstart
    

    isohybrid -u /work/centos7.iso

  • All is good so far, but when I try to boot out of this image I get:

    dracut-initqueue[577]: Warning: Could not boot.
    dracut-initqueue[577]: Warning: /dev/root does not exist
    

    Screenshot:

    enter image description here

What causes this problem?

I guess I am not creating the ISO right, it should be a simple copy of the same data.

Giacomo1968
  • 58,727
VelDev
  • 11

1 Answers1

0

I have not put that up somewhere right now.. but did that last week for a RHEL 7 installation but should be the same for CentOS7. Steps are as following:

  1. get the ISO file of CentOS 7

  2. mount -o loop CentOS-7.0*.iso /mnt/

  3. mkdir -p /CentOS-7-ISO-respin/{CentOS-7-unpacked,CentOS-7-iso}

  4. rsync -avz /mnt/ /CentOS-7-ISO-respin/RHEL-7-unpacked

  5. put your kickstart file into /CentOS-7-ISO-respin/RHEL-7-unpacked

  6. add a new line to /CentOS-7-ISO-respin/RHEL-7-unpacked/isolinux/isolinux.cfg (this way you can use the ISO also from a DVD) label linux_ks menu label ^Install CentOS 7 with Kickstart kernel vmlinuz append initrd=initrd.img inst.stage2=hd:sdb2:/ ks=hd:sdb1:/ks.cfg

  7. create the ISO with: /usr/bin/genisoimage -untranslated-filenames -volid 'CentOS-7.0-KS-x86_64' -J -joliet-long -rational-rock -translation-table -input-charset utf-8 -x ./lost+found -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o /CentOS-7-ISO-respin/CentOS-7-KS-iso/CentOS-7.0-KS-x86_64-DVD.iso -T /CentOS-7-ISO-respin/CentOS-7-unpacked/ ; isohybrid -u /CentOS-7-ISO-respin/CentOS-7-KS-iso/CentOS-7.0-KS-x86_64-DVD.iso

  8. dd if=/CentOS-7-ISO-respin/CentOS-7-CSB-iso/CentOS-7.0-KS-x86_64-DVD.iso of=/dev/XXX (where XXX is the Device Name of your USB drive without the partition number e.g. /dev/sdb) (Careful, that command destroys all data on the stick.)

https://www.redhat.com/archives/kickstart-list/2014-August/msg00010.html

Giacomo1968
  • 58,727