Tuesday, September 19, 2017

ks.cfg for Ubuntu Auto Installer

#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T

#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
#System timezone
timezone America/Detroit
#Root password
rootpw --disabled
#Initial user
user dev --fullname "Developer" --password Welcome2Guest7Dev
#Reboot after installation
#Use text mode install
#Install OS instead of upgrade
#Use CDROM installation media
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#New Disk partitioning information
part /boot --fstype ext4 --size 1200 --asprimary
part pv.01 --size 1 --grow
volgroup mainvg pv.01
logvol swap --fstype=swap --name=swap --vgname=mainvg --recommended
logvol / --fstype=ext4 --name=lv_root --vgname=mainvg --size=1 --grow
logvol /var/log --fstype=ext4 --name=lv_varlog --vgname=mainvg --size=1000
# yes to all...
preseed partman-lvm/device_remove_lvm boolean true
preseed partman/confirm_write_new_label boolean true
preseed partman/confirm boolean true
# needed to answer the 'do you want to write changes to disk"
preseed partman-lvm/confirm_nooverwrite boolean true
# needed to answer the question about not having a separate /boot
preseed partman-auto-lvm/no_boot boolean true
#System authorization infomation
auth  --useshadow  --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
#Package install information
# Add your custom post installation script here
# Add post installation script to /usr/local/bin/ directory
# Fix locale
echo 'LANG="en_US.UTF-8"' > /etc/default/locale
echo 'LANGUAGE="en_US:en"' >> /etc/default/locale
echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale
#User Issue Screen
rm -f /etc/issue /etc/issue.net
cat <<EOT > /etc/notice.txt
                            NOTICE TO USERS

This computer system is the private property of its owner, whether
individual, corporate or government.  It is for authorized use only.
Users (authorized or unauthorized) have no explicit or implicit
expectation of privacy.

Any or all uses of this system and all files on this system may be
intercepted, monitored, recorded, copied, audited, inspected, and
disclosed to your employer, to authorized site, government, and law
enforcement personnel, as well as authorized officials of government
agencies, both domestic and foreign.

By using this system, the user consents to such interception, monitoring,
recording, copying, auditing, inspection, and disclosure at the
discretion of such personnel or officials.  Unauthorized or improper use
of this system may result in civil and criminal penalties and
administrative or disciplinary action, as appropriate. By continuing to
use this system you indicate your awareness of and consent to these terms
and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the
conditions stated in this warning.

cp /etc/notice.txt /etc/notice.bak
ln -s /etc/notice.txt /etc/issue
ln -s /etc/notice.txt /etc/issue.net
# Clean
apt-get -f -y install
apt-get -qq -y autoremove
apt-get -y clean

No comments:

Post a Comment