]> git.donarmstrong.com Git - neurodebian.git/commitdiff
additional tune ups for VM images -- still hostname debian
authorYaroslav Halchenko <debian@onerussian.com>
Wed, 1 Dec 2010 20:41:10 +0000 (15:41 -0500)
committerYaroslav Halchenko <debian@onerussian.com>
Wed, 1 Dec 2010 20:41:10 +0000 (15:41 -0500)
vm/d-i/squeeze/preseed.cfg
vm/d-i/tools/initial_setup
vm/tools/nd_createappliance

index d40af09e960ae0dcf98e9d3f95d72f050080dac9..db13fc7bd1959849d0ec58816665382566923d59 100644 (file)
@@ -45,12 +45,13 @@ d-i netcfg/choose_interface select auto
 # values set here. However, setting the values still prevents the questions
 # from being shown, even if values come from dhcp.
 d-i netcfg/get_hostname string neurodebian
+d-i netcfg/invalid_hostname string neurodebian
 # d-i netcfg/get_domain string unassigned-domain
 
 # Disable that annoying WEP key dialog.
 # d-i netcfg/wireless_wep string
 # The wacky dhcp hostname that some ISPs use as a password of sorts.
-#d-i netcfg/dhcp_hostname string radish
+# d-i netcfg/dhcp_hostname string neurodebian
 
 # If non-free firmware is needed for the network or other hardware, you can
 # configure the installer to always try to load it, without prompting. Or
@@ -183,7 +184,7 @@ d-i passwd/user-uid string 1000
 
 # The user account will be added to some standard initial groups. To
 # override that, use this.
-d-i passwd/user-default-groups string audio cdrom video plugdev dip sudo
+d-i passwd/user-default-groups string audio cdrom floppy video plugdev dip sudo
 
 ### Apt setup
 # You can choose to install non-free and contrib software.
index 96fffcd07ddd277a3a83611ed0079d6bc46c6296..da4cb1bce61acfa9de070a145fb0fe287230e39b 100755 (executable)
@@ -15,6 +15,10 @@ set -u
 # hostname: neurodebian
 # domain: ''
 
+# Needs to be assured since it got reset to debian
+hostname neurodebian
+sed -i -e 's/^127\.0\.1\.1.*/127.0.1.1\tneurodebian/g' /etc/hosts
+
 # all file in one partition
 
 # root: not there
@@ -95,3 +99,7 @@ sed -i -e "s/10.0.0.1:9999/$(dpkg --print-architecture)-geomirror.debian.net/" \
     -e "s/^deb-src/#deb-src/" /etc/apt/sources.list
 
 etckeeper commit "Initial VM setup done"
+
+# Create a link to automatically mounted Shared folder
+# Created by the Welcome Wizard
+#sudo -u brain ln -s /mnt/host /home/brain/
index 10bec9551009e42e0dceb8f12b47e6f2662678ea..7905d68543157fb481f44feddd471503c949ed80 100755 (executable)
@@ -6,7 +6,7 @@ set -eu
 
 # TODO: arguments later on to become cmdline args
 #iso=debian-squeeze-di-beta1-amd64-businesscard.iso
-iso=debian-testing-i386-businesscard.iso
+iso=debian-testing-${ARCH:=amd64}-businesscard.iso
 di_cd=$(readlink -f $PWD/../../../neurodebian-images/$iso)
 di_host=hydra                   # where to look for di preseed
 
@@ -15,6 +15,8 @@ dist_dir=$PWD/dist
 vendor="NeuroDebian"
 vm_version="6.0.1"
 vm_ostype=Debian
+vendor_url="http://neuro.debian.net"
+product_url="${vendor_url}/vm.html"
 
 # Generic definitions
 eula="This virtual appliance contains Free and Open Source Software (FOSS) released under licenses compliant with the Debian Free Software Guidelines (DFSG, see http://www.debian.org/social_contract), such as, GPL, BSD, MIT, etc.  Such software is free to be used or customized for any purpose.
@@ -35,9 +37,11 @@ if file $di_cd | grep -q ' amd64 '; then
     vm_arch_name=" (64bit)"
 fi
 
-vm_disk="$build_dir/nd-${vm_version}_${vm_arch}.vdi"
-vm_name="${vendor} VirtualMachine${vm_arch_name}"
-vm_ovf="${dist_dir}/${vendor}_${vm_version}_${vm_arch}.ovf"
+vm_fprefix="${vendor}_${vm_version}_${vm_arch}" # common prefix for files
+#vm_disk="$build_dir/nd-${vm_version}_${vm_arch}.vdi"
+vm_disk="$build_dir/${vm_fprefix}.vdi"
+vm_name="${vendor} ${vm_version} ${vm_arch_name}"
+vm_ovf="${dist_dir}/${vm_fprefix}.ovf"
 product_name="${vendor} VirtualMachine (${vm_arch})"
 
 _info() {
@@ -58,6 +62,7 @@ rm -f ${vm_disk}
 
 clean_buildvm                   # clean things up
 
+#exit
 # Check that no previous VM was left (can happen if previous failures
 # were "valid")
 if VBoxManage list vms | grep -q "^\"${vm_name}\".*"; then
@@ -70,7 +75,7 @@ mkdir -p $build_dir
 
 _info Create HardDisk for the VM
 VBoxManage createhd --filename $vm_disk \
-    --size 20000 --format VDI
+    --size 20480 --format VDI
   # documented but not implemented:
   #  --comment "Drive for NeuroDebian VM installer"
 
@@ -154,8 +159,8 @@ _info Exporting the appliance
 
 VBoxManage export "${vm_name}" -o "$vm_ovf" \
        --vsys 0 \
-       --product "${vendor} VirtualMachine (${vm_arch})" \
-       --producturl "http://neuro.debian.net/vm.html" \
+       --product "${product_name}" \
+       --producturl "${product_url}" \
        --vendor "${vendor}" \
        --vendorurl "http://neuro.debian.net" \
        --version "$vm_version" \