CentOS 7.2 Automatic Installation CD experiment complete process record

Source: Internet
Author: User

Experimental process:

This article is on a RHEL6.5 machine, through to the native CentOS7.2 ISO Add Kickstart startup script ks.cfg and read script boot options, then re-encapsulate the ISO image, complete the CentOS7.2 automatic installation disc production, and create a new virtual machine to mount the disc to verify the automatic installation of the operating system.


The tools you need:

1. One RHEL6.5 host (virtual machine is also available, but this article involves creating a new virtual machine on the host, so it is recommended that the host should support KVM or other virtual machine technology)

2. Virt-manager Visualization of virtual machine management tools

3. Virt-install Virtual Machine Installation Tool

4. qemu-img qemu Disk Utility for setting up virtual machine disks

5. Centos-7-x86_64-dvd-1511.iso the ISO image downloaded from the CentOS website

6. Mkisofs (genisoimage) Make CD tool


Experimental steps:

1. Mount the Image:

Mount-o loop-t iso9660/root/centos-7-x86_64-1511.iso/mnt

2. Copy all of the contents of the directory to a different local directory:

Cp-a/mnt/*/cloud/iso/centos7.2/

3. Copy the ks.cfg script that you have written to complete the automatic installation to the directory.

Cp/root/ks.cfg/cloud/iso/centos7.2/

4. Go to the copied directory, edit the Isolinux/isolinux.cfg file, and follow the other boot menu formats and add the following boot options:

Label KS Menu label Install CentOS 7 by the ^kickstart menu default kernel vmlinuz append initrd=initrd.img inst.ks=cd Rom:/ks.cfg Inst.stage2=hd:label=asika

5. Edit the efi/boot/grub.conf file and follow the other boot menu formats by adding the following:

Menuentry ' Install CentOS 7 by Kickstart '--class Fedora--class gnu-linux--class GNU--class os {linuxefi/imag Es/pxeboot/vmlinuz inst.ks=cdrom:/ks.cfg inst.stage2=hd:label=centos\x207\x20x86_64 Quiet Initrdefi/images/pxeboot /INITRD.IMG}

6. Making a disc using the Genisoimage command

Genisoimage-v-cache-inodes-joliet-long-r-j-t-v asika-o./centos-x86_64-7-1511-my-ks.iso-c Isolinux/boot.cat-b is Olinux/isolinux.bin-no-emul-boot-boot-load-size 4-boot-info-table-eltorito-alt-boot-b images/efiboot.img- No-emul-boot./centos7.2/

7. Set up the virtual machine and test the image

Qemu-img create-f qcow2 centos7-ks-test.img 20gvirt-install--name centos7-ks-test--vcpus=2--ram 2048--disk Path=/clou D/vm_imgs/centos7-ks-test.img,format=qcow2,bus=virtio--network network:default--os-type=linux--vnc--autostart-- Cdrom/cloud/iso/centos-x86_64-7-1511-my-ks.iso--keymap=en-us

Note:
1. The contents of the INST.KS should be specified as ks.cfg in the CDROM path. For example, your ks.cfg file is placed in the Isolinux directory, INST.KS should be equal to cdrom:/isolinux/ks.cfg.
2. The disc ID specified when making the disc, that is, the content of the-V option should match the contents of the Hd:label option in the label added in Isolinux.cfg, multiple experiments, indicating that inconsistent content caused the system not to load properly from the disc, and that the CD ID does not require the same boot/ grub.conf Add line Hd:label content consistent ...

Reference article:

http://xiaoli110.blog.51cto.com/1724/1617541


This article is from the "Piano in the Beginning" blog, please be sure to keep this source http://kotori.blog.51cto.com/4819846/1893137

CentOS 7.2 Automatic Installation CD experiment complete process record

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.