]> git.donarmstrong.com Git - neurodebian.git/blob - vm/d-i/tools/initial_setup
Merge remote branch 'vm/master'
[neurodebian.git] / vm / d-i / tools / initial_setup
1 #!/bin/bash
2
3 # play safe
4 set -e
5 set -u
6
7 # Standard Debian install
8
9 # prepare on hydra and use debproxy for speed
10
11 # have dedicated hard-drives for swap and home
12
13 # expert install
14
15 # hostname: neurodebian
16 # domain: ''
17
18 # all file in one partition
19
20 # root: not there
21 # user: brain
22 # pwd: neurodebian
23
24
25 # Do a minimal install
26 # --------------------
27
28 # All files in one partition/
29 # just base system, run selection, but no tasks (not even 'Standard system')
30
31 # set root password to 'neurodebian' too
32 #echo "Set root passwd:"
33 #passwd root
34
35 apt-get install --no-install-recommends -y etckeeper
36
37 # setup etckeeper
38 git config --global user.name NeuroDebian
39 git config --global user.email nd@localhost
40
41 # install new stuff
42 # -----------------
43
44 # Add sources.list for backports and neurodebian
45 wget -O /etc/apt/sources.list.d/neuro.debian.net.list http://neuro.debian.net/_static/neurodebian.squeeze.us-nh.sources.list
46
47 echo "deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free" > /etc/apt/sources.list.d/backports.debian.org.list
48 cat << EOT > /etc/apt/preferences.d/backports.debian.org.pref
49 Package: *
50 Pin: release a=squeeze-backports
51 Pin-Priority: 200
52 EOT
53
54 apt-get update -y
55 # Backports' Release files signed with both ftpmaster and old backports keys
56 # That causes APT to spit out a warning, but to not confuse users, lets simply
57 # obtain that key if possible
58 gpg --keyserver hkp://subkeys.pgp.net --recv-keys 16BA136C && \
59         gpg --export 16BA136C | apt-key add - || :
60
61 apt-get install -y --allow-unauthenticated neurodebian-keyring
62 apt-get update -y
63
64 # to cheat the VM check
65 touch /dev/vboxguest
66 # to get all the stuff in recommends
67 apt-get install -y dkms neurodebian-guest-additions
68
69 apt-get install --no-install-recommends -y \
70  gnome-core mc evince bash-completion ntpdate file-roller gnome-utils \
71  gnome-themes eog vim \
72  software-center gdebi gedit-plugins gnome-media synaptic menu less libxp6
73
74 # intermediate cleanup to prevent virtual harddrive from fragmenting too much
75 find /var/cache/apt/archives/ -name '*.deb' -delete
76
77 # cleanup unwanted stuff
78 # video drivers (all but vesa)
79 apt-get purge -y $(apt-cache search --names-only --installed xserver-xorg-video | grep xserver-xorg-video | cut -d ' ' -f 1,1) xserver-xorg-video-vesa+
80 apt-get purge -y brasero
81
82 # and whatever is obsolete
83 apt-get autoremove --purge -y
84
85 # custom config
86 # use NeuroDebian website as default homepage
87 sed -i -e 's,http://www.debian.org,http://neuro.debian.net,g' /etc/chromium-browser/master_preferences
88
89 # reduce grub timeout to speed up boot of VM
90 sed -i -e 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=1/g' /etc/default/grub
91 update-grub
92
93 # finally configure geomirror for APT and disable deb-src lists
94 sed -i -e "s/10.0.0.1:9999/$(dpkg --print-architecture)-geomirror.debian.net/" \
95     -e "s/^deb-src/#deb-src/" /etc/apt/sources.list
96
97 etckeeper commit "Initial VM setup done"