Ubuntu Server Headless Boot + Configuration
I recently built a Z270 + 1240v6 system and planned to run it headless (without even a graphics card!). However, I ran into issues - after removing the graphics card, the network failed and the CPU fan ran slowly.
I thought a kernel module crash caused a kernel panic and spent hours troubleshooting. Finally, I found this blog post and discovered the issue was PCIE changes causing the network interface name to change. So I modified netplan to:
network:
version: 2
ethernets:
enp1s0:
dhcp4: true
enp2s0:
dhcp4: true
enp3s0:
dhcp4: true
enp4s0:
dhcp4: true
enp5s0:
dhcp4: trueRestarting solved the issue! After logging in, I found it was now running on enp1s0!
Edit: You can actually use netplan's MAC match feature to specify the interface, which effectively solves these issues.
Final Configuration
netplan:
network:
version: 2
ethernets:
onboardeth:
match:
macaddress: aa:bb:cc:dd:ee:ff
dhcp4: false
addresses:
- 192.168.1.x/24
- 192.168.8.x/24
routes:
- to: default
via: 192.168.1.1
- to: 192.168.255.y/25
via: 192.168.8.z
nameservers:
addresses:
- 192.168.1.1/etc/udev/rules.d/99-usb-serial-getty.rules:
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", RUN+="/usr/bin/stty -F /dev/%k 115200", TAG+="systemd", ENV{SYSTEMD_WANTS}="serial-getty@%k.service"lxd + vxlan isolated network configuration:
https://artivis.github.io/post/2024/lxc-isolated/
name: lxdbr2
description: ipv4 only internet isolated
type: bridge
config:
security.acls: external-only
security.acls.default.egress.action: allow
security.acls.default.ingress.action: allow
ipv4.address: 10.122.156.1/24
ipv4.nat: 'true'
ipv6.address: nonename: lxdbr1
description: vxlan to global v6
type: bridge
config:
tunnel.lxdv6.id: 'abcd'
tunnel.lxdv6.interface: enp3s0
tunnel.lxdv6.local: 192.168.8.x
tunnel.lxdv6.port: '4789'
tunnel.lxdv6.protocol: vxlan
tunnel.lxdv6.remote: 192.168.8.z
ipv4.address: none
ipv6.address: none/etc/systemd/system/wol.service:
[Unit]
Description=Enable Wake On Lan
[Service]
Type=oneshot
#ExecStart=/bin/bash -c 'for a in {1..9}; do echo /usr/sbin/ethtool --change enp"${a}"s0 wol g || true; done'
ExecStart=/etc/initwol.sh
[Install]
WantedBy=basic.targetUseful commands:
systemctl enable serial-getty@ttyUSBx