About
This script will:
- download the latest version of
Debian netinst
orUbuntu server
64bit iso - do some magic to turn it into a vagrant box file
- output
debian/debian-x.y.0-amd64.box
orubuntu/ubuntu-xx.yy-amd64.box
- add just created vagrant box to available list
Requirements
- Oracle VM VirtualBox
- Vagrant
- 7zip
- curl
- mkisofs/genisoimage
- md5sum/md5
Before usage
I've decided to don't use git tags further, so instead, I've created separate git branches with all available distributions and versions. You can see all of them here: https://github.com/kraksoft/vagrant-box/branches/active
Usage on OSX
./build-debian.sh
or
./build-ubuntu.sh
This should do everything you need. If you don't have required package, install homebrew, then:
brew install p7zip
brew install curl
brew install cdrtools
brew install coreutils
Usage on Linux
./build-debian.sh
or
./build-ubuntu.sh
This should do everything you need. If you don't have required package then:
sudo apt-get install p7zip-full
sudo apt-get install curl
sudo apt-get install genisoimage
sudo apt-get install coreutils
Usage on Windows (under cygwin/git shell)
./build-debian.sh
or
./build-ubuntu.sh
Tested under Windows 7 with this tools:
Environment variables
You can affect the default behaviour of the script using environment variables:
VAR=value ./build.sh
The following variables are supported:
-
PRESEED
— path to custom preseed file. May be useful when if you need some customizations for your private base box (user name, passwords etc.); -
LATE_CMD
— path to custom late_command.sh. May be useful when if you need some customizations for your private base box (user name, passwords etc.); -
VM_GUI
— if set toyes
or1
, disables headless mode for vm. May be useful for debugging installer;
Notes
This script basted on original dotzero's repo and with some tweaks to be compatible Debian/Ubuntu.