N100 Mini PC

box.jpg

N100 Mini PCs are very cheap and very capable devices.

Here is the procedure used to dual boot debian 12 on a Mini PC and prepare it to run VMs under KVM.

Hardware

TRIGKEY N100 CPU 16GB RAM 512GB SSD WIFI 6 BT 5.2 WIN 11 PRO

After discount this device should cost £169.

External SSD is an ADATA 240 GB for VMs. Any external USB3 drive will do.

Boot

sysinfo.jpg

Factory default BIOS mode is UEFI and “Secure boot state” is OFF.

Storage

shrink_volume.jpg

Disk 0

Run Windows 11 “Disk Management”, select the C partition of “Disk 0” and choose “Shrink Volume”.

Enter the amount of space to shrink in MB, Eg, 128000.

A new empty partition will be created, this is where Linux will be installed.

Disk 1

Disk 1 is an external USB3 SSD and is not initialised in Windows.

This will be dedicated to KVM in Linux. In this instance the external SSD is 240 GB.

NB usb_storage.quirks will probably be required for external USB3 drives in Linux.

Debian 12 install

The recommended way to install Debian is using a USB flash drive.

Writing the drive image in Windows can be done using RUFUS.

rufus.jpg

This software was unreliable with one USB flash drive and failed with an ISO extraction error. It worked fine with an SDCARD in a USB adapter.

The latest stable Debian image at this time is Debian 12.4 AMD64.

Install

Power on and press DELETE to enter the BIOS.

To boot from a specific device navigate to the override section and then choose the Mass storage device to install Debian.

boot.jpg

Partition

When installing Debian use the free space created when shrinking the C drive with the single partition option and let Debian work it all out.

partition.jpg

Software

Choose basic software such as SSH and possibly LXQT when using a 4K display since the default console is barely readable at that resolution.

Boot

Change the NVMe boot priority from Windows boot manager to the Debian boot manager and save the setting to restart.

bootpri.jpg debian.jpg

dmesg

Miscellaneous

Environment
su root
export PATH=/bin:/sbin
Tools
apt install hdparm apt-file net-tools cpu-checker lshw wireless-tools rfkill bridge-utils cgroupfs-mount conntrack iptables
apt-file update
Quirks

Eg. Ensure ADATA device uses USB Mass storage and not UAS.

cp /etc/default/grub /etc/default/grub.bak
sed -i 's/DEFAULT="quiet"/DEFAULT="quiet usb-storage.quirks=125f:a88a:u"/g' /etc/default/grub
update-grub
Shell

Install tcsh if preferred

apt install tcsh
Locales

Install GB and US locales

dpkg-reconfigure locales
Timezone

Set timezone to Etc/UTC

dpkg-reconfigure tzdata
Editor

Set editor to VIM in preference to pico/nano

apt install vim
update-alternatives --config editor
Run level

Disable any window manager at boot.

systemctl isolate multi-user.target
systemctl set-default multi-user.target
Services

Disable services not required for the KVM appliance (or servers).

As root

systemctl disable connman
systemctl disable preload.service
systemctl disable dundee.service
systemctl disable ofono.service
systemctl disable plymouth.service
systemctl disable wpa_supplicant.service
systemctl disable rtkit-daemon
systemctl disable bluetooth.service
systemctl disable cups.service
systemctl disable cups-browsed.service
systemctl disable avahi-daemon.service
systemctl disable ModemManager.service
systemctl mask connman
systemctl mask wpa_supplicant.service
systemctl mask rtkit-daemon
update-rc.d pulseaudio-enable-autospawn disable
update-rc.d sddm disable
update-rc.d saned disable
apt remove --purge gvfs-backends gvfs

As user

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
systemctl --user disable pulseaudio.socket
systemctl --user disable pulseaudio.service
systemctl --user mask pulseaudio.socket
systemctl --user mask pulseaudio.service
Reboot
/sbin/reboot

File system

Follow the B-TREE filesystem guide to setup /dev/sda and mount on /opt

This file system will be used for VMs.

Network

In this example the host is 192.168.0.130 and VMs or containers will be bridged to the same network.

Save /etc/network/interfaces

cp interfaces interfaces.dist

Replace /etc/network/interfaces

auto lo
iface lo inet loopback

auto enp1s0
iface enp1s0 inet manual

auto br0
iface br0 inet static
 bridge_ports enp1s0
 address 192.168.0.130
 netmask 255.255.255.0
 gateway 192.168.0.1

Reboot to take effect.

ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.130  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::4c3a:bff:feab:4fb0  prefixlen 64  scopeid 0x20<link>
        ether 4e:3a:0b:ab:4f:b0  txqueuelen 1000  (Ethernet)
        RX packets 114  bytes 11804 (11.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 93  bytes 14326 (13.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 7c:83:34:be:e3:5e  txqueuelen 1000  (Ethernet)
        RX packets 114  bytes 13400 (13.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 93  bytes 14326 (13.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Permissions

mkdir -p /etc/qemu
echo "allow all" > /etc/qemu/bridge.conf
chmod u+s /usr/lib/qemu/qemu-bridge-helper

Example lease on bridge

lease 192.168.0.248 {
  starts 4 2024/01/18 18:11:39;
  ends 5 2024/01/19 18:11:39;
  cltt 4 2024/01/18 18:11:39;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 52:54:00:e6:ab:09;
  uid "\001RT\000\346\253\011";
  set vendor-class-identifier = "d-i";
}
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information