Warning: session_start(): open(/tmp/sess_9d92e8ceeba2c332a8dd53ce38da70f3, O_RDWR) failed: No space left on device (28) in /var/www/html/inc/init.php on line 265

Warning: session_start(): Failed to read session data: files (path: ) in /var/www/html/inc/init.php on line 265

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/auth.php on line 432

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/actions.php on line 38
fedora_20_on_apu_-_kickstart_file [Ben's notes]

Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


PC Engines APU - Fedora 20 KickStart

  • I Used a 16GB mSATA SSD, all data on disk will be cleared!
  • Add your own password hash below at PUTYOURHASHHERE. Generate it with:
    grub-crypt --sha-512

tftp config

serial 0 115200
default fedora
prompt 0
timeout 0

label fedora
  kernel http://repo.mgmt.yourdomain.com/fedora20/fedora-base/images/pxeboot/vmlinuz
  append initrd=http://repo.mgmt.yourdomain.com/fedora20/fedora-base/images/pxeboot/initrd.img ks.device=bootif ip=dhcp ks=http://pxe.mgmt.yourdomain.com/apu-fedora.ks console=ttyS0,115200

KickStart file

#### PC Engines APU KickStart installation

# Base repo
url --url=http://repo/fedora20/fedora-base/
# Configure updates repo
repo --name="Fedora-updates"  --baseurl=http://repo/fedora20/fedora-updates/

network --onboot yes --bootproto dhcp
lang en_US.UTF-8
keyboard --vckeymap=us --xlayouts='us','us'
rootpw --iscrypted PUTYOURHASHHERE
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Europe/Amsterdam

# Set serial console and change disk elevator to noop for SSD.
bootloader --location=mbr --driveorder=sda --append="console=tty0 console=ttyS0,115200 elevator=noop rd_NO_PLYMOUTH"

# Any disks whose formatting is unrecognized are initialized.

# Erases all partitions from the system.
clearpart --all --drives=sda --initlabel

# Initialize boot partition.
part /boot --fstype=ext4 --fsoptions="defaults,noatime,discard,commit=60" --size=512 --asprimary

# 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  --name=lv_swap --fstype=swap 
logvol /     --vgname=vg --size=4096 --name=lv_root --fstype=ext4 --fsoptions="defaults,noatime,discard,commit=60"
logvol /var  --vgname=vg --size=4096 --name=lv_var  --fstype=ext4 --fsoptions="defaults,noatime,discard,commit=60"
logvol /home --vgname=vg --size=512  --name=lv_home --fstype=ext4 --fsoptions="defaults,noatime,discard,commit=60"

# Create non administrative user
user --name=benst --homedir=/home/benst --password=PUTYOURHASHHERE --iscrypted

# Reboot after installation.

# Install minimal, exclude @Base, exclude documentation
%packages --nobase --excludedocs
@Core           #default
bind-utils      #dig, host, nslookup
openssh-clients #ssh client, key agent, sftp, scp
nc              #nc (netcat)

# Disable SSH root login
/bin/sed -i.bak 's/#PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config

# Mount /tmp as tmpfs.
echo "tmpfs /tmp tmpfs size=64m 0 0" >> /etc/fstab

# Enable LVM to issue discards.
/bin/sed -i.bak 's/issue_discards = 0/issue_discards = 1/g' /etc/lvm/lvm.conf

# Reduce swappiness.
echo "vm.swappiness=1" >> /etc/sysctl.d/swappiness.conf
echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.d/swappiness.conf

# Set chassis name and icon
/bin/hostnamectl set-chassis "server"

exit 0
fedora_20_on_apu_-_kickstart_file.txt · Last modified: 2021/10/09 15:14 by