]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Few more notes on the VM (not yet done).
authorMichael Hanke <michael.hanke@gmail.com>
Tue, 19 Jan 2010 23:44:33 +0000 (18:44 -0500)
committerMichael Hanke <michael.hanke@gmail.com>
Tue, 19 Jan 2010 23:44:33 +0000 (18:44 -0500)
sphinx/vm.rst

index ffe579c71075d409ccb09f36e90687ee95bd2d5b..d3bdd036c074a7e47e0866ea89aff63353a4b3b1 100644 (file)
@@ -1,4 +1,4 @@
-Standart Debian install
+Standard Debian install
 
 hostname: neurodebian
 domain: ''
@@ -13,32 +13,28 @@ 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
 
 # cleanup unwanted stuff
 # video drivers (all but vesa)
@@ -46,6 +42,9 @@ 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
@@ -58,7 +57,7 @@ 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
@@ -72,10 +71,16 @@ aptitude install afni afni-atlases amide caret dicomnifti fsl fsl-atlases lipsia
  minc-tools odin psychopy python-mvpa python-pyepl
 
 # general scientifically useful stuff
-aptitude install ipython
+aptitude install ipython python-h5py
 
-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 +91,44 @@ 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
+
+# clone HDD
+#dd if=dev/hda of=/dev/hdb bs=512 count=1
+# fixing bits extended partition is empty -> create swap partition
+#fdisk /dev/hdb
+#mkswap /dev/hdb5
+#mkfs.ext3 -m 1 /dev/hdb1
+#tune2fs -c 100 /dev/hdb1
+
+
+cd /tmp
+cp /home/neurodebian/vm/nd_plainpartition.vdi nd_hdd.vdi
+mkdir -p vbdev/src vbdev/dest vbmnt/src vbmnt/dest
+
+# get access to disks inside the VDIs
+sudo vdfuse -f /home/neurodebian/vm/nd_master.vdi vbdev/src/
+sudo vdfuse -f nd_hdd.vdi vbdev/dest/
+
+
+
+# mount partititions
+sudo mount -o loop vbdev/src/Partition1 vbmnt/src
+sudo mount -o loop vbdev/dest/Partition1 vbmnt/dest
+
+# now extract files from src, filter, and move to dest
+sudo rsync -xaHD --delete \
+  --exclude=dev \
+  --exclude=proc \
+  --exclude=tmp \
+  --exclude=var/cache/apt \
+  --exclude=var/log/* \
+  --exclude=etc/.git \
+  --exclude=home/brain/.git \
+  --exclude=var/lib/apt/lists \
+  vbmnt/src/ vbmnt/dest/
+
+sudo umount vbmnt/dest
+sudo umount vbmnt/src
+sudo umount vbdev/dest
+sudo umount vbdev/src
+