81 lines
1.9 KiB
Bash
81 lines
1.9 KiB
Bash
# vim: set ft=sh :
|
|
|
|
text
|
|
install
|
|
url --url=http://mirror.centos.org/centos/7/os/x86_64
|
|
repo --name=updates --baseurl=http://mirror.centos.org/centos/7/updates/x86_64
|
|
repo --name=extras --baseurl=http://mirror.centos.org/centos/7/extras/x86_64
|
|
lang en_US.UTF-8
|
|
keyboard us
|
|
timezone --utc UTC
|
|
rootpw --plaintext aaa
|
|
shutdown
|
|
|
|
bootloader --location mbr
|
|
clearpart --all --initlabel
|
|
reqpart
|
|
part /boot --fstype xfs --size=200
|
|
part pv.01 --size=1 --grow
|
|
volgroup centos pv.01
|
|
logvol / --fstype xfs --name=root --vgname=centos --size=3072
|
|
logvol /home --fstype xfs --name=home --vgname=centos --size=100
|
|
logvol /var --fstype xfs --name=var --vgname=centos --size=1024 --grow
|
|
logvol /var/log --fstype xfs --name=var_log --vgname=centos --size=1024
|
|
|
|
%packages --nocore
|
|
@core --nodefaults
|
|
-biosdevname
|
|
-btrfs-progs
|
|
-firewalld
|
|
-initscripts
|
|
-iprutils
|
|
-irqbalance
|
|
-kexec-tools
|
|
-man-db
|
|
-parted
|
|
-plymouth
|
|
-teamd
|
|
-tuned
|
|
avahi
|
|
qemu-guest-agent
|
|
systemd-networkd
|
|
systemd-resolved
|
|
%end
|
|
|
|
services --enabled systemd-networkd,systemd-resolved
|
|
|
|
%addon com_redhat_kdump --disable
|
|
%end
|
|
|
|
%post
|
|
install -d /root/.ssh
|
|
cat > /root/.ssh/authorized_keys <<EOF
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJsL5fSylmiJmBtW0DH/viAAmtU2E/2M17GPvysiyRs+ dustin@rosalina
|
|
EOF
|
|
|
|
sed -i 's/use-ipv6=.*/use-ipv6=yes/' /etc/avahi/avahi-daemon.conf
|
|
|
|
hostname -f > /etc/hostname
|
|
|
|
rm -rf /etc/sysconfig/network-scripts /etc/sysconfig/network
|
|
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
|
mkdir -p /etc/systemd/network
|
|
cat > /etc/systemd/network/99-default.network <<EOF
|
|
[Match]
|
|
Name=*
|
|
|
|
[Network]
|
|
DHCP=true
|
|
EOF
|
|
|
|
# Mount tmpfs at /tmp
|
|
systemctl enable tmp.mount
|
|
|
|
# Generate SSH host keys before first boot, since / will be read-only then
|
|
/usr/sbin/sshd-keygen
|
|
|
|
# Enable read-only rootfs. This cannot be done with part/logvol, as that would
|
|
# make Anaconda mount it read-only befor the installation starts.
|
|
sed -i -r '/\S+\s+\/\s+/s/defaults/ro/' /etc/fstab
|
|
%end
|