码迷,mamicode.com
首页 > 其他好文 > 详细

build custom centos7

时间:2018-07-23 00:07:15      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:perm   nal   imp   bee   dha   kick   upd   gui   rom   

There is a script  to create custom iso

1.  KICKSTART INSTALLATIONS

2. KICKSTART OPTIONS

3. make the ISO 

        https://serverfault.com/questions/517908/how-to-create-a-custom-iso-image-in-centos

  1. Create a directory to mount your source.

    mkdir /tmp/bootiso
    
  2. Loop mount the source ISO you are modifying. (Download from Red Hat / CentOS.)

    mount -o loop /path/to/some.iso /tmp/bootiso
    
  3. Create a working directory for your customized media.

    mkdir /tmp/bootisoks
    
  4. Copy the source media to the working directory.

    cp -r /tmp/bootiso/* /tmp/bootisoks/
    
  5. Unmount the source ISO and remove the directory.

    umount /tmp/bootiso && rmdir /tmp/bootiso
    
  6. Change permissions on the working directory.

    chmod -R u+w /tmp/bootisoks
    
  7. Copy your Kickstart script which has been modified for the packages and %post to the working directory.

    cp /path/to/someks.cfg /tmp/bootisoks/isolinux/ks.cfg
    
  8. Copy any additional RPMs to the directory structure and update the metadata.

    cp /path/to/*.rpm /tmp/bootisoks/Packages/.
    cd /tmp/bootisoks/Packages && createrepo -dpo .. .
    
  9. Add kickstart to boot options.

    sed -i ‘s/append\ initrd\=initrd.img/append initrd=initrd.img\ ks\=cdrom:\/ks.cfg/‘ /tmp/bootisoks/isolinux/isolinux.cfg
    
  10. Create the new ISO file.

    cd /tmp/bootisoks && \ 
    mkisofs -o /tmp/boot.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/. .
    
  11. (Optional) Use isohybrid if you want to dd the ISO file to a bootable USB key.

    isohybrid /tmp/boot.iso
    
  12. Add an MD5 checksum (to allow testing of media).

    implantisomd5 /tmp/boot.iso

build custom centos7

标签:perm   nal   imp   bee   dha   kick   upd   gui   rom   

原文地址:https://www.cnblogs.com/shaohef/p/9352133.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!