X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sphinx%2Fvm.rst;h=57972172b59b966231c31d84796ee936e6a2ec7b;hb=a042b0a51ea886f4fe7eff243cd5743777b7b0be;hp=ffe579c71075d409ccb09f36e90687ee95bd2d5b;hpb=f9d9b4bbebf84e86516733195b8ab1420f1d9435;p=neurodebian.git diff --git a/sphinx/vm.rst b/sphinx/vm.rst index ffe579c..5797217 100644 --- a/sphinx/vm.rst +++ b/sphinx/vm.rst @@ -1,4 +1,4 @@ -Standart Debian install +Standard Debian install hostname: neurodebian domain: '' @@ -13,32 +13,33 @@ pwd: neurodebian Do a minimal install -------------------- -make separte vdi images for - -* / -* /tmp -* /var/cache/apt -* swap - -just base system, run selection, but no tasks +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.asc | 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 + 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) @@ -46,11 +47,14 @@ aptitude purge $(apt-cache search --names-only --installed xserver-xorg-video | # 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 @@ -58,24 +62,35 @@ echo "vboxvideo" >> /etc/modules adduser brain sudo visudo # and uncomment the respective line at the end of the file -# (make sure there is nothing below it +# (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 -sudo mount -t vboxsf -o defaults,uid=brain,gid=brain host /mnt/host +# 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 + minc-tools odin psychopy python-mvpa python-pyepl python-mvpa-doc # general scientifically useful stuff -aptitude install ipython +aptitude install ipython python-h5py vim-python + +# next step purge network interface config to give the power to network manager +# important +adduser brain netdev + -mkdir -p .config/backgrounds -cp /mnt/host/.config/awesome/hotbrain.png .config/backgrounds/ +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 @@ -86,9 +101,41 @@ Deploy # shrink VDI image by writting to a new (unfragmented) image # target VDI needs to have proper partition table and MBR -# XXX maybe 'dd' could be used on the fuse-mounted VDIs -sudo ~/vdfuse-v60 -f ~/.VirtualBox/HardDisks/NeuroDebian.vdi mnt/src -sudo ~/vdfuse-v60 -f ~/.VirtualBox/HardDisks/nd_test.vdi mnt/dest -sudo mount -o loop mnt/src/Partition1 src -sudo mount -o loop mnt/dest/Partition1 dest -rsync -vxaHD --delete --exclude=src/dev --exclude=src/proc --exclude=src/tmp src dest +# 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 +