Created
October 7, 2025 17:03
-
-
Save ThinGuy/9fa5e462df692ca77726eef9f0a5a5a1 to your computer and use it in GitHub Desktop.
Change security.ubuntu.com with us.archive.ubuntu.com for geo-fenced installed.
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/bash | |
| # Create Directory | |
| mkdir -p ~/www | |
| # Enter directory | |
| cd ~/www | |
| # Create autoinstall.yaml | |
| cat > ~/www/user-data << 'EOF' | |
| #cloud-config | |
| autoinstall: | |
| apt: | |
| preserve_sources_list: false | |
| primary: | |
| - arches: [amd64] | |
| uri: http://us.archive.ubuntu.com/ubuntu | |
| security: | |
| - arches: [amd64] | |
| uri: http://us.archive.ubuntu.com/ubuntu | |
| fallback: abort | |
| geoip: true | |
| sources_list: | | |
| deb [arch=amd64] $PRIMARY $RELEASE main universe restricted multiverse | |
| deb [arch=amd64] $PRIMARY $RELEASE-updates main universe restricted multiverse | |
| deb [arch=amd64] $SECURITY $RELEASE-security main universe restricted multiverse | |
| deb [arch=amd64] $PRIMARY $RELEASE-backports main universe restricted multiverse | |
| EOF | |
| # Create meta-data file | |
| touch ~/www/meta-data; | |
| # Start webserver to serve file | |
| cd ~/www | |
| python3 -m http.server 3003 | |
| # Now you can either provide the URL during install or provide the file. We will walk you through this. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment