0

I am trying to create custom Centos 7. I am able to create bootalbe ISO but while installation, In installation summary page SOFTWARE SELECTION list is empty. Steps :-

  1. Download centos7 ISO.
  2. Extract ISO in folder.
  3. Added ks.cfg file.
  4. run createrepo command.
  5. run mkiso command.

(for details steps please follow below link:- I am using following link :- How to create a custom ISO image in CentOS )

Screenshots :-

installation summary

SOFTWARE SELECTION

4
  • 3
    It might help to use current (vendor) documentation rather than a 5 year old instruction set. i.e. access.redhat.com/documentation/en-us/red_hat_enterprise_linux/… describes a inst.ks=... boot parameter rather than ks=...path/to/kickstart.ks for RHEL7 and therefore CentOS7
    – HBruijn
    Jan 16, 2018 at 6:39
  • Thanks for comment. With full cntos 7(CentOS-7-x86_64-DVD-1511.iso ) this steps are working but when i used minimal(CentOS-7-x86_64-Minimal-1708.iso) version of centos 7 its not working. Jan 16, 2018 at 8:05
  • You can't use the minimal media for this. It's already customized. Use the DVD Or netinstall media. Jul 26, 2018 at 13:36
  • Thanks for comments, but we require only selected rpms for my task. Using minimal i am able to customize iso i will share steps shortly Aug 8, 2018 at 4:13

1 Answer 1

1

I got answer.
You need to consider following things.
1)comps.xml.
2)createrepo command.
3)ks.cfg file
4)isolinux.cfg

1)Update your comps.xml and resole all dependency of rpms. Add rpm name in comps.xml group like. save your ks.cfg file outside of your iso extracted folder.

    <comps>
      <group>
         <id>core</id>
         <name>Core</name>
         <description>Smallest possible installation.</description>
         <default>false</default>
         <uservisible>false</uservisible>
         <packagelist>
            <packagereq type="mandatory">basesystem</packagereq>
            <packagereq type="mandatory">centos-logos</packagereq>
            <packagereq type="mandatory">bash</packagereq>
            .........
            <packagereq type="mandatory">[CUSTOM_PACKAGE_NAME]</packagereq>
         </packagelist>
      <group>
    <comps>

2)configure your ks.cfg file. create ks.cfg file and save on isolinux/ks/ks.cfg location

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
#rootpw myPassword 
# System language
lang en_US
# Firewall configuration
firewall --disabled
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use CDROM installation media
cdrom
# Use text mode install(for graphical setup comment or remove below text word)
text
#cmdline
# SELinux configuration
#selinux --enforcing
selinux --disabled
# Do not configure the X Window System
skipx

# Network information
network  --bootproto=dhcp --device=dhcp
# Reboot after installation
reboot
# System timezone
timezone Asia/Kolkata
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
part /boot --fstype xfs --size=256
part swap --fstype swap --size=1024
part / --fstype xfs --grow --size=4000
reboot --eject
%packages
#below package name is you mention in comps.xml
@core
@core
%end
%post
mkdir /root/test/
%end

3)isolinux.cfg file present in isolinux folder
. You can see below code

label linux
  menu label ^Install CentOS 7
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet

above code execute default ks.cfg file. this replace with below code to configure your custom ks file

label linux
  menu label ^Install CentOS 7
  kernel vmlinuz
  append initrd=initrd.img inst.ks=hd:LABEL=CentOS\x207\x20x86_64:/ks/ks-noraid.cfg inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet

4)create repo command. Open your iso folder and execute following command.

createreop -g ../comps.xml

execute below command to create iso

mkisofs -o /root/centos7_test.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "CentOS 7 x86_64" -R -J -v -T isolinux/. .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .