Standard Debian install hostname: neurodebian domain: '' all file in one partition root: not there user: brain pwd: neurodebian Do a minimal install -------------------- All files in one partition/ just base system, run selection, but no tasks (not even 'Standard system') install new stuff ----------------- Add sources.list for backports and neurodebian wget -O /etc/apt/sources.list.d/neuro.debian.net.list http://neuro.debian.net/_static/neurodebian.lenny.us.sources.list echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" >> /etc/apt/sources.list.d/backports.org.list wget -O - http://backports.org/debian/archive.key | apt-key add - wget -O - http://neuro.debian.net/_static/neuro.debian.net.asc | apt-key add - install kernel 2.6.27 (or later) from backports to have support for OpenGL direct rendering in VirtualBox (and deinstall the old one, after a successfull reboot) # a basic desktop aptitude install \ alacarte desktop-base evince file-roller gcalctool gdm gksu gnome-core gnome-keyring gnome-utils gnome-volume-manager gnome-mount gthumb bash-completion less mc gnome-themes etckeeper git-core gitk ntpdate alsa-utils # install network manager applet # but we don't want to have all the openvpn stuff that pull in an armada of # things: I did it by hand in aptitude # cleanup unwanted stuff # video drivers (all but vesa) aptitude purge $(apt-cache search --names-only --installed xserver-xorg-video | grep xserver-xorg-video | cut -d ' ' -f 1,1) xserver-xorg-video-vesa+ # random stuff aptitude purge radeontool sound-juicer # setup etckeeper etckeeper init # prepare for kernel module building (guest additions) aptitude install module-assistant module-assistant prepare # note guest additions for 3.1.2 are broken, use 3.1.0 bash /media/cdrom/VBoxLinuxAdditions-amd64.run (need 2.6.27+ kernel for direct rendering) #make sure that xorg.conf has 'vboxvideo' as device driver and also echo "vboxvideo" >> /etc/modules # make user brain allowed to execute sudo without a password adduser brain sudo visudo # and uncomment the respective line at the end of the file # (make sure there is nothing below it) # configure shared folders mkdir /mnt/host mount -t vboxsf host /mnt/host # better put the following into the session startup config of the user # stupid wrapping into bash line to workaround a silly bug in Virtualbox additions bash -c "cd /; sudo mount -t vboxsf -o defaults,uid=brain,gid=brain host /mnt/host" # neuro-stuff aptitude install afni afni-atlases amide caret dicomnifti fsl fsl-atlases lipsia minc-tools odin psychopy python-mvpa python-pyepl python-mvpa-doc # general scientifically useful stuff aptitude install ipython python-h5py vim-python # next step purge network interface config to give the power to network manager # important adduser brain netdev user config ----------- # put use home dir in git to be able to track changes git init mkdir -p /home/brain/.config/backgrounds cp /mnt/host/.config/awesome/hotbrain.png /home/brain/.config/backgrounds/ #change menu icon sudo cp /mnt/host/hacking/neurodebian/artwork/icon.svg /usr/share/icons/Mist/scalable/places/start-here.svg Deploy ------ # shrink VDI image by writting to a new (unfragmented) image # target VDI needs to have proper partition table and MBR # simplest solution: clonezilla # clean up the master COPY cp ~/vm/nd_master.vdi /tmp/nd_master.vdi cd /tmp mkdir -p vbdev vbmnt # get access to disks inside the VDIs sudo vdfuse -f nd_master.vdi vbdev # mount partitition sudo mount -o loop vbdev/Partition1 vbmnt # remove cruft # package cache sudo find vbmnt/var/cache/apt/archives/ -name '*.deb' -delete sudo rm vbmnt/var/cache/apt/*.bin # device files -- udev restores them sudo rm -rf vbmnt/dev/* # tmp sudo rm -rf vbmnt/tmp/* # log files sudo find vbmnt/var/log -type f -delete # apt lists sudo find vbmnt/var/lib/apt -type f -name '*debian*' -o -type f -name '*list*' -delete # history sudo rm vbmnt/root/.bash_history sudo rm vbmnt/home/brain/.bash_history # unmount filesystem sudo umount vbmnt # zero out empty space sudo zerofree -v vbdev/Partition1 # close whole VDI sudo umount vbdev # compact VDI # THIS NEEDS TO BE DONE ON A VDI THAT IS REGISTERED WITH VIRTUALBOX VBoxManage modifyhd nd_master.vdi --compact