Commits

abudden  committed 2a34093

Bootstrap script to simplify install.

  • Participants
  • Parent commits b276555

Comments (0)

Files changed (3)

File arch_install.sh

 # Arch linux installation instructions/script for installation
 # within VirtualBox
 
-# To run this script, use:
-#
-# curl -L http://goo.gl/PtdqE | bash
-#
-# Note that | key is probably in the wrong place as arch installer
-# defaults to american keyboard.  Try ~.
-
 # Make the keyboard work
 loadkeys uk
 
 arch-chroot /mnt /arch_install_chroot.sh
 rm /mnt/arch_install_chroot.sh
 
-cat > ./finish.sh <<EOF
+echo "===================================="
 echo "Root password:"
 passwd --root /mnt
 echo ""
+echo "===================================="
 read -p "User name:" username
-useradd --root /mnt -m -s /bin/bash -g users -G sudo \${username}
+useradd --root /mnt -m -s /bin/bash -g users -G sudo ${username}
 echo ""
+echo "===================================="
 echo "User password:"
-passwd --root /mnt \${username}
+passwd --root /mnt ${username}
 # Get next script
-GETSCRIPT=/mnt/home/\${username}/get_server_setup.sh
-echo "#!/bin/bash" > \${GETSCRIPT}
-echo "hg clone https://abudden@bitbucket.org/abudden/systemsetup2 system-setup" >> \${GETSCRIPT}
-chmod +x \${GETSCRIPT}
-chown --reference=/mnt/home/\${username} \${GETSCRIPT}
+GETSCRIPT=/mnt/home/${username}/get_server_setup.sh
+echo "#!/bin/bash" > ${GETSCRIPT}
+echo "hg clone https://abudden@bitbucket.org/abudden/systemsetup2 system-setup" >> ${GETSCRIPT}
+echo "sudo python2 system-setup/system-setup.py" >> ${GETSCRIPT}
+chmod +x ${GETSCRIPT}
+chown --reference=/mnt/home/${username} ${GETSCRIPT}
 # Tidy up
 umount /mnt/{home,boot,}
 echo ""
 echo "Done: power off, remove the CD and reboot."
-echo "Then log in as \${username} and run"
-echo "'bash get_server_setup.sh' then run"
-echo "python2 system-setup/system-setup.py"
-EOF
-chmod +x ./finish.sh
-
-echo "Done: now run './finish.sh'"
+echo "Then log in as ${username} and run"
+echo "'bash get_server_setup.sh'"

File bootstrap.sh

+#!/bin/bash
+
+# To run this script, use:
+#
+# curl -L http://goo.gl/eBCTS | bash
+#
+# Note that | key is probably in the wrong place as arch installer
+# defaults to american keyboard.  Try ~ or use 'loadkeys uk'.
+
+curl -L http://goo.gl/PtdqE > arch_install.sh
+chmod +x arch_install.sh
+echo "Now run './arch_install.sh'"

File make_virtual_machine.sh

 
 MACHINE_NAME=arch
 OSTYPE=ArchLinux
+URL=http://ftp.heanet.ie/mirrors/ftp.archlinux.org/iso/latest/
+
 MACHINE_DIR=~/virtual_machines/${MACHINE_NAME}
-URL=http://ftp.heanet.ie/mirrors/ftp.archlinux.org/iso/latest/
 ISODIR=/tmp
 
 ISOFILE=${ISODIR}/${MACHINE_NAME}.iso
 VBoxManage storageattach ${MACHINE_NAME} --type dvddrive --storagectl "IDE Controller" --port 0 --device 0 --medium ${ISOFILE}
 VBoxManage storageattach ${MACHINE_NAME} --type hdd --storagectl "SATA Controller" --port 0 --device 0 --medium ${MACHINE_NAME}_root.vmdk
 VBoxManage storageattach ${MACHINE_NAME} --type hdd --storagectl "SATA Controller" --port 1 --device 0 --medium ${MACHINE_NAME}_home.vmdk
-VBoxManage modifyvm ${MACHINE_NAME} --memory 512 --nic1 nat --cableconnected1 on --boot1 dvd --boot2 disk --clipboard bidirectional
+VBoxManage modifyvm ${MACHINE_NAME} --memory 1024 --nic1 nat --cableconnected1 on --boot1 dvd --boot2 disk --clipboard bidirectional
 VBoxManage startvm ${MACHINE_NAME} --type gui
 while [ $(VBoxManage list runningvms | grep -c ${MACHINE_NAME}) -eq 1 ]
 do