Skip to content

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)

  1. Download Ubuntu Server 24.04 LTS ISO from https://ubuntu.com/download/server
  2. Download Balena Etcher from https://etcher.balena.io
  3. Open Etcher → "Flash from file" → select the ISO
  4. "Select target" → pick your USB drive (verify carefully — wrong drive gets wiped)
  5. Click "Flash!" — takes 5 minutes
  6. Eject when done

Phase 2: Boot from USB

  1. Plug monitor, keyboard/mouse, and USB into the Z2
  2. Power on
  3. Tap F9 repeatedly during boot to get HP's boot menu
  4. 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:

  1. Choose "Custom storage layout"
  2. Reformat both drives first (they may have leftover partitions):
  3. Arrow to each drive, press Enter, choose "Reformat"
  4. Confirm

  5. Set the Samsung as the boot device:

  6. Arrow to Samsung, press Enter
  7. Choose "Use as boot device"
  8. This auto-creates the EFI partition

  9. Add the OS partition on Samsung:

  10. Arrow to "free space" under Samsung, press Enter
  11. Choose "Add GPT Partition"
  12. Size: blank (uses all)
  13. Format: ext4
  14. Mount: /

  15. Add the data partition on SK hynix:

  16. Arrow to "free space" under SK hynix, press Enter
  17. Choose "Add GPT Partition"
  18. Size: blank
  19. Format: ext4
  20. Mount: Other → type /data

  21. 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:

ip addr show

Look for the inet 10.x.x.x/24 line under your Wi-Fi interface (e.g., wls3f3).

Update the system:

sudo apt update
sudo apt upgrade -y
sudo reboot

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

sudo apt install -y htop ncdu tree iw smartmontools
  • htop — interactive process viewer
  • ncdu — visual disk usage
  • tree — directory listing
  • iw — Wi-Fi diagnostics
  • smartmontools — drive health (also needed for 06-drive-monitoring.md)

Phase 7: Continue setup

The OS is now bootstrapped. Continue with:

  1. 03-tailscale.md — set up remote access
  2. 04-samba.md — set up file sharing
  3. 05-backups.md — automated backups
  4. 07-email-relay.md — email for alerts
  5. 06-drive-monitoring.md — drive health monitoring
  6. 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.