pc_engines_apu_centos_7
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
pc_engines_apu_centos_7 [2014/12/27 13:12] – [Preparation] admin | pc_engines_apu_centos_7 [2014/12/27 13:34] – [Preparation] admin | ||
---|---|---|---|
Line 27: | Line 27: | ||
kernel http:// | kernel http:// | ||
append initrd=http:// | append initrd=http:// | ||
+ | ===Kickstart=== | ||
+ | * Edit kickstart file apu-centos7.ks:< | ||
+ | #### PC Engines APU KickStart installation | ||
+ | #### | ||
+ | install | ||
+ | skipx | ||
+ | text | ||
+ | |||
+ | # Base repo | ||
+ | url --url=http:// | ||
+ | # Configure updates repo | ||
+ | repo --name=" | ||
+ | |||
+ | network --onboot yes --bootproto dhcp | ||
+ | lang en_US.UTF-8 | ||
+ | keyboard --vckeymap=us --xlayouts=' | ||
+ | rootpw --iscrypted <your sha512 passphrase | ||
+ | firewall --service=ssh | ||
+ | authconfig --enableshadow --passalgo=sha512 | ||
+ | selinux --enforcing | ||
+ | timezone --utc Europe/ | ||
+ | |||
+ | # Set serial console and change disk elevator to noop for SSD. | ||
+ | bootloader --location=mbr --driveorder=sda --append=" | ||
+ | |||
+ | # Any disks whose formatting is unrecognized are initialized. | ||
+ | zerombr | ||
+ | |||
+ | # Erases all partitions from the system. | ||
+ | clearpart --all --drives=sda --initlabel | ||
+ | |||
+ | # Initialize boot partition. | ||
+ | part /boot --fstype=ext4 --fsoptions=" | ||
+ | |||
+ | # Create LVM pv and vg. | ||
+ | part pv.01 --size=1000 --grow --asprimary | ||
+ | volgroup vg pv.01 | ||
+ | |||
+ | # Create lv's, set discard, noatime and commit time. Leave some space left in the VG for later use. | ||
+ | logvol swap --vgname=vg --size=512 | ||
+ | logvol / | ||
+ | logvol /var --vgname=vg --size=4096 --name=lv_var | ||
+ | logvol /home --vgname=vg --size=512 | ||
+ | |||
+ | # Create non administrative user | ||
+ | user --name=benst --homedir=/ | ||
+ | |||
+ | # Reboot after installation. | ||
+ | reboot | ||
+ | |||
+ | # Install minimal, exclude @Base, exclude documentation | ||
+ | %packages --nobase --excludedocs | ||
+ | @Core # | ||
+ | bind-utils | ||
+ | openssh-clients #ssh client, key agent, sftp, scp | ||
+ | nc #nc (netcat) | ||
+ | %end | ||
+ | |||
+ | %post | ||
+ | # Disable SSH root login | ||
+ | /bin/sed -i.bak ' | ||
+ | |||
+ | # Mount /tmp as tmpfs. | ||
+ | echo "tmpfs /tmp tmpfs size=64m 0 0" >> /etc/fstab | ||
+ | |||
+ | #Add weekly fstrim job | ||
+ | cat << EOF > / | ||
+ | #!/bin/sh | ||
+ | #this script will run weekly, will overwrite log. | ||
+ | |||
+ | trimlog=/ | ||
+ | echo > \$trimlog | ||
+ | for mount in \`lsblk -ro " | ||
+ | printf " | ||
+ | done | ||
+ | EOF | ||
+ | chmod +x / | ||
+ | |||
+ | # Enable LVM to issue discards. | ||
+ | /bin/sed -i.bak ' | ||
+ | |||
+ | # Reduce swappiness. | ||
+ | echo " | ||
+ | echo " | ||
+ | |||
+ | # Set chassis name and icon | ||
+ | / | ||
+ | |||
+ | exit 0 | ||
+ | %end</ | ||
====Installation==== | ====Installation==== | ||
* Boot the APU and press F12, select " | * Boot the APU and press F12, select " |
pc_engines_apu_centos_7.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1