How to create a custom Oracle Linux 7u2 iso image

1.4k Views Asked by At

I have been using a some proven steps to create my own Oracle Linux 6uX ISO images with a custom kickstart script for a long time. What i basically do is mount the iso-image using hdiutil, copy the contents to a working folder, make the modifications and create an iso using makeiso (cdrutils). Details have been described here; http://www.reddipped.com/2015/12/virtualbox-soa-bpm-osb-bam-33-minutes/

I just made my first attempts to create a custom Oracle Linux 7u2 ISO images, but miserably failed till now.

First opening the image using hdiutil gives and 'hdiutil: attach failed - no mountable file systems'. Instead i used Keka to extract the contents of the iso. Modified the contents of the extracted iso-image;

  • Removing /isolinux/boot.cat,
  • Adding a new ks-bd.ks
  • Adding a menu item to the isolinux.cfg to be able to start installation using the kickstart file

    label linux_basicserver_silent\
      menu label ^Install basic server silent\
      menu default\
      kernel vmlinuz\
      append initrd=initrd.img ks=cdrom:\/ks-bd.ks\
    

Then created an iso again;

## Make isolinux.bin writable
chmod u+w V100082-01U/isolinux/isolinux.bin

# Build the V100082-01Uiso
cdrtools/cdrtools-*/mkisofs/OBJ/i386-darwin-clang/mkisofs -r -J -T -o V100082-01U.iso -b isolinux/isolinux.bin \
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R \
-m TRANS.TBL -v -V Oracle\ Linux\ 7.2 ./V100082-01U

After mounting the iso image and selecting the 'linux_basicserver_silent' installation option the installation seems to stall on the message 'Starting automated install'

enter image description here

When selecting a standard interactive installation in the installation menu the installation also freezes with the latest step 'Reached target Basic System'

enter image description here

After some minutes the same error 'dracut-initqueue timeout' is repeatedly shown .

enter image description here

Any hints how to fix this?

-- Update 10/27/2016 --

When comparing the orignal iso with the created iso using mkisofs there are no substantial differences, i think..

Original

./isoinfo -d -i V100082-01.iso
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: OL-7.2 Server.x86_64
Volume set id: 
Publisher id: 
Data preparer id: 
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM
Copyright File id: 
Abstract File id: 
Bibliographic File id: 
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 2178717
El Torito VD version 1 found, boot catalog is in sector 701

Joliet with UCS level 3 found.
SUSP signatures version 1 found
Rock Ridge signatures version 1 found
Rock Ridge id 'RRIP_1991A'
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Cksum AA 55 OK
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff EFE 3838

Rebuild

./isoinfo -d -i V100082-01U.iso 
CD-ROM is in ISO 9660 format
System id: Mac OS X
Volume id: Oracle Linux 7.2
Volume set id: 
Publisher id: 
Data preparer id: 
Application id: MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
Copyright File id: 
Abstract File id: 
Bibliographic File id: 
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 2251903
El Torito VD version 1 found, boot catalog is in sector 718

Joliet with UCS level 3 found.
SUSP signatures version 1 found
Rock Ridge signatures version 1 found
Rock Ridge id 'RRIP_1991A'
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Cksum AA 55 OK
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 2CF 719
1

There are 1 best solutions below

0
On

Instead of using 7zip, use the cdrtool utility isoinfo to extract the original iso image.

mkdir V100082-01U
cd V100082-01U
isoinfo -R -X -i ../V100082-01.iso

Then modify the image and rebuild using mkisofs

## Make isolinux.bin writable
chmod u+w work/isolinux/isolinux.bin

# Build the V100082-01Uiso 
cdrtools/cdrtools-*/mkisofs/OBJ/i386-darwin-clang/mkisofs -r -J -T -o V100082-01U2.iso -b isolinux/isolinux.bin \
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -sysid LINUX \
-m TRANS.TBL -v -V OL-7.2\ Server.x86_64 ./work