Ben Stienstra

Linux, Unix, network, radio and more...

User Tools

Site Tools


pc_engines_apu_centos_7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
pc_engines_apu_centos_7 [2014/12/27 15:09]
admin [Preparation]
pc_engines_apu_centos_7 [2014/12/27 16:11]
admin [Preparation]
Line 32: Line 32:
 #### ####
 install install
-skipx 
-text 
  
 # Base repo # Base repo
 url --url=http://repo/centos/7/CentOS7-base url --url=http://repo/centos/7/CentOS7-base
 # Configure updates repo # Configure updates repo
-repo --name="Fedora-updates"  --baseurl=http://repo/centos/7/CentOS7-updates+repo --name="CentOS7-updates"  --baseurl=http://repo/centos/7/CentOS7-updates
  
 network --onboot yes --bootproto dhcp network --onboot yes --bootproto dhcp
 lang en_US.UTF-8 lang en_US.UTF-8
 keyboard --vckeymap=us --xlayouts='us','us' keyboard --vckeymap=us --xlayouts='us','us'
-rootpw --iscrypted <your sha512 passphrase +rootpw --iscrypted $6$KRCnMJTGbqdUU2V1$0VYBN9ymX7fhNwl8xkMKKGSP3KYEZp2qT/MLpzu2SMOm91uxfM4lnbMipoBBlKbobFyy3U2Vvy9B2fp/nwQC6.
 firewall --service=ssh firewall --service=ssh
 authconfig --enableshadow --passalgo=sha512 authconfig --enableshadow --passalgo=sha512
Line 59: Line 57:
  
 # Initialize boot partition. # Initialize boot partition.
-part /boot --fstype=ext4 --fsoptions="defaults,noatime,discard,commit=60" --size=512 --asprimary+part /boot --fstype=xfs --size=512 --asprimary
  
 # Create LVM pv and vg. # Create LVM pv and vg.
Line 66: Line 64:
  
 # Create lv's, set discard, noatime and commit time. Leave some space left in the VG for later use. # 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 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 /     --vgname=vg --size=4096 --name=lv_root --fstype=xfs 
-logvol /var  --vgname=vg --size=4096 --name=lv_var  --fstype=ext4 --fsoptions="defaults,noatime,discard,commit=60" +logvol /var  --vgname=vg --size=4096 --name=lv_var  --fstype=xfs 
-logvol /home --vgname=vg --size=512  --name=lv_home --fstype=ext4 --fsoptions="defaults,noatime,discard,commit=60"+logvol /home --vgname=vg --size=512  --name=lv_home --fstype=xfs
  
 # Create non administrative user # Create non administrative user
-user --name=username --homedir=/home/username --password=<your sha512 passphrase here> --iscrypted+user --name=benst --homedir=/home/benst --password=$6$KRCnMJTGbqdUU2V1$0VYBN9ymX7fhNwl8xkMKKGSP3KYEZp2qT/MLpzu2SMOm91uxfM4lnbMipoBBlKbobFyy3U2Vvy9B2fp/nwQC6. --iscrypted
  
 # Reboot after installation. # Reboot after installation.
Line 90: Line 88:
  
 # Mount /tmp as tmpfs. # Mount /tmp as tmpfs.
-echo "tmpfs /tmp tmpfs size=64m 0 0" >> /etc/fstab+systemctl enable tmp.mount
  
 #Add weekly fstrim job #Add weekly fstrim job
Line 99: Line 97:
 trimlog=/var/log/fstrim.log trimlog=/var/log/fstrim.log
 echo > \$trimlog echo > \$trimlog
-for mount in \`lsblk -ro "rota,rm,fstype,mountpoint" egrep "0 0 ext[2|3|4]cut -d " " -f4\`; do +for fs in \$(lsblk -o MOUNTPOINT,DISC-MAX,FSTYPE grep -E '^/.* [1-9]+.* ' awk '{print \$1}'); do 
-  printf "\`date\` - \`fstrim -v \$mount\`\n" >>\$trimlog+  printf "\`date\` - \`fstrim -v \$fs\`\n" >>\$trimlog
 done done
 EOF EOF
pc_engines_apu_centos_7.txt · Last modified: 2014/12/27 16:12 by admin