Kickstart and kickstart

Source: Internet
Author: User
Tags crypt

Kickstart and kickstart

There are many options for kickstart to automatically respond to files. The following only describes several common options that may be used in CentOS 6. In addition, the options of CentOS 6 and CentOS 7 are quite different, so please pay attention to use them. You can view the official installation documentation.

CentOS6 Installation Wizard

CentOS7 Installation Wizard

The following is an example of kickstart on CentOS 6.

# The file consists of three parts. #1. The option command segment is used to automatically respond to all manual operations except the package selection during graphical interface installation. #2. The package selection segment, use % packages to guide this function #3. Script segment, which is optional. There are two types: # (1) % pre-install script segment, which is executed before the system is installed, this section is rarely used, because there are too few available commands # (2) install the script segment after % post, the script executed after the system installation is complete # description of the kickstart option command segment: [required options]: 1. auth or authconfig: The verification option -- useshadow or -- enableshadow enables the shadow file to verify -- passalgo = sha512 using the sha512 algorithm 2. bootloader: Specifies how to install the boot program. You must have selected a partition, a boot program, and a software package, if this option is not selected, it will stop without asking -- location = mbr to specify the location of the boot program. The default value is mbr. You can also specify n One or the partition where the boot block containing the bootloader is located -- driveorder = sda specifies the partition in which the grub is installed and the query sequence, -- driverorder = sda sdc sdb -- append = "crashkernel = auto rhgb quiet" specify Kernel Parameter 3. keyboard: Specifies the keyboard type. Generally, the American keyboard "keyboard us" is used. The kickstart format of the new version is changed, but the old format such as "keyboard us" is also supported. lang: Specifies the language, such as "lang en_US.UTF-8" 5. rootpw: Set the root user password -- iscrypted: Use the encrypted password, can use MD5, SHA-256, sha-512 and so on. For example, rootpw -- iscrypted $6 $ kxEBpy0HqHiY2Tsx $ f1_bjhs6x0vruchfykxvekllxpuy0lxk7rxavdu3uivgclmuez. i4ARlsMpqe1bf379uEgWOSFqGtZxqrwg. the SHA-512-bit encryption password can be generated on CentOS 6 using "grub-crypt -- sha-512", CentOS7 can be generated using tools such as python, as follows: python-c 'import crypt, getpass; pw = getpass. getpass (); print (crypt. crypt (pw) if (pw = getpass. getpass ("Confirm:") else exit () '[Optional options]: 1. selinux: Set selinux with the value of enforcing, permissice, and disable. 2. autostep: interactive, similar to interactive 3. interactive: The parameter specified by the kickstart file is used for interactive installation, but the option for each step is still provided. If you directly use the kickstart parameter 4. installation line: Installation in fully non-interactive command line mode 5. driverdisk: Specifies the location of the driver drvierdisk -- source = 6. firewall: Set firewall -- disable to disable firewall 7. firstboot: -- disable: After the installation is started for the first time, many interfaces need to be manually configured are provided by default. graphical: Install Based on kickstart in graphic mode. The default value is 9. text: Execute the installation Based on kickstart in text mode. (Since kickstart is used, we recommend that you use plain text instead of graphic mode.) 9.1 skipx: do not install the graphic tool 10. halt/reboot: shutdown or reboot after installation is complete. The default value is halt11.ignoredisk: Specify the disk to be ignored 12. install/upgrade: whether to install or upgrade the system. You must also specify one of the following installation methods: cdrom: to install harddrive from the first drive: to install harddrive from the local disk, the hard disk must be in the format of vfat or ext2 File System-biospart: Specify the bios-type partition for installation, for example, 82 File System-type partition-partition: Install from a partition-dir: specify to install from a directory containing the install-tree (installation tree), for example, harddrive -- partition = hdb2 -- dir =/tmp/install-tree nfs: Specify to install from the nfs path -- server: specify the nfs server host name or IP -- dir: Specify the directory containing the install-tree -- opts: Specify the mount option for mounting NFS
For example: nfs -- server = 172.16.10.10 -- dir =/export_path url: Specifies the mount from ftp, http, https for example: url -- url ftp://172.16.10.1013.loggin: Specifies the location of error logs during installation -- host: specify the log to be sent to the host -- port: If the remote host's rsyslog uses a non-default port, you should specify this port option -- levle: Specify the Log Level 13. network: configure network information for the system and activate the network device during installation. You can use the network command multiple times. For example, you can set both the network and the host name -- bootproto: dhcp or static. For static, you must specify the IP address, subnet mask, gateway, and DNS -- device: Nic name, you can use a name similar to eth0 to specify -- hostname: host name -- onboot: whether to enable the specified device when guiding the system, for example: network -- bootproto = static -- ip = 192.168.100.2 -- netmask = 255.255.255.0 -- gateway = 192.168.100.254 -- nameserver = 8.8.8.8 network -- bootproto = dhcp -- device = eth0 -- noipv6 network -- hostname = node1.xuexi. com15.autopart: automatically creates several partitions: Root partitions greater than 1g, M boot partitions, and Swap partition 16. zerombr: Clear disk mbr 17. clearpart: clear partitions before installing the system. If this option is specified, correct -- all: Clear all partitions -- Linux: Clear Linux partitions -- none: Do not clear partitions -- initlabel: create a tag. For new Hard Disks without MBR or GPT, this option is required -- drivers = sdb: Clear the specified partition. Therefore, clearpart -- all -- initlabel is a common method 18. part: Create a partition -- asprimary: forcibly specified as the primary partition -- grow: use all available space to allocate all available space for it. At least 3 GB space is required for the root partition (even -- grow, you still need to specify -- size) -- ondisk: Specifies the disk on which the partition is created. If there are multiple disks, You need to specify which partition to create on which disk. This option can be omitted when there is only one hard disk, for example: # part/boot -- fstype = ext4 -- asprimary -- size = 200 # boot partition 200-250M enough # part swap -- fstype = swap -- asprimary -- size = 2048 # part/-- fstype = ext4 -- grow -- asprimary -- size = 2000LVM partition method: part/boot -- fstype ext4 -- size = 100 part swap -- fstype = swap -- size = 2048 part pv26 -- size = 100 -- growvolgroup VG00 -- pesize = 32768 pv26logvol/-- fstype ext4 -- name = LVroot -- vgname = VG00 -- Size = 29984 logvol/data -- fstype ext4 -- name = LVdata -- vgname = VG00 -- size = 100 -- grow 19. repo: specify other yum sources except the built-in yum source. You can specify multiple yum sources. (This is basically not included in the first system installation.) For example: repo -- name = "CentOS" -- baseurl = cdrom: sr0 -- cost = 10020. services: Set the default running level to enable the self-starting service -- disable -- enable disable to handle enable post-processing first, such as services -- disable auditd, cups, atd21.timezone: the specified time zone such as Asia/Shanghai22.user: generate a new user in the system -- name: Specify the user name -- groups: Specify the secondary group, non-default group -- homedir: user's home Directory. If not specified, the default value is/home/<username> -- password: password of the user. If not specified or omitted, the user is locked after creation -- shell: user's shell. If this parameter is not specified, the default value is -- uid: User UID. If this parameter is not specified, a non-system user's UID23.key is automatically allocated. The input serial number is only available in redhat, centOS system does not have this option -- skip skips the key option # kickstart package or package group options: Use "% packages" to indicate the content of the segment, @ to indicate the Selected Package group, and the front uses a horizontal bar to indicate the reverse, that is, no package or group is selected. @ Base and @ core are always selected by default, therefore, you do not need to specify them in % packages @ base @ core @ debugging @ development @ dial-up @ hardware-monitoring @ performance @ server-policy @ workstation-policysgpiodevice-mapper-persistent. -datasystemtap-client
Lrzsz
Tree % end

The following is an example of the ks file in CentOS 6.6.

Installtextnfs -- server = 192.168.100.100 -- dir =/install # url -- url = http: // 192.168.100.100/centos6.6bootloader -- location = mbr -- driveorder = sda -- append = "crashkernel = auto quiet" lang en_US.UTF-8keyboard usnetwork -- onboot = yes -- device = eth0 -- bootproto = dhcp -- no%6pw root -- iscrypted $6 $ x4u9sIfSQsO7ddk5 $ /. restart -- service = sshauthconfig -- enableshadow -- passalgo = sha512selinux -- disabledtimezone Asia/Shanghaireboot # restart after installation # make available -- all -- initlabelpart/boot -- fstype = ext4 -- asprimary -- size = 250 part/-- fstype = ext4 -- asprimary -- grow -- size = 2000 part swap -- fstype = swap -- size = 2000% packages @ base @ core @ debugging @ development @ dial-up @ hardware- monitoring @ performance @ server-policy @ workstation-policysgpiodevice-mapper-persistent-datasystemtap-client % end % post # what to do after the end cat>/etc/yum. repos. d/base. repo <eof [base] name = sohubaseurl = response-I "s/ONBOOT. * $/ONBOOT = yes/"/etc/sysconfig/network-scripts/ifcfg-eth0 # Set the NIC to start sed-I" s/rhgb // "/boot/grub. conf # Set sed-I "s/HOSTNAME =. * $/HOSTNAME = xuexi.longshuai.com/"/etc/sysconfig/network # Set host name % end

Back to series article outline: http://www.cnblogs.com/f-ck-need-u/p/7048359.html

Reprinted please indicate the source: Success!

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.