zoukankan      html  css  js  c++  java
  • centos6 pxe minimal install

    # 01-78-2b-cb-69-10-f3
    default menu.c32
    prompt 0
    timeout 100 
     
    LABEL centos-6
        MENU DEFAULT
        MENU LABEL 78:2b:cb:69:10:f3
        KERNEL centos-6/vmlinuz
        APPEND initrd=centos-6/initrd.img ks=http://install.localhost/kickstart/78:2b:cb:69:10:f3 ksdevice=link ramdisk_size=102400 console=ttyS1,115200
    
    # 78:2b:cb:69:10:f3
    text
    keyboard us
    timezone Asia/Shanghai
    lang en_US.UTF-8
    skipx
    auth --enableshadow --passalgo=sha512
    #python -c 'import crypt; print(crypt.crypt("12345678", "$6$MySalt"))'
    rootpw --iscrypted $6$MySalt$iFl/N4aMnlglYuZpKVOE0NP.girdj2ayXNT9RhjdoZ05EkF.Ib7ip.jDN7mleWEpY8Iil5bplNdvtlgzCWUcG1
    
    #zerombr
    bootloader --location=mbr --driveorder=sda
    ignoredisk --only-use=sda
    clearpart --drives=sda --all
    
    part swap --fstype='swap' --ondisk=sda --size=8000
    part / --fstype='ext4' --ondisk=sda --size=50000
    part /opt --fstype='ext4' --ondisk=sda --size=1 --grow
    
    network --bootproto=dhcp --device=78:2b:cb:69:10:f3 --activate
    
    install
    url --url='http://install.localhost/centos-6'
    logging level=info
    
    firewall --disabled
    selinux --disabled
    services --disabled=NetworkManager,ip6tables,iptables,postfix,cpuspeed
    services --enabled=network
    firstboot --disabled
    reboot
    
    %packages
    @core
    %end
    
    %pre
    /usr/sbin/parted -s /dev/sda mklabel gpt
    %end
    
    %post
    cat > /etc/sysconfig/network-scripts/ifcfg-em1 << _EOF_
    DEVICE=em1
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=192.168.48.122
    NETMASK=255.255.255.0
    _EOF_
    
    cat > /etc/sysconfig/network << _EOF_
    NETWORKING=yes
    HOSTNAME=bjyh-48-122
    GATEWAY=192.168.48.1
    _EOF_
    %end
    

    使用CentOS-6.7-x86_64-minimal.iso用做安装盘,源盘没有@base,会提示缺少Base包,中断安装。所有只有使用CentOS-6.7-x86_64-bin-DVD1.iso.
    @Base,共385个安装包
    @Core,共205个安装包。

  • 相关阅读:
    BZOJ3413: 匹配
    BZOJ5084: hashit
    BZOJ2281: [Sdoi2011]黑白棋
    BZOJ4808: 马
    BZOJ3208: 花神的秒题计划Ⅰ
    BZOJ3714: [PA2014]Kuglarz
    BZOJ2102: [Usaco2010 Dec]The Trough Game
    JZOJ6676. 【2020.06.01省选模拟】查拉图斯特拉如是说 (第二类斯特林数+多项式多点求值)
    LOJ #3217. 「PA 2019」Desant(状压dp)
    JZOJ 5154.【NOI2017模拟6.20】树形图求和 (矩阵树定理)
  • 原文地址:https://www.cnblogs.com/liujitao79/p/5158106.html
Copyright © 2011-2022 走看看