Ubuntu Auto Install Guide

Ubuntu Auto-Install USB Guide — Rabid Mining
⚡ Rabid Mining

UBUNTU AUTO-INSTALL
USB GUIDE

Create a USB that installs Ubuntu automatically with the perfect Vast.ai partition layout. Boot it, walk away, SSH in and run one command.

What this does You flash a USB that installs Ubuntu Server completely hands-free — correct partitions, SSH enabled, and the Vast.ai setup script pre-downloaded. When it finishes it reboots and you just SSH in and run one command.
1Flash USB with Etcher
2Add config files
3Boot from USB
4Ubuntu installs itself
5SSH in + run script
💾
Automatic Partition Layout for Vast.ai
The config creates this layout automatically — optimised for best performance
EFI
512MB — FAT32 — /boot/efi — Boot partition
ROOT 80GB
80GB — ext4 — / — Ubuntu + Vast.ai software
DOCKER (FREE)
REST — Unpartitioned — Vast.ai auto-creates XFS here for Docker
Why leave space unpartitioned? Vast.ai’s installer automatically detects unpartitioned space and creates a high-performance XFS filesystem for Docker containers. This gives you the best rental performance. If you have a second drive, Vast.ai uses that instead.
⚠️ Only one drive with no free space? Vast.ai will create a loopback XFS partition instead — this works but is slower. For best results make sure your root partition is only 80GB and leave the rest free, OR use a second dedicated drive for Docker.
ALSO WORKS
Ubuntu 24.04 LTS
Latest LTS — works well, slightly less tested with Vast.ai
↓ Download ISO (2.2GB) ↓ Download user-data
Use this file + meta-data below
1
Get Balena Etcher
Free tool to flash the ISO to your USB drive
↓ Download Balena Etcher

Works on Windows, Mac and Linux. Install it then come back here.

2
Edit user-data — Set Your Username & Password
Open in Notepad++ and change these two things before flashing
⚠️ Use Notepad++ not regular Notepad! Regular Notepad uses Windows line endings which break the autoinstall config. Download Notepad++ free here. After editing go to Edit → EOL Conversion → Unix (LF) before saving.

Open your downloaded user-data file and find these two lines:

CHANGE THESE IN user-data
    hostname: vastai-rig     <-- your rig name (lowercase, no spaces)
    username: rabid          <-- your login username

To set a custom password, open PowerShell and run:

POWERSHELL — GENERATE PASSWORD HASH
python3 -c "import crypt,getpass; print(crypt.crypt(getpass.getpass()))"

Type your password when prompted. Copy the output hash and replace the password: line in user-data with it.

3
Flash the ISO to USB with Balena Etcher
Use a USB drive 8GB or larger — it will be completely wiped
  1. Open Balena Etcher
  2. Click Flash from file → select your Ubuntu ISO
  3. Click Select target → choose your USB drive
  4. Click Flash! → wait for it to finish (~5 minutes)
  5. Do NOT eject the USB yet — you still need to add the config files
4
Copy user-data and meta-data onto the USB
These files tell Ubuntu to install automatically
After flashing, the USB appears as a drive in Windows Explorer. You need to create an autoinstall folder and put both files in it.
► OPTION A — POWERSHELL (EASIEST)

Open PowerShell and run these commands. Change D: to your USB drive letter:

POWERSHELL
$usb = "D:"   # <-- Change to your USB drive letter

New-Item -ItemType Directory -Force "$usb\autoinstall"
Copy-Item "$HOME\Downloads\user-data" "$usb\autoinstall\user-data"
Copy-Item "$HOME\Downloads\meta-data" "$usb\autoinstall\meta-data"

Write-Host "Done! Config files copied to USB."
► OPTION B — WINDOWS EXPLORER (MANUAL)
  1. Open Windows Explorer → find your USB drive
  2. Create a new folder called exactly autoinstall at the root of the USB
  3. Copy user-data into the autoinstall folder
  4. Copy meta-data into the autoinstall folder
Final USB structure should be:
USB:\autoinstall\user-data USB:\autoinstall\meta-data
5
Boot Your Rig From the USB
Ubuntu detects the config and installs completely automatically — no input needed
  1. Plug USB into your mining rig and power it on
  2. Spam F12 (or F8 / F11 / DEL depending on your motherboard) to get the boot menu
  3. Select your USB drive from the list
  4. Ubuntu detects the autoinstall config and begins installing automatically
  5. Do not touch anything — takes about 10-15 minutes
  6. Screen will say “Installation complete!” then reboot
  7. Remove the USB as soon as it reboots!
⚠️ Pull the USB the moment it reboots — otherwise it boots from USB again and reinstalls. Watch for the screen going black then pull it out.
6
One Command to Finish Everything
Ubuntu is installed — the Vast.ai script is already downloaded and waiting
First SSH in from your other PC. See the Rabid Mining Vast.ai Setup Guide for SSH instructions. Once connected you’ll see the Rabid Mining welcome message.
RUN THIS AFTER SSHING IN
sudo bash ~/vastai-setup.sh

The script will ask for your Vast.ai install key. Get it from cloud.vast.ai/host/setup before running. While the script runs (~15-20 mins) go forward your ports on the router!

✓ COMPLETE FLOW SUMMARY
  1. Download Ubuntu ISO + Etcher + user-data + meta-data
  2. Edit user-data — change username/password in Notepad++
  3. Flash USB with Etcher
  4. Add user-data & meta-data to USB:\autoinstall\ folder
  5. Boot rig from USB → Ubuntu installs automatically (10-15 mins)
  6. Remove USB when rig reboots
  7. SSH into rig from your PC
  8. Run sudo bash ~/vastai-setup.sh
  9. Paste your Vast.ai install key when prompted
  10. Forward ports 40000-40100 on your router while script runs
  11. Final reboot → set price → go live! 💰
Rabid Mining — GPU Rental & Crypto Mining Guides
💛 Support Rabid Mining  ·  ₿ BTC: bc1qzsadu3p5s6gs9cpw9aa9uzsvjzj8y5nmrqs6c5  ·  LTC: ltc1qk0fy0d7g9ttfcyh4yrk0m75jcnpqyykgphlzsd