# Generated by Kickstart Configurator and edited by AIA21. #platform=x86 # System language lang en_GB # Language modules to install langsupport en_GB # System keyboard keyboard gb # System mouse mouse # System timezone timezone --utc Europe/London # Root password rootpw --iscrypted $1$FMlRUMoI$v2l3PwcYVxCzlzk/Dm1Gq1 # We do not want an initial user. If you do want to have an initial user, # specify instead (all on one line): # user aia21 --fullname "Anton Altaparmakov" --iscrypted # --password $1$KCEYUhEy$PZh/T1moeigKJTkthdWKR/ user --disabled # Reboot after installation reboot # Use text mode install text # Install OS instead of upgrade install # Use Web installation url --url http://www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu # Configure MD sotfware RAID and partitioning. preseed partman-basicfilesystems/choose_label string gpt preseed partman-auto/method string raid preseed partman-auto/disk string "/dev/sdb /dev/sdc" preseed partman-auto/expert_recipe string "multiraid :: 1 1 1 free method{ biosgrub } . 20480 20480 20480 raid method{ raid } . 4096 4096 4096 raid method{ raid } . 20480 20480 -1 raid method{ raid } ." preseed partman-auto-raid/recipe string "1 2 0 ext3 / /dev/sdb2#/dev/sdc2 . 1 2 0 swap - /dev/sdb3#/dev/sdc3 . 1 2 0 xfs /var /dev/sdb4#/dev/sdc4 ." preseed partman-md/device_remove_md boolean true preseed partman-md/confirm boolean true preseed partman/confirm_write_new_label boolean true preseed partman/choose_partition select finish preseed partman/confirm boolean true preseed mdadm/boot_degraded boolean true # Install GRUB on the MBR of both disks. preseed grub-installer/only_debian boolean true preseed grub-installer/with_other_os boolean true preseed grub-installer/bootdev string "(hd1,1) (hd2,1)" # System authorization infomation auth --useshadow --enablemd5 # Network information network --bootproto=static --ip=172.28.208.25 --netmask=255.255.255.0 --gateway=172.28.208.254 --nameserver=131.111.8.42 # Firewall configuration firewall --disabled # Do not configure the X Window System skipx # Set up the Unix Support repository. preseed apt-setup/local0/repository string "http://bes.csi.cam.ac.uk/ubuntu hardy-uxsup uxsup" preseed apt-setup/local0/comment string "Unix Support repository." # Also add the source code repository. preseed apt-setup/local0/source boolean true # Specify the repository public key. Cannot use https as installer does not # support it. preseed apt-setup/local0/key string http://bes.csi.cam.ac.uk/ubuntu/project/public.key # Must allow unknown (to Ubuntu) keys or our key is rejected. preseed debian-installer/allow_unauthenticated string true # Package install information. Build a default UCS server. # Note: tasks are prefixed with '@' symbol. To see a list of tasks, on an # installed system, run "tasksel --list-tasks". %packages --resolvedeps # Bes related packages. bes-config bes-update-check # Packages needed for backup by Oook. dump userv # SSH server packages. @ openssh-server # Time synchronization packages. ntp # Email related packages. postfix postfix-doc procmail mailutils # Provide the "service" command among others. sysvinit-utils # A decent editor. vim # Uncomment the below if you want the Ubuntu default set of root certificates # to be installed. #ca-certificates #%pre --interpreter=/bin/bash #echo "Running pre script (before anything else happens)." #exit 0 # Note we need to specify --interpreter=/bin/bash to force the script to run # using bash. Otherwise it runs using /bin/sh which for example does not have # the $RANDOM functionality we use. %post --interpreter=/bin/bash echo "Running post install script (inside chroot, before reboot)." echo "Disabling IPv6..." rm -f /etc/modprobe.d/disable-ipv6 cat < /etc/modprobe.conf # Disable IPv6. alias net-pf-10 off alias ipv6 off EOD echo "Configuring DNS..." rm -f /etc/resolv.conf cat < /etc/resolv.conf # Cambridge University DNS servers. nameserver 131.111.8.42 nameserver 131.111.12.20 # Search Computing Service relevant sub-domains by default. search csx.cam.ac.uk csi.cam.ac.uk cam.ac.uk csi.private.cam.ac.uk pwf.cam.ac.uk linux.pwf.cam.ac.uk EOD echo "Configuring NTP daemon..." rm -f /etc/ntp.conf.tmp cat < /etc/ntp.conf.tmp # Cambridge University Computing Service NTP Servers. server ntp0.csx.cam.ac.uk server ntp1.csx.cam.ac.uk server ntp2.csx.cam.ac.uk EOD grep -v '^server' /etc/ntp.conf >> /etc/ntp.conf.tmp mv -f /etc/ntp.conf.tmp /etc/ntp.conf # Remove the DHCP file if it exists as that overrides /etc/ntp.conf. rm -f /etc/ntp.conf.dhcp echo "Configuring vim..." rm -f /root/.vimrc cat < /root/.vimrc syn on EOD echo "Configuring postfix..." rm -f /etc/aliases /etc/postfix/sender_canonical /etc/postfix/main.cf.tmp cat < /etc/aliases # This is the aliases file - it says who gets mail for whom. # # >>>>>>>>>> The program "newaliases" will need to be run # >> NOTE >> after this file is updated for any changes # >>>>>>>>>> to show through to sendmail. # # It is probably best to not work as user root and redirect all # email to "root" to the address of a HUMAN who deals with this # system's problems. Then you don't have to check for important # email too often on the root account. # The "\root" will make sure that email is also delivered to the # root-account, but also forwared to the user "joe". #root: joe, \root root: aia21@cam.ac.uk # Basic system aliases that MUST be present. postmaster: root mailer-daemon: postmaster # amavis virusalert: root # General redirections for pseudo accounts in /etc/passwd. administrator: root daemon: root lp: root news: root uucp: root games: root man: root at: root postgres: root mdom: root amanda: root ftp: root wwwrun: root www-data: root squid: root msql: root gnats: root nobody: root bin: root sys: root sync: root proxy: root backup: root list: root irc: root libuuid: root dhcp: root syslog: root klog: root sshd: root statd: root postfix: root ntp: root messagebus: root # Further well-known aliases for dns/news/ftp/mail/fax/web/gnats. newsadm: news newsadmin: news usenet: news ftpadm: ftp ftpadmin: ftp ftp-adm: ftp ftp-admin: ftp hostmaster: root mail: postmaster postman: postmaster post_office: postmaster abuse: postmaster spam: postmaster faxadm: root faxmaster: root webmaster: root gnats-admin: root mailman: root mailman-owner: mailman EOD newaliases cat < /etc/postfix/sender_canonical root aia21@cam.ac.uk EOD postmap /etc/postfix/sender_canonical grep -v '^mydestination' /etc/postfix/main.cf | grep -v '^relayhost' | \ grep -v '^sender_canonical_maps' | \ grep -v '^masquerade_exceptions' | \ grep -v '^masquerade_classes' | \ grep -v '^masquerade_domains' > /etc/postfix/main.cf.tmp cat <> /etc/postfix/main.cf.tmp mydestination = $(cat /etc/mailname) relayhost = [ppsw.cam.ac.uk] sender_canonical_maps = hash:/etc/postfix/sender_canonical masquerade_exceptions = root masquerade_classes = envelope_sender, header_sender, header_recipient masquerade_domains = ucs.cam.ac.uk EOD mv -f /etc/postfix/main.cf.tmp /etc/postfix/main.cf exit 0