curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt -y install nodejs && sudo npm i -g pm2
pm2 startup systemd # then run the line it prints
curl -fsSL https://pkg.cloudflare.com/cloudflared-main.gpg | sudo tee /usr/share/keyrings/cloudflared.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflared.gpg] https://pkg.cloudflare.com/cloudflared any main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt update && sudo apt -y install cloudflared
Modelollama · local tier online
curl -fsSL https://ollama.com/install.sh | sh && ollama pull qwen3:4b
Three devices, three completely different ways in. Tap keys repeatedly from the instant power hits — holding them usually misses the window.
ASUS NUC
mini PC · UEFI
F2
BIOS setupBoot order, secure boot, memory info
F10
One-shot boot menuPick the USB stick for a single boot — this is the one for the installer
F12
Network / PXE bootRarely needed
Fast Boot + a USB keyboard often eats the key window. If you can't catch it, boot into Ubuntu and drop straight into firmware:
systemctl reboot --firmware-setup
Lenovo laptop
ThinkPad / IdeaPad
The Lenovo trap: FnLock. Top-row keys fire media actions unless Fn is held. If F12 does nothing, hold Fn with it, or toggle FnLock with Fn+Esc first.
F1
BIOS — ThinkPadTap from power-on. Some models pause the splash if you press Enter first
F12
Boot menu — most modelsOne-time device pick
Novo
IdeaPad / Yoga / LegionTiny pinhole or side button next to power. Press it (device off) → Novo Menu → BIOS Setup or Boot Menu. The reliable path on consumer Lenovos.
Already in the OS? From Windows: Settings → Recovery → Advanced startup → UEFI Firmware Settings. From Linux: systemctl reboot --firmware-setup.
Raspberry Pi 5
no BIOS — it's all software
There's no firmware screen to catch. Boot behaviour lives in the bootloader EEPROM and you change it from inside the OS.
config
Boot order & settingsraspi-config → Advanced → Boot Order, or edit the EEPROM directly
The new Pi 5 buttonOff → press once to boot · running → press once for a clean shutdown · hold ~10s to force off
Won't boot? The green activity LED flashes an error pattern — count the long/short blinks and match against the Pi bootloader diagnostics. Steady nothing = no power delivery or dead SD/NVMe.
GRUB & console
Getting into a Linux box (NUC / Lenovo) that won't behave
hold Shift
Show GRUB menuTap Esc instead on UEFI. Ubuntu Server usually shows it anyway
e
Edit a boot entryThen Ctrl+x to boot it
rescue
Root shell, no servicesAt GRUB press e, append systemd.unit=rescue.target to the linux line
CtrlAltF3
Switch to a text consoleA frozen desktop isn't a frozen kernel. F1–F6 are separate TTYs
R E I S U B
Safe forced rebootHold Alt+SysRq, one letter per second. Syncs discs first — always beats holding power
The commands that turn "it's broken" into a diagnosis. Everything here works the same on the Pi, the NUC, and the Lenovo — they're all Debian-family.
systemd
The machine's service manager — is it running, and why did it stop?
These four answer most questions. Swap ollama for any service.
systemctl status ollama # state, PID, last log lines
sudo systemctl restart ollama # bounce it
journalctl -u ollama -f # live tail its logs
systemctl list-units --failed # everything red on the box
Diagnosing a crash after the fact: journalctl -b -1 -p err shows only errors from the previous boot.
Storage
The thing that actually killed the last install
Know the disks before you touch them
lsblk before every mount, dd, or install. Always.
lsblk -f # disks, partitions, filesystems, labels
df -h # free space per mount — watch / and /var
sudo du -xhd1 / | sort -h | tail # what's eating root
NVMe percentage_used is wear — under 10% after a year is normal. SSDs die by wear-out, HDDs by reallocated sectors.
Network
Who's listening, who's reachable
Ports & processes
"Address already in use" and "connection refused" both start here.
ss -tulpn # every listening port + owning process
ss -tulpn | grep 11434 # who owns Ollama's port
ip a # interfaces and addresses
Tailscale sanity
tailscale status # every node + reachability
tailscale ping kay2nuc # direct vs DERP-relayed path
Permanently "via DERP" means UDP's blocked somewhere — works, but slower. Direct is the goal.
Processes
PM2 & htop
The PM2 daily driver
pm2 ls # watch the ↺ restart counter
pm2 logs clive --lines 50
pm2 restart clive && pm2 save # save survives reboot
pm2 monit # live CPU/RAM per process
A climbing ↺ counter is a crash loop, not uptime. pm2 logs <name> --err for the reason — never just restart harder.
htop, driven by keys
F6 sort · M by memory · P by CPU · F4 filter · F9 kill · t tree view
Load average = 1/5/15-min run-queue length. Sustained load above nproc with high CPU = CPU-bound; high load with low CPU = stuck on I/O.
Recovery
When it won't boot at all
The chroot rescue recipe
Boot the install USB → shell → become root inside the broken system. Fix bootloaders, clear full discs, reset passwords.
sudo mount /dev/nvme0n1p2 /mnt # root partition (lsblk to confirm)
sudo mount /dev/nvme0n1p1 /mnt/boot/efi # EFI partition
for d in dev proc sys run; do sudo mount --bind /$d /mnt/$d; done
sudo chroot /mnt # you're now inside the broken OS
From there: apt --fix-broken install, update-grub, delete whatever filled the disk. Exit, reboot.
Vitals
One-liners worth memorising
uptime # load at a glance
free -h # RAM — "available" is the number that matters
sensors # temps (apt install lm-sensors; sensors-detect once)
nproc # core count