Automated Ubuntu Server installation that calls the existing working anvil provisioning process.
Bare Metal/VM
↓
autoinstall.yaml (Ubuntu Server 24.04 installation)
↓
first-boot.sh (runs on first boot)
↓
curl anvil/install.sh (your existing working command)
↓
Fully Provisioned System
If you already have Ubuntu installed, test first-boot.sh manually:
# On your Ubuntu VM:
curl -fsSL https://raw.githubusercontent.com/Beta-Techno/bootstrap/main/scripts/first-boot.sh | sudo bash
# Check the log:
sudo tail -f /var/log/first-boot.log- Upload
autoinstall.yamlto Proxmox snippets:
# On Proxmox host:
scp autoinstall.yaml root@proxmox:/var/lib/vz/snippets/ubuntu-autoinstall.yaml- Create VM with cloud-init:
# On Proxmox host:
qm create 9000 --name bootstrap-test --memory 4096 --cores 2 --net0 virtio,bridge=vmbr0
qm importdisk 9000 ubuntu-24.04-server-cloudimg-amd64.img local-lvm
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0
qm set 9000 --ide2 local-lvm:cloudinit
qm set 9000 --boot c --bootdisk scsi0
qm set 9000 --serial0 socket --vga serial0
qm set 9000 --cicustom "user=local:snippets/ubuntu-autoinstall.yaml"
qm resize 9000 scsi0 +20G
qm start 9000- Watch installation:
qm terminal 9000Create a custom ISO with autoinstall embedded (advanced).
1. Change the default password:
# Generate a new password hash:
openssl passwd -6 YourSecurePasswordHere
# Copy the output and replace the password in autoinstall.yaml line 392. Add your SSH public key:
Edit autoinstall.yaml line 46-47:
authorized-keys:
- "ssh-ed25519 AAAAC3Nza... your-key-here"3. Customize settings (optional):
- Hostname (line 35)
- Timezone (line 64, 106)
- Disk layout (line 27-31)
- Additional packages (line 50-54)
Override anvil install behavior via first-boot.sh:
# In autoinstall.yaml, modify the service or run manually:
ANVIL_INSTALL_URL=https://your-fork.com/anvil/install.sh \
TAGS=base,docker \
ANSIBLE_ARGS='--skip-tags docker_desktop,snap_apps' \
/usr/local/bin/first-boot.shbootstrap/
├── autoinstall.yaml # Ubuntu Server installation config
├── scripts/
│ └── first-boot.sh # Calls existing anvil install
├── docs/
│ └── proxmox-setup.md # Detailed Proxmox instructions
└── README.md # This file
Ubuntu Server's automated installer config:
- Partitions disk with LVM
- Creates
deployuser - Installs base packages (curl, git, ssh)
- Downloads
first-boot.shfrom GitHub - Creates systemd service to run on first boot
- Reboots
Runs once on first boot:
- Checks network connectivity
- Runs your existing working command:
curl -fsSL https://raw.githubusercontent.com/Beta-Techno/anvil/main/install.sh | \ TAGS='all' ANSIBLE_ARGS='--skip-tags docker_desktop' bash
- Logs everything to
/var/log/first-boot.log - Creates
/var/lib/first-boot-completemarker (won't run again)
Your existing working ansible provisioning (unchanged).
# SSH into the VM:
ssh deploy@<vm-ip>
# Check if first-boot ran:
ls -la /var/lib/first-boot-complete
# Check the log:
sudo tail -100 /var/log/first-boot.log
# Check service status:
sudo systemctl status first-boot.service
# Re-run manually if needed:
sudo rm /var/lib/first-boot-complete
sudo systemctl restart first-boot.service"No network connectivity"
- Wait 30 seconds after boot for network to come up
- Check DHCP is working:
ip addr
"curl: command not found"
- Autoinstall didn't complete properly
- Check Ubuntu installer logs
Ansible playbook fails
- Check
/var/log/first-boot.logfor specific error - SSH in and run anvil manually to debug
- Test first-boot.sh manually on existing VM
- Test autoinstall.yaml in Proxmox
- Verify full workflow from bare metal to provisioned
Now (v1):
autoinstall → first-boot → anvil → done
Later (when mani is added to anvil):
autoinstall → first-boot → anvil → mani sync → done
Future (when flakes is complete):
autoinstall → first-boot → nix → flakes → done
Bootstrap remains the same, just the payload changes.
- Change the default password before production use
- Add your SSH key and disable password auth
- Review ansible tags - don't install unnecessary services
- Use HTTPS for script downloads (already configured)
- Verify checksums for production (TODO: add to first-boot.sh)
- anvil - Ansible provisioning (what this calls)
- mani - Repo catalog (future: added to anvil)
- axis - Command plane (future integration)
MIT © Beta Technology