Skip to content

Mini PC setup

Created: 2023-12-15 19:41:10 -0800 Modified: 2023-12-15 21:28:22 -0800

(note: this requires a keyboard and monitor)

  • Download a net-install version of Debian, e.g. 12.4.0-amd64
  • Install onto USB stick with these instructions (that includes converting the ISO to an IMG file)
  • Plug the USB drive in.
  • Go to the UEFI boot settings (just ignore Grub if you have the UEFI options)
    • Go to the “Save & Exit” menu, and under “Boot Override”, choose the USB drive
  • Choose “Install” on the Debian menu. Use defaults for everything except:
    • Hostname: mini-pc-beelink
    • Root password (use weak password just while setting it up since we’ll change it later)
    • Full name for the new user: adam
    • Username for your account: adam
    • Password for new user (use a weak password just while setting it up since we’ll change it later)
    • “Choose software to install”
      • ❌ Debian desktop environment (no need)
      • ✅ SSH server
      • ✅ standard system utilities
  • Remove USB drive
  • Reboot
  • Log in
  • Get SSH set up so that we can ditch the keyboard
    • Switch user to root: su
    • vi /etc/ssh/sshd_config
    • Search for PasswordAuthentication and enable it
    • Run systemctl restart sshd
    • Type ip a to get local IP address
    • Then, from macOS:
      • ssh-copy-id adam@192.168.0.154
    • Then you can SSH with ssh adam@192.168.0.154
    • Then, after you’re able to SSH, disable PasswordAuthentication
      • vi /etc/ssh/sshd_config
      • systemctl restart sshd
  • At this point, you can disconnect the keyboard and display since SSH should be working.

Remaining setup if you want to do this manually and not with Ansible or something

Section titled Remaining setup if you want to do this manually and not with Ansible or something
  • Set a static IP through the router. If my current router doesn’t support this, then set it through the machine itself.
  • Add yourself to sudo and install a bunch of stuff
    • su -
      • (this starts a login shell so that you’ll have the right environment, otherwise usermod won’t be usable)
    • usermod -aG sudo adam
    • Change to strong passwords for “root” and “adam” now: passwd (use a password manager)
    • Note: this next step is done by Ansible, but feel free to run it anyway:
      • apt install sudo btop htop screen curl git vim unzip build-essential
  • Make an inventory.ini:
[minipc]
192.168.0.212
  • Make a playbook.yml:
- name: Set up for Abbott
hosts: minipc
tasks:
- name: installing podman
package:
name: "podman"
state: present
become: true
  • Run ansible-playbook -i inventory.ini playbook.yaml -K
    • The password that you provide should be for adam, and adam should be able to run sudo su.