flutter_server_box icon indicating copy to clipboard operation
flutter_server_box copied to clipboard

[Beta] Minimal Linux images (Ubuntu 26.04 & Rocky 10.2) have broken repositories and missing tools

Open kwasosdev opened this issue 3 weeks ago • 5 comments

Describe the bug

The newly added Beta feature for minimal Linux environments has critical out-of-the-box configuration errors for ARM64 (aarch64) devices.

I tested both Ubuntu 26.04 and Rocky Linux 10.2 on an iPhone 14 (iOS 27). In both cases, the package managers (apt and dnf) completely fail to update. Additionally, the images are missing basic network diagnostic tools (iproute2, ethtool) and timezone data.

To reproduce

  1. Open ServerBox app (Beta version) on an iOS device (iPhone 14 / iOS 27).
  2. Go to the new "Linux" beta section and download either Ubuntu 26.04 (arm64) or Rocky Linux 10.2 (aarch64).
  3. Open the terminal and try to run apt update (on Ubuntu) or dnf update (on Rocky Linux).
  4. Observe the errors. Also try running basic commands like ip a, clear, or timedatectl.

Expected result

The package manager should successfully fetch repository metadata and update the system. Basic tools like iproute2 and tzdata should be present or installable.

Actual result

Here are the specific errors and missing configurations for both distros:

1. Ubuntu 26.04 (arm64)

  • 404 Not Found Error: The default repository file /etc/apt/sources.list.d/ubuntu.sources uses the suite resolve (which doesn't exist), instead of the correct resolute.
  • Wrong Mirror: It points to ports.ubuntu.com. However, for Ubuntu 26.04 arm64, packages are hosted on archive.ubuntu.com/ubuntu.
  • MMap Error: Running apt update throws Error: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start.
  • Permission Denied: apt complains about the _apt user not being able to access /var/lib/apt/lists/partial/ (requires sandbox bypass in proot).

2. Rocky Linux 10.2 (aarch64)

  • TLS/SSL Error: Running dnf update immediately fails with: Curl error (35): SSL connect error ... error:0A000119:SSL routines::decryption failed or bad record mac. (This is likely due to MTU fragmentation in mobile networks or strict crypto policies).
  • Missing Tools: The systemd tools and network utilities are completely missing (timedatectl: command not found, ip: command not found).

Suggested Fix for Build Scripts

To make these beta images usable out-of-the-box, please consider applying these fixes in the build script:

  1. For Ubuntu:
    • Change resolve to resolute in the sources file.
    • Change the URI to http://archive.ubuntu.com/ubuntu/.
    • Pre-add /etc/apt/apt.conf.d/99cachelimit with APT::Cache-Start "134217728";
    • Pre-add /etc/apt/apt.conf.d/99sandbox with APT::Sandbox::User "root";
  2. For Both Distros:
    • Include iproute2, ca-certificates, nano, clear (ncurses-bin), and tzdata in the minimal rootfs so users can actually configure and diagnose the network.

kwasosdev avatar Nov 10 '26 17:11 kwasosdev

Issue triage

Feasibility:needs-clarification | Risk:medium

Information needed to reproduce:

  • Can you provide the exact Beta app build/version and the Linux image artifact/build identifiers for Ubuntu 26.04 and Rocky Linux 10.2?
  • Please include complete apt update and dnf update output, including the configured repository URLs and release metadata.
  • Does the Ubuntu repository failure persist after correcting the suite and URI, and what are the permissions/ownership of /var/lib/apt/lists/partial?
  • For Rocky, does the TLS error reproduce on another network or with a different MTU, and can you provide verbose dnf/curl logs?
  • Which exact commands are absent, and should these tools be installed in the base image or merely available from working repositories?

Suggested labels(not applied automatically):bug, linux, arm64, beta

winnowl avatar Nov 10 '26 17:11 winnowl

Thanks for the triage! Here are the details requested:

1. App build/version and image identifiers:

  • App: ServerBox v1856 on iOS 27 (iPhone 14).
  • Images: Default images downloaded from the app's Beta section (Ubuntu 26.04 arm64, Rocky Linux 10.2 aarch64).

2. Ubuntu 26.04 details:

  • Repository failure: The initial failure was due to the typo resolve instead of resolute, and the wrong mirror.
  • Permissions/MMap error: After correcting the URL and suite, apt update downloaded the lists but failed with Error: Dynamic MMap ran out of room. I fixed this by increasing the cache limit. Then it complained about _apt user permissions (Permission denied for /var/lib/apt/lists/partial/). I bypassed this by setting APT::Sandbox::User "root"; in the apt config.
  • Output: Once these 3 fixes were applied, apt update && apt upgrade -y finally worked successfully. (I can provide the full terminal log if needed).

3. Rocky Linux 10.2 details:

  • TLS Error: The exact error is Curl error (35): SSL connect error for https://dl.rockylinux.org/... error:0A000119:SSL routines::decryption failed or bad record mac.
  • Network: I am on an LTE/4G mobile network.
  • MTU testing: I cannot test MTU changes because standard network tools (ip, ifconfig, ethtool) are missing from the image. (This is exactly why we need them pre-installed).

4. Missing commands:

  • ip (from iproute2)
  • clear (from ncurses-bin)
  • timedatectl (from systemd)
  • ethtool
  • nano / vim These must be included in the base image. It's a catch-22: users can't run apt install iproute2 to fix the network if the network is broken and we have no tools to diagnose it.

5. Verbose logs:

  • For Rocky, the dnf error is a standard curl TLS error. The issue is almost certainly related to mobile LTE MTU fragmentation or overly strict crypto policies (OpenSSL) in the beta rootfs.

Suggested fix remains: Please pre-configure the Ubuntu repo/mmap/sandbox issues in the build script and add iproute2, ca-certificates, and tzdata to both minimal images. Thanks!

kwasosdev avatar Nov 10 '26 17:11 kwasosdev

Thanks. Working on it, maybe next next release?

lollipopkit avatar Nov 11 '26 07:11 lollipopkit

Thanks a lot! Looking forward to the update. Also, as a side note: running /sbin/unix_update directly instantly crashes the whole app (likely a proot/segfault issue). Have a great day!

kwasosdev avatar Nov 14 '26 10:11 kwasosdev

Fixed for the next release, which moves iOS to a new engine. On an iPad, Ubuntu 26.04's apt update/install and Rocky 10.2's dnf over HTTPS work out of the box, and /sbin/unix_update just exits with its usual message. The base images stay minimal; dnf install iproute ncurses nano ethtool (or apt install iproute2) adds the tools.

lollipopkit avatar Nov 16 '26 05:11 lollipopkit