-1

I'm trying to create a CentOS 7 ISO image to use it later with Virtualbox. That ISO should include a ks.cfg file also.

I've followed the steps under How to create a custom ISO image in CentOS, but I get one ISO with only 70MB of size which cannot be used in Virtualbox.

Any user guide or something to follow?

U880D
  • 597
  • 7
  • 17
Juan Garcia
  • 171
  • 4
  • 8

1 Answers1

2

I found the way to create custom DVD from the RHEL7 page.

  1. Mount the downloaded image.

    mount -t iso9660 -o loop path/to/image.iso /mnt/iso
    
  2. Create a working directory - a directory where you want to place the contents of the ISO image.

    mkdir /tmp/ISO
    
  3. Copy all contents of the mounted image to your new working directory.

    cp -pRf /mnt/iso /tmp/ISO
    

    Make sure to use the -p option to preserve file and directory permissions and ownership.

  4. Unmount the image.

    umount /mnt/iso
    
  5. Make sure your current working directory is the top-level directory of the extracted ISO image - e.g. /tmp/ISO/iso. Create the new ISO image using genisoimage:

    genisoimage -U -r -v -T -J -joliet-long -V "RHEL-7.1 Server.x86_64" -Volset "RHEL-7.1 Server.x86_64" -A "RHEL-7.1 Server.x86_64" -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 ../NEWISO.iso .
    

Hope the Anaconda Customization Guide - Images Repack will helpful too.

U880D
  • 597
  • 7
  • 17
Hai Nguyen
  • 63
  • 6
  • can you summarize what's on the doc page so future visitors don't need to click to see what's there? Welcome to Server Fault - this looks like a great start of an answer, but really needs to be fleshed-out some more :) – warren Apr 08 '16 at 16:43