4 # Post-installation reduction. (Answer "no" to GRUB question.)
5 dpkg-query -Wf '${Package} ${Priority}\n' | grep ' required' | sed 's/ required//' > list_white_unsorted
6 echo 'ifupdown' >> list_white_unsorted
7 echo 'isc-dhcp-client' >> list_white_unsorted
8 sort list_white_unsorted > list_white
9 dpkg-query -Wf '${Package}\n' > list_all_packages
10 sort list_all_packages > foo
11 mv foo list_all_packages
12 comm -3 list_all_packages list_white > list_black
13 apt-mark auto `cat list_black`
14 echo 'APT::AutoRemove::RecommendsImportant "false";' > /etc/apt/apt.conf.d/99mindeps
15 echo 'APT::AutoRemove::SuggestsImportant "false";' >> /etc/apt/apt.conf.d/99mindeps
16 apt-get -y --purge autoremove
17 rm list_all_packages list_white_unsorted list_white list_black
18 echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/99mindeps
19 echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf.d/99mindeps
21 # Package management config, system upgrade.
22 echo 'deb http://ftp.debian.org/debian/ jessie main contrib non-free' > /etc/apt/sources.list
23 echo 'deb http://security.debian.org/ jessie/updates main contrib non-free' >> /etc/apt/sources.list
24 echo 'deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free' >> /etc/apt/sources.list
27 apt-get -y dist-upgrade
29 # Don't clear boot messages on start up.
30 sed -i 's/^TTYVTDisallocate=yes$/TTYVTDisallocate=no/g' /etc/systemd/system/getty.target.wants/getty\@tty1.service
32 # Console config. (locales: 146, 1; console-setup: 27, 11, 1, 4)
33 apt-get -y install locales console-setup
34 dpkg-reconfigure locales
35 dpkg-reconfigure console-setup
36 echo 'export LC_ALL="en_US.UTF-8"' >> /etc/profile
37 apt-get -y install xserver-xorg xinit i3
40 #useradd -m -s /bin/bash plom