zoukankan      html  css  js  c++  java
  • 获取ks模板文件

    yum install lorax
    cd /usr/share/doc/lorax-19.6.66
    ls
    rhel7-livemedia.ks  rhel7-minimal.ks  rhel-atomic-pxe-live.ks
    

    rhel7-minimal.ks

    # Minimal Disk Image
    #
    sshpw --username=root --plaintext randOmStrinGhERE
    # Firewall configuration
    firewall --enabled
    # Use network installation
    url --url=http://repo/rhel7.0/Server/os
    repo --name=optional --baseurl=http://repo/rhel7.0/Server/optional/os
    
    # Root password
    rootpw --plaintext removethispw
    # Network information
    network  --bootproto=dhcp --onboot=on --activate
    # System authorization information
    auth --useshadow --enablemd5
    # System keyboard
    keyboard --xlayouts=us --vckeymap=us
    # System language
    lang en_US.UTF-8
    # SELinux configuration
    selinux --enforcing
    # Installation logging level
    logging --level=info
    # Shutdown after installation
    shutdown
    # System timezone
    timezone  US/Eastern
    # System bootloader configuration
    bootloader --location=mbr
    # Clear the Master Boot Record
    zerombr
    # Partition clearing information
    clearpart --all
    # Disk partitioning information
    part / --fstype="ext4" --size=4000
    part swap --size=1000
    
    %post
    # Remove root password
    passwd -d root > /dev/null
    
    # Remove random-seed
    rm /var/lib/systemd/random-seed
    %end
    
    %packages
    @core
    kernel
    memtest86+
    grub2-efi
    grub2
    shim
    syslinux
    -dracut-config-rescue
    %end
    

    rhel-atomic-pxe-live.ks

    # Settings for unattended installation:
    lang en_US.UTF-8
    keyboard us
    timezone America/New_York
    zerombr
    clearpart --all --initlabel
    rootpw --plaintext atomic
    network --bootproto=dhcp --device=link --activate
    
    # We are only able to install atomic with separate /boot partition currently
    part / --fstype="ext4" --size=6000
    part /boot --size=500 --fstype="ext4"
    
    shutdown
    
    # Using ostree repo included in installation iso. Respective ostreesetup command is included here.
    # The included kickstart file with the command is created during installation iso compose.
    %include /usr/share/anaconda/interactive-defaults.ks
    
    services --disabled=cloud-init,cloud-init-local,cloud-final,cloud-config,docker-storage-setup
    
    # We copy content of separate /boot partition to root part when building live squashfs image,
    # and we don't want systemd to try to mount it when pxe booting
    %post
    cat /dev/null > /etc/fstab
    %end
    
  • 相关阅读:
    centos7安装mysql5.7
    centos7 多网卡绑定bond0 之mod4
    二、Windows Server 2016 AD 组织单位、组、用户的创建
    一、Windows Server 2016 AD服务器搭建
    (2)Linux中经常说的CPU上下文切换是什么意思
    (1)Linux系统中到底应该怎么理解系统的平均负载
    centos安装Docker与使用&&构建业务镜像挂载卷harbor仓库的高可用及网络模式和资源限制介绍
    windows和linux各类服务常用端口号汇总
    CentOS7.6搭建LAMP-wordpress论坛搭建
    centos下iptables防火墙规则用法和概述
  • 原文地址:https://www.cnblogs.com/liujitao79/p/5461181.html
Copyright © 2011-2022 走看看