Skip to content

Instantly share code, notes, and snippets.

@andrewwippler
Created April 2, 2018 15:14
Show Gist options
  • Select an option

  • Save andrewwippler/b636cdb68249ab5ffb67b4d8693a780b to your computer and use it in GitHub Desktop.

Select an option

Save andrewwippler/b636cdb68249ab5ffb67b4d8693a780b to your computer and use it in GitHub Desktop.

Revisions

  1. andrewwippler created this gist Apr 2, 2018.
    49 changes: 49 additions & 0 deletions centos_kickstart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    # Install OS instead of upgrade
    install

    # Keyboard layouts
    keyboard 'us'

    # Root password
    rootpw --iscrypted $1$UzchDaR4$XXXXXXXXXX.XXXXXXX/

    # System language
    lang en_US

    # Reboot after installation
    reboot

    # System timezone
    timezone America/Chicago

    # Use text mode install
    text

    # Disk Partitioning
    zerombr
    bootloader --location=mbr
    clearpart --all --drives=mmcblk0 --initlabel
    partition /boot/efi --asprimary --fstype=vfat --label EFI --size=200
    partition /boot --asprimary --fstype=ext4 --label BOOT --size=500
    partition / --asprimary --fstype=ext4 --label ROOT --size=4096 --grow

    # Firewall configuration
    firewall --disabled

    # System authorization information
    auth --useshadow --passalgo=sha512

    # SELinux configuration
    selinux --permissive

    # Do not configure the X Window System
    skipx

    # Use network installation
    url --url="http://mirror.centos.org/centos/7/os/x86_64/"

    # Add my pub key
    %post --nochroot
    mkdir -p /mnt/sysimage/root/.ssh
    echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMfqwJgp6SftQWoA7gF86aYn3LMBLAKbbKhhu8QyegJqfjKGXjTjY5dZnmhpsqmHJhL2PTukN1wT7y0i9HSYJpL5ETofLBIpn7cLtmQFjrhgURqTEYxwr4zXpGpiPw+jNnz0AIACewTM6MPYrK+WBkXThYAb8fQsFqDht6UW+46XKR/Y4in+ix0heOPs0H0uo5shRPdDLXLnoUhRxyveiSXGX93FUg3uMo05fVzaUX6k4Pni5KHZjh/NwjRel7lfeFWFC9/SQldFsmtQ6tth1qv6nKfUciV3xUtUhP1BcSo4KaalQWVd7KVcpumEZznPNpTSqteF8l2y4XLA43b7uD [email protected]" > /mnt/sysimage/root/.ssh/authorized_keys
    %end