⚡ 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
How the Drive Gets Partitioned
💾
Automatic Partition Layout for Vast.ai
The config creates this layout automatically — optimised for best performance
512MB — FAT32 — /boot/efi — Boot partition
80GB — ext4 — / — Ubuntu + Vast.ai software
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.
Choose Your Ubuntu Version
✓ RECOMMENDED
Ubuntu 22.04 LTS
Most tested with Vast.ai — battle-proven stability
↓ Download ISO (1.5GB)
↓ Download user-data
Use this file + meta-data below
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
Step 1 — Download & Install Balena Etcher
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.
Step 2 — Customise Your Config File
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.
Step 3 — Flash the USB
3
Flash the ISO to USB with Balena Etcher
Use a USB drive 8GB or larger — it will be completely wiped
- Open Balena Etcher
- Click Flash from file → select your Ubuntu ISO
- Click Select target → choose your USB drive
- Click Flash! → wait for it to finish (~5 minutes)
- Do NOT eject the USB yet — you still need to add the config files
Step 4 — Add Config Files to USB
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)
- Open Windows Explorer → find your USB drive
- Create a new folder called exactly
autoinstallat the root of the USB - Copy
user-datainto the autoinstall folder - Copy
meta-datainto the autoinstall folder
Final USB structure should be:
USB:\autoinstall\user-data
USB:\autoinstall\meta-data
Step 5 — Boot & Install
5
Boot Your Rig From the USB
Ubuntu detects the config and installs completely automatically — no input needed
- Plug USB into your mining rig and power it on
- Spam F12 (or F8 / F11 / DEL depending on your motherboard) to get the boot menu
- Select your USB drive from the list
- Ubuntu detects the autoinstall config and begins installing automatically
- Do not touch anything — takes about 10-15 minutes
- Screen will say “Installation complete!” then reboot
- 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.
Step 6 — SSH In & Run the Vast.ai Script
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
- Download Ubuntu ISO + Etcher + user-data + meta-data
- Edit user-data — change username/password in Notepad++
- Flash USB with Etcher
- Add user-data & meta-data to USB:\autoinstall\ folder
- Boot rig from USB → Ubuntu installs automatically (10-15 mins)
- Remove USB when rig reboots
- SSH into rig from your PC
- Run
sudo bash ~/vastai-setup.sh - Paste your Vast.ai install key when prompted
- Forward ports 40000-40100 on your router while script runs
- Final reboot → set price → go live! 💰
