]> git.donarmstrong.com Git - neurodebian.git/blob - sphinx/vm-notes.txt
cc0e4ff4dd3e522a5b1ea35ed73b8dba2dbfd471
[neurodebian.git] / sphinx / vm-notes.txt
1 Standard Debian install
2
3 hostname: neurodebian
4 domain: ''
5
6 all file in one partition
7
8 root: not there
9 user: brain
10 pwd: neurodebian
11
12
13 Do a minimal install
14 --------------------
15
16 All files in one partition/
17 just base system, run selection, but no tasks (not even 'Standard system')
18
19
20 install new stuff
21 -----------------
22
23 Add sources.list for backports and neurodebian
24 wget -O /etc/apt/sources.list.d/neuro.debian.net.list http://neuro.debian.net/_static/neurodebian.lenny.us.sources.list
25 echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" >> /etc/apt/sources.list.d/backports.org.list
26 wget -O - http://backports.org/debian/archive.key | apt-key add -
27 wget -O - http://neuro.debian.net/_static/neuro.debian.net.asc | apt-key add -
28
29 install kernel 2.6.27 (or later) from backports to have support for OpenGL
30 direct rendering in VirtualBox
31 (and deinstall the old one, after a successfull reboot)
32
33 # a basic desktop
34 aptitude install \
35  alacarte desktop-base evince file-roller gcalctool gdm gksu gnome-core
36  gnome-keyring gnome-utils gnome-volume-manager gnome-mount gthumb
37  bash-completion less mc gnome-themes etckeeper git-core gitk ntpdate
38  alsa-utils
39
40 # install network manager applet
41 # but we don't want to have all the openvpn stuff that pull in an armada of
42 # things: I did it by hand in aptitude
43
44 # cleanup unwanted stuff
45 # video drivers (all but vesa)
46 aptitude purge $(apt-cache search --names-only --installed xserver-xorg-video | grep xserver-xorg-video | cut -d ' ' -f 1,1) xserver-xorg-video-vesa+
47 # random stuff
48 aptitude purge radeontool sound-juicer
49
50 # setup etckeeper
51 etckeeper init
52
53 # prepare for kernel module building (guest additions)
54 aptitude install module-assistant
55 module-assistant prepare
56 # note guest additions for 3.1.2 are broken, use 3.1.0
57 bash /media/cdrom/VBoxLinuxAdditions-x86.run (need 2.6.27+ kernel for direct rendering)
58 #make sure that xorg.conf has 'vboxvideo' as device driver and also
59 echo "vboxvideo" >> /etc/modules
60
61 # make user brain allowed to execute sudo without a password
62 adduser brain sudo
63 visudo
64 # and uncomment the respective line at the end of the file
65 # (make sure there is nothing below it)
66
67 # configure shared folders
68 mkdir /mnt/host
69 mount -t vboxsf host /mnt/host
70 # better put the following into the session startup config of the user
71 # stupid wrapping into bash line to workaround a silly bug in Virtualbox additions
72 bash -c "cd /; sudo mount -t vboxsf -o defaults,uid=brain,gid=brain host /mnt/host"
73
74
75 # neuro-stuff
76 aptitude install afni afni-atlases amide caret dicomnifti fsl fsl-atlases lipsia
77  minc-tools odin psychopy python-mvpa python-pyepl python-mvpa-doc
78
79 # general scientifically useful stuff
80 aptitude install ipython python-h5py vim-python
81
82 # next step purge network interface config to give the power to network manager
83 # important
84 adduser brain netdev
85
86
87 user config
88 -----------
89 # put use home dir in git to be able to track changes
90 git init
91
92 mkdir -p /home/brain/.config/backgrounds
93 cp /mnt/host/.config/awesome/hotbrain.png /home/brain/.config/backgrounds/
94
95 #change menu icon
96 sudo cp /mnt/host/hacking/neurodebian/artwork/icon.svg /usr/share/icons/Mist/scalable/places/start-here.svg
97
98
99 Deploy
100 ------
101
102 # shrink VDI image by writting to a new (unfragmented) image
103 # target VDI needs to have proper partition table and MBR
104 # simplest solution: clonezilla
105
106 # clean up the master COPY
107 cp ~/vm/nd_master.vdi /tmp/nd_master.vdi
108 cd /tmp
109 mkdir -p vbdev vbmnt
110 # get access to disks inside the VDIs
111 sudo vdfuse -f nd_master.vdi vbdev
112 # mount partitition
113 sudo mount -o loop vbdev/Partition1 vbmnt
114
115 # remove cruft
116 # package cache
117 sudo find vbmnt/var/cache/apt/archives/ -name '*.deb' -delete
118 sudo rm vbmnt/var/cache/apt/*.bin
119 # device files -- udev restores them
120 sudo rm -rf vbmnt/dev/*
121 # tmp
122 sudo rm -rf vbmnt/tmp/*
123 # log files
124 sudo find vbmnt/var/log -type f -delete
125 # apt lists
126 sudo find vbmnt/var/lib/apt -type f -name '*debian*' -o -type f -name '*list*' -delete
127 # history
128 sudo rm vbmnt/root/.bash_history
129 sudo rm vbmnt/home/brain/.bash_history
130
131 # unmount filesystem
132 sudo umount vbmnt
133 # zero out empty space
134 sudo zerofree -v vbdev/Partition1
135 # close whole VDI
136 sudo umount vbdev
137
138 # compact VDI
139 # THIS NEEDS TO BE DONE ON A VDI THAT IS REGISTERED WITH VIRTUALBOX
140 VBoxManage modifyhd nd_master.vdi --compact
141