- Open OSX-10.13.ova in VirtualBox
- Select File/Import Appliance
- Install OSX (boot from InstallESD.dmg in "Install macOS High Sierra.app")
- Create single partition
- Add vagrant user (password: vagrant)
- Login as vagrant
- run setup.sh
- curl -L https://gist.github.com/MartinNowak/8156507/raw/setup.sh | sudo sh
- install XCode command line tools
- install PackageManager (Auxillary XCode tools)
- write zeroes into free space
- diskutil secureErase freespace 0 /
- shutdown
- run setup.sh
- Package box
- VBoxManage modifymedium disk OSX-10.13.vdi --compact
- vagrant package --base OSX-10.13 --output OSX-10.13.box
-
-
Save ibuclaw/4272119259b835672962e2b07bc35cd3 to your computer and use it in GitHub Desktop.
curl follow redirects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e -v | |
# cd $HOME | |
cd /var/root | |
# enable passwordless sudo | |
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | |
# disable software updates | |
softwareupdate --schedule off | |
# disable spotlight indexer | |
mdutil -a -i off | |
# install ssh keys | |
mkdir -p .ssh | |
curl -L https://raw.github.com/mitchellh/vagrant/master/keys/vagrant > .ssh/id_rsa | |
chmod 0600 .ssh/id_rsa | |
curl -L https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub > .ssh/id_rsa.pub | |
cp .ssh/id_rsa.pub .ssh/authorized_keys | |
cp -r .ssh /Users/vagrant/ | |
chown -R vagrant /Users/vagrant/.ssh | |
# set network configuration | |
scutil --set HostName `uname -s`-`uname -r`-`uname -m` | |
# enable sshd | |
systemsetup -setremotelogin on | |
# disable auto login | |
defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser || echo 0 | |
# TODO: disable gui startup | |
# install Xcode command line tools | |
echo "Please install XCode command line tools now." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment