linux_wiki:os_install_kickstart

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
linux_wiki:os_install_kickstart [2016/11/28 22:45]
billdozor [CentOS 6 Example Kickstart File]
linux_wiki:os_install_kickstart [2016/11/29 22:13]
billdozor
Line 197: Line 197:
 reboot --eject reboot --eject
  
 +#### Auto execute post install commands ####
 %post --interpreter /bin/sh --log=/root/ks-post.log %post --interpreter /bin/sh --log=/root/ks-post.log
 ( (
 +## Enter post install commands here to execute prior to reboot
 +# Useful for performing something like the below example:
  
-## Startup rpcbind for NFS +# Startup rpcbind for NFS 
-systemctl start rpcbind+#systemctl start rpcbind
  
-## Mount admin share +# Mount admin share 
-mount -vt nfs 10.1.2.3:/admin /mnt+#mount -vt nfs 10.1.2.3:/admin /mnt
  
-## Create /root/scripts dir +# Create /root/scripts dir 
-mkdir /root/scripts+#mkdir /root/scripts
  
-## Copy the firstboot script to the new dir, set owner/permissions +# Copy the firstboot script to the new dir, set owner/permissions 
-cp -v /mnt/deploy/firstboot/firstboot.sh /root/scripts/ +#cp -v /mnt/deploy/firstboot/firstboot.sh /root/scripts/ 
-chown -Rv root:root /root/scripts +#chown -Rv root:root /root/scripts 
-chmod -Rv 700 /root/scripts+#chmod -Rv 700 /root/scripts
  
-## Copy firstboot service unit to system, set owner/permissions +# Copy firstboot service unit to system, set owner/permissions 
-cp -v /mnt/deploy/firstboot/firstboot.service /etc/systemd/system/ +#cp -v /mnt/deploy/firstboot/firstboot.service /etc/systemd/system/ 
-chown -v root:root /etc/systemd/system/firstboot.service +#chown -v root:root /etc/systemd/system/firstboot.service 
-chmod -v 644 /etc/systemd/system/firstboot.service+#chmod -v 644 /etc/systemd/system/firstboot.service
  
-## Enable firstboot service for next boot +# Enable firstboot service for next boot 
-systemctl enable firstboot.service+#systemctl enable firstboot.service
  
-## Un-mount admin share +# Un-mount admin share 
-umount -v /mnt+#umount -v /mnt
 ) )
 %end %end
Line 230: Line 233:
 ---- ----
  
-===== CentOS 7 EFI Kickstart =====+====== CentOS 6/7 EFI Kickstart ======
  
 The only difference for EFI based systems in a kickstart file is the addition of a /boot/efi partition. The only difference for EFI based systems in a kickstart file is the addition of a /boot/efi partition.
  • linux_wiki/os_install_kickstart.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)