Upgrading WSL2 Ubuntu LTS 22.04 to LTS 24.04…

After fixing WSL networking issues, I had to upgrade the Ubuntu LTS instance… The sequence should have been:

  • apt update
  • apt upgrade -y
  • apt dist-update
  • lsb_release -a   # to confirm version before upgrade
  • do-release-upgrade
  • lsb_release -a   # to confirm version after upgrade

But, as per usual, I hit another issue attempting to upgrade (i.e. while running do-release-upgrade):

error: cannot list snaps: cannot communicate with server: Get "http://localhost/v2/snaps": dial unix /run/snapd.socket: connect: no such file or directory

A quick ‘net search brought up the point that snapd was not running…

Continue reading

Windows 11 Host Network Service (HNS) and Windows Subsystem for Linux (WSL)…

For the longest time, my Ubuntu LTS 22.04 on my (forced-to-be-update-to) Windows 11 (replete with other networking horrors) was not working properly – I could only access the Internet from within the WSL2 container when Windows Firewall was disabled.

Despite shenanigans like attempting to whitelist a whole plethora of executables:

  • C:\Windows\System32\vmcompute.exe
  • C:\Windows\System32\vmms.exe
  • C:\Windows\System32\vmwp.exe
  • C:\Windows\System32\wsl.exe
  • C:\Program Files\WSL\wsl.exe
  • C:\Program Files\WSL\wslservice.exe

Even attempting to whitelist the usual services suspects via C:\Windows\System32\svchost.exe like the following:

  • Host Network Service
  • Internet Connection Sharing (ICS)

All were to no avail. I could resolve domain names, but no traffic went out unless the host’s Windows Firewall was disabled.

I could not even see any blocked traffic from the logs, despite having the correct set up (tip: just use WFC‘s logging interface).

Searching ChatGPT and Perplexity sent me on various wild-goose chases, from changing WSL networking modes (NAT vs. “mirrored” in %USERPROFILE%/.wslconfig), to setting up dubious firewall rules referencing InterfaceAlias using New-NetFirewallRule (but which actual interface UUIDs change every boot). Continue reading

netplan Not Going To Plan…

With a /etc/netplan/00-global.yaml having the following contents:

network:
  version: 2
  renderer: networkd

And all other .yaml files in the /etc/netplan directory not having an explicit renderer, the system should default to networkd… Just netplan apply and done! Simple, right?

Yeah, right.

Seems like netplan apply still thinks to use NetworkManager even when no single .yaml file declares its use; and since I disabled and masked the service, netplan apply was complaining NetworkManager was masked.

The secret sauce?

Continue reading

Forcing Graphics Mode/s on Ubuntu…

I found myself wrestling with XGA (1024×768) output on a system with only VGA output, although I was aware the display controller could get up to FHD easily (xrandr output shows the maximum “width” and “height” values surpassing that of FHD – see screenshot/s below).

I managed to wrangle the output to FHD by doing the following:

  • get existing displays and note current display
    • xrandr --listmonitors
  • get existing modes
    • xrandr
  • if adding a new mode (e.g. forcing FHD aka 1080p aka 1920×1080 on a VGA output):
    • get new mode details
      • cvt <width> <height> <refresh rate>
      • e.g. cvt 1920 1080 60
    • copy the output after the “Modeline” – this will be the input for next command
    • create the new mode
      • xrandr --newmode <text after "Modeline" from cvt output>
    • add the new mode
      • xrandr --addmode <display> <mode name>
      • e.g. xrandr --addmode VGA-1 "1920x1080_60.00"
  • change the mode
    • xrandr --output <display> --mode <mode name>

Making this stick was a completely different story in frustration…

Continue reading

update-initramfs Couldn’t Identify Root File System for fsck Hook…

Well, as the title implies, I was running update-initramfs -u on my Ubuntu installation after having (i) duplicated the SSD from another existing system, and (ii) having rebuilt a kernel driver (which then required the aforementioned update-initramfs command).

Unfortunately, the command threw back a “W: Couldn't identify type of root file system for fsck hook” error…

Continue reading

x11vnc Copy-and-Paste…

To prevent typos and OS line break-type kerfuffles, I typically copy files instead of copy-pasting any files’ contents across VNC sessions.

Somehow, I came across wanting to just copy-paste a file via a VNC session, which used to work ye long ago… But it just was not happening…

Diving into the ‘net for answers, I came across autocutsel… Although some places stated to use xstartup files, as I was using x11vnc, this was not possible, so I simply ended up creating a services file (with a dependency on the x11vnc service):

Continue reading

The Qotom C3758R Unit Continued…

Just a quick update on networking experiences with this fanless (but hot) unit…

 

Why Is It Not In Sync? (buy buy buy)…

For some odd reason, throughput on stock Ubuntu 24.04 LTS via a 10GbE SFP+ module was showing asymmetrical speeds on iperf3 – ~10Gbps in, but only ~6Gbps out. Checking the firewall, ensuring jumbo packets (9000 byte MTU), ensuring ufw was disabled, disabling all forms of NIC offloading (although this may actually be inverse to the intended) did not change anything. Furthermore, htop showed one core constantly maxing out when sending (but hovering 60% to 75% on receiving).

Continue reading

10GbE and Jumbo Packets…

For the longest time, I was painfully aware that I was not utilising my 10GbE network switches and NICs to its fullest.

Having to finally sit down, build, test and optimise a software firewall using 10GbE interfaces for some organisation I volunteer at and therefore having to test it in my home lab, I finally was “forced” to sit down and “optimise” my local home lab.

An iperf3 test was not showing good numbers – bouncing around the ~8Gbps mark on a 10Gbps network.

Without fluffing around with kernel and IP stack tweaks, I was aware the easiest way to eke out better performance was to increase the MTU…

Continue reading

Crashing Ubuntu Desktop “System Settings”…

Attempting to get to the “System Settings” “control panel” of Ubuntu desktop on my Server 24.04 LTS installation, I discovered clicking on the “System Settings…” option from the “desktop” bottom (typically top-right corner) did absolutely squat.

After rooting around online, I finally realised that I had been over-zealous in “cleaning out”/uninstalling unneeded apps and libraries – or so I thought was “unneeded”.

Turns out that the audio libraries, even on an “audio-less” server, are still required!

A quick apt reinstall ubuntu-desktop-minimal fixed things right up!