Last active
May 3, 2021 05:48
-
-
Save aussielunix/6942277 to your computer and use it in GitHub Desktop.
Ubuntu Precise amd64 kickstart with working LVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#System language | |
lang en_AU | |
#Language modules to install | |
langsupport en_AU | |
#System keyboard | |
keyboard us | |
#System mouse | |
mouse | |
#System timezone | |
timezone Australia/Sydney | |
#Root password | |
rootpw --disabled | |
#Initial user | |
#U: foo - P: foobar | |
user foo --fullname "foo bar" --iscrypted --password $6$fxYl2Jjz$sD5a1aqpQYEGd1WCnCKJRh9OL/PNSP4R1tP9DVUN/vVZoVbTxuqNAm.I5TLTTM6l722s9OQ/egeaCzKLqV3hy. | |
#Reboot after installation | |
reboot | |
#Use text mode install | |
text | |
#Install OS instead of upgrade | |
install | |
# Use Web installation | |
# give the apt-cacher-ng url here or a mirror address | |
url --url http://10.10.10.10:3142/ubuntu | |
#Clear the Master Boot Record | |
zerombr yes | |
#Disk partitioning information | |
bootloader --location=mbr | |
#Disk partitioning information | |
clearpart --all --initlabel | |
part pv.01 --size 1 --grow | |
volgroup ubuntu pv.01 | |
logvol swap --fstype swap --name=swap --vgname=ubuntu --size 1024 | |
logvol / --fstype ext4 --vgname=ubuntu --size=1 --grow --name=slash | |
# hack around Ubuntu kickstart bugs | |
preseed partman-lvm/confirm_nooverwrite boolean true | |
preseed partman-auto-lvm/no_boot boolean true | |
#System authorization information | |
authconfig --passalgo=sha512 --kickstart. | |
#Network information | |
network --bootproto=dhcp --device=eth0 | |
#Firewall configuration | |
firewall --disabled | |
#Do not configure the X Window System | |
skipx | |
%packages | |
ubuntu-minimal | |
openssh-server | |
acl | |
vlan | |
vim-nox | |
%pre | |
%post | |
exec < /dev/tty4 > /dev/tty4 | |
chvt 4 | |
echo | |
echo "##############################" | |
echo "# Running Post Configuration #" | |
echo "##############################" | |
# -- start of 'update fstab for the root partition for extended ACLs' -- | |
# | |
perl -pi -e 's/(ext4 errors=remount-ro 0 1)/ext4 acl,errors=remount-ro 0 1/' /etc/fstab | |
# | |
# -- end of 'update fstab for the root partition for extended ACLs' -- | |
# | |
# -- start of 'install paravirt kernel image' -- | |
apt-get install -f -y linux-virtual | |
dpkg -l | grep generic | grep linux | awk '{print $2}' | xargs apt-get remove -y | |
# | |
# -- end of 'install paravirt kernel image' -- | |
# | |
# -- start of mpt-status removal -- | |
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685618 | |
# | |
apt-get remove -yq --purge mpt-status | |
# | |
# -- end of mpt-status removal -- | |
# | |
chvt 1 | |
# | |
# -- end of kickstart -- |
@peter279k You are welcome.
You may find some more help / info inside this repo - especially in the files
directory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for your kickstart setting! It's very helpful for me to setup disk partition about LVM :).