This is a repository created to aid the testing of my dotfiles without potentially trashing my own system. This
repository consists of notes and Packer configuration to be able to have a VM ready to run ./install.sh
on.
This repository uses VirtualBox and isn't designed for continuous integration, as dotfiles will generally both require passwords to be entered in and need visual verifying that graphical changes are correct.
packer build mac/
- Download the ISO
- Make a VM
- Start the VM with the ISO
sudo apt install -y openssh-server virtualbox-guest-dkms virtualbox-guest-x11
- Download Install Catalina from app store - once it has downloaded and started, it will be saved at
/Applications/Install macOS Catalina.app
- Run the following commands:
hdiutil create -o /tmp/Catalina -size 8500m -volname Catalina -layout SPUD -fs HFS+J
hdiutil attach /tmp/Catalina.dmg -noverify -mountpoint /Volumes/Catalina
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/Catalina --nointeraction
hdiutil detach /volumes/Install\ macOS\ Catalina
hdiutil convert /tmp/Catalina.dmg -format UDTO -o ~/Desktop/Catalina.cdr
mv ~/Desktop/Catalina.cdr ~/Desktop/Catalina.iso
Create a new VirtualBox vm with the following configuration:
- At least 25 GB of disk space
- Decent slug of RAM
- multiple processors
- No floppy (system tab)
- PIIX3 chipset (system tab)
- 12 8MB of video memory
Run the following commands:
VBoxManage modifyvm "Your VM Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "Your VM Name" VBoxInternal2/EfiGraphicsResolution 1920x1080
- Start the VM with the ISO
- Use the
Disk Utility
app in the VM to erase theVBOX HARDDISK Media
- call itmacOS Catalina
- Close
Disk Utility
- Run installer
- Enable ssh server