install text reboot url --url=http://mirror.centos.org/centos/7/os/x86_64/ lang en_US.UTF-8 keyboard sv-latin1 #network --onboot no --device eth0 --bootproto dhcp --noipv6 #network --onboot yes --device eth1 --bootproto dhcp --ipv6 auto # this is a hash of a a good, randomly generated password rootpw --iscrypted $6$2e5Z8pmr$Gkx5MsILkAix5Oo5FaIxwKOgg06Tz0KVo6sY7vhLJD4m0EBFIGi.hvswhN1c2S4D/PEjP470giIgegC8V9A46. firewall --service=ssh authconfig --enableshadow --passalgo=sha512 selinux --enforcing timezone --utc Europe/Stockholm bootloader --location=mbr clearpart --all bootloader --location=mbr --driveorder=disk/by-id/scsi-36b083fe0d8d78c00204b27e62201956f --append="crashkernel=auto" zerombr eula --agreed clearpart --all --initlabel part biosboot --fstype=biosboot --size=1 --ondisk=disk/by-id/scsi-36b083fe0d8d78c00204b27e62201956f part /boot --fstype ext4 --size=512 --ondisk=disk/by-id/scsi-36b083fe0d8d78c00204b27e62201956f part pv.01 --size=1 --grow --ondisk=disk/by-id/scsi-36b083fe0d8d78c00204b27e62201956f volgroup vg01 --pesize=4096 pv.01 logvol swap --name=swap --vgname=vg01 --size=4096 logvol / --fstype=ext4 --name=root --vgname=vg01 --size=16384 logvol /var --fstype=ext4 --name=var --vgname=vg01 --size=8192 --maxsize=16384 --grow logvol /var/log --fstype=ext4 --name=var_log --vgname=vg01 --size=8192 --maxsize=16384 --grow repo --name="CentOS" --baseurl=http://mirror.centos.org/centos/7/os/x86_64/ --cost=100 %packages @^minimal @core kexec-tools %end %post mkdir /root/.ssh cat >/root/.ssh/authorized_keys <<'EOF' ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+xW/ETuffrqdgMaGs9K/6QggtW8Vh80O4Zwfno4m638uMFbiICDwSkfRAtg5O4jEtNj4Ey93U8h3wLmHnEq/EjQy5L/QpCFlSA/SMen5f30mrSJ/W6ehT7nB6WAgfCNjCoz+S8a0ZZ6rWLXtqO9drlBFT+g5lnyXKThNBBd+EKZRvMsGmaE8IC3YnFF13e2bjxuxmFZCZixCwTreaWCc4qLWJja47CRojqn3iYeajHHkUzFETuPymh8yry1+SCghWvJPvUugnIK21JY3uRPmnkExqblnqhnQLfspFTJ72J+FMpd7Na5gUqMhP57SBNY6AuY2FtNM7li82ZOc7R5uH nsg@narsil ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6lTN8k1FKUYOvkKoO5s/lfL0y+XfoUdsJ4xb5YD8unL7ibgEA+80+ByPt0wNRAjIKwQsi/l/6T/VvNidCl9ANOgT+kAV6VEwPtlHftiOfkc8c0tAYeB31tEIY4plI8vuqcqG1Db7slO8/C7KHP3+ktFBRen4Zqd13llLS+UC5K6/4hc3cDh5ENoeDYnII8hWwqeNPFkUNtMwTONhVuSiIlPVLhiPTUqoXzYc8q/sM/cq+iO59y1JYovWgfYkGeq5zI1FgkuAMduUdckqPtgot2Ku1cd9dPSGRre3G3/+um3LBFmQVMRBZF+zjC3VkdJoGqGPDUXsqFBGCXhFcR+sR nsg@ringil ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJHkPFPD37b61k/4UeYPhJh6CnaH81I1RUYDhj3Xx6FkaF4Pf9Q/rSeKvlD6EJCpSzwBOyVo2LgnqiqPuwsdBTupam9bQmpYPeamsWBP46tWqFjXKMjdZwAUcJy2liuLG0fCpQhF/fA/hCSBDVLbVqSEZFXs0zDm+PK8WaHR0BjHBXLoElYBeiCDD77pVtubKQ6F0vrK4/Eno3wsQh7ok00Ulwb6CdPUCIv5obERL6XKcjhDfuYc8UWqSCoJ/3v+YcvJBJNnhs1dyee8gFk6cDqoT7iaaxBSy+DHqFoUzjY7lYMCY4/xgLRsdHBvg5dX4xh5hZPnnDsjTFK0bAZTUX nsg@ringil EOF chmod 600 /root/.ssh chmod 700 /root/.ssh/authorized_keys restorecon -rv /root/.ssh /sbin/service sshd start for pubkey in /etc/ssh/ssh_host_*key.pub ; do ssh-keygen -l -f $pubkey; done | sed -e 's,/etc/ssh/ssh_host_,...,;' >>/etc/issue echo "" >>/etc/issue curl -X POST http://www.stacken.kth.se/~nsg/keystore/put/ -d "key=ks&value=`hostname`" yum -y upgrade sync sleep 1 sync sleep 1 sync %end