02 — Operating System Install¶
Reference for installing or reinstalling Ubuntu Server 24.04 LTS on the Z2 Mini.
If you're rebuilding after a disaster, follow 08-recovery.md instead — it covers OS install plus restoration of all configs.
Hardware requirements¶
- HP Z2 Mini G5 (the actual machine)
- Monitor and USB keyboard/mouse (only needed temporarily)
- Empty USB drive, 8GB or larger (will be wiped)
- Wi-Fi password (or ethernet cable if available)
Phase 1: Create installation media (do on your laptop)¶
- Download Ubuntu Server 24.04 LTS ISO from https://ubuntu.com/download/server
- Download Balena Etcher from https://etcher.balena.io
- Open Etcher → "Flash from file" → select the ISO
- "Select target" → pick your USB drive (verify carefully — wrong drive gets wiped)
- Click "Flash!" — takes 5 minutes
- Eject when done
Phase 2: Boot from USB¶
- Plug monitor, keyboard/mouse, and USB into the Z2
- Power on
- Tap F9 repeatedly during boot to get HP's boot menu
- Select your USB drive
Phase 3: Walk through installer¶
Use arrow keys and Enter. Choices:
| Step | Choice |
|---|---|
| Language | English |
| Keyboard | English (US) or as appropriate |
| Type of install | Ubuntu Server (not minimized) |
| Network | Connect Wi-Fi / use Ethernet |
| Proxy | Leave blank |
| Mirror | Leave default |
| Storage | Custom storage layout (see below) |
| Profile | (see below) |
| Ubuntu Pro | Skip (or enable if you have a token) |
| SSH | ✅ Install OpenSSH server (critical) |
| Featured snaps | Skip everything |
Storage configuration (the tricky part)¶
We use a two-drive setup for failure isolation:
- Drive 1 (Samsung NVMe ~1TB): OS at
/ - Drive 2 (SK hynix NVMe ~1TB): data at
/data
Steps:
- Choose "Custom storage layout"
- Reformat both drives first (they may have leftover partitions):
- Arrow to each drive, press Enter, choose "Reformat"
-
Confirm
-
Set the Samsung as the boot device:
- Arrow to Samsung, press Enter
- Choose "Use as boot device"
-
This auto-creates the EFI partition
-
Add the OS partition on Samsung:
- Arrow to "free space" under Samsung, press Enter
- Choose "Add GPT Partition"
- Size: blank (uses all)
- Format: ext4
-
Mount:
/ -
Add the data partition on SK hynix:
- Arrow to "free space" under SK hynix, press Enter
- Choose "Add GPT Partition"
- Size: blank
- Format: ext4
-
Mount: Other → type
/data -
Done → confirm destructive action
Profile setup¶
| Field | Value |
|---|---|
| Your name | Gabriel |
| Server name | z2mini |
| Username | gabriel |
| Password | (your choice — strong) |
Phase 4: First login¶
After install + reboot, log in at the console.
Get the IP:
Look for the inet 10.x.x.x/24 line under your Wi-Fi interface (e.g., wls3f3).
Update the system:
Phase 5: Set up data directories¶
After reboot:
# Take ownership of the data drive
sudo chown -R gabriel:gabriel /data
# Create initial directory structure
mkdir -p /data/files /data/docker
Phase 6: Install useful CLI tools¶
htop— interactive process viewerncdu— visual disk usagetree— directory listingiw— Wi-Fi diagnosticssmartmontools— drive health (also needed for 06-drive-monitoring.md)
Phase 7: Continue setup¶
The OS is now bootstrapped. Continue with:
- 03-tailscale.md — set up remote access
- 04-samba.md — set up file sharing
- 05-backups.md — automated backups
- 07-email-relay.md — email for alerts
- 06-drive-monitoring.md — drive health monitoring
- Reconnect the USB backup drive and remount it (see 05-backups.md)
You can unplug the monitor and keyboard once SSH from your laptop works.