Installing Adopisoft 5.1.7-20260106 using script and with fixed for fastboot, and patch for RTNETLINK File not exist error.

Install ubuntu 24.04.4. There are many tutorials out there. Watch youtube tutorials or follow this guide: https://blog.adopisoft.com/uncateg...

Tuesday, March 24, 2026

Installing Adopisoft 5.1.7-20260106 using script and with fixed for fastboot, and patch for RTNETLINK File not exist error.

Install ubuntu 24.04.4. There are many tutorials out there. Watch youtube tutorials or follow this guide:

https://blog.adopisoft.com/uncategorized/installing-ubuntu-server-24-04-3

Remember: Works best on fresh installation of Ubuntu server

Downloading and Running the Script on Your Server
Now you can go back to your Ubuntu server (via SSH) and execute the following commands.

Download the script :

sudo wget -O install_adopisoft.sh https://gist.github.com/cybermind2/24f6bd45aa9d4de74c93a2b06febfb8b/raw/081cc03aaa6f3393664b941975a8e81e94d62996/install_adopisoft.sh

Make the script executable:

sudo chmod +x install_adopisoft.sh

Run the script:

sudo ./install_adopisoft.sh

Configure adopisoft after reboot and set the database to postgeSQL
Configure network settings:
your VLAN's
your USB TO LAN
your Builtin WIFI
Enable SSH under SYSTEM SERVICES

Login via SSH and run the following to patch your network for fastboot and patch for RTNETLINK error:
Note: Make sure all USB TO LAN and VLAN interfaces are already configured in the admin dashboard before running this script.
If you have multiple VLAN, say 20 or 30 VLAN configure all of them first.

Download the script

sudo wget -O /tmp/bootoptimizer.sh https://github.com/cybermind2/Adopisoft-deb-package/releases/download/v5.1.7-20260112/bootoptimizer.sh

Make the script executable:

sudo chmod +x /tmp/bootoptimizer.sh

Run the script:
sudo /tmp/bootoptimizer.sh

Clean up your Admin Dashboard:

Delete redundant subdomains in your interface walled garden. Stick to these essentials for the fastest performance:

api.gcash.com / m.gcash.com

gstatic.com / googleapis.com

api.paymongo.com / checkout.paymongo.com

api.xendit.co / checkout.xendit.co

You will then be prompted to set your secure PostgreSQL password! Let me know if you run into any issues with the process.



Script for installing Adopisoft:
install_adopisoft.sh


Script for Fastboot and RTNETLINK error:
bootoptimizer.sh

 

Saturday, March 21, 2026

AdoPiSoft (Armbian) and x86 Fast Boot & Performance Pack (Less than 3 minutes booting if follows and applied correctly)

🚀 The Ultimate Speed Guide: Optimizing Your PisoWiFi Vendo (x86 & Raspberry Pi)

Is your PisoWiFi dashboard taking forever to load? Does your system hang for minutes during boot? This guide will walk you through the essential fixes to eliminate "Network Wait" loops, CPU lag, and database sluggishness.


1. Fix the "Network Wait" Loop (The 15-Minute Hang)

By default, Linux waits for every VLAN and interface to be "online" before starting the dashboard. If one link is slow, your whole system hangs. We can fix this by telling the system to continue as soon as your main internet source is ready.

Why a Permanent Override is Necessary

Files in /run/ are temporary and wiped every reboot. To make the 2-second timeout stick, we must use a permanent systemd override.

  1. Create the override directory:

    Bash
    sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d
    
  2. Create and edit the override file:

    Bash
    sudo nano /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
    
  3. Paste the following configuration:

    [Service]
    ExecStart=
    ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout=2 --interface=eth0

(Save and exit by pressing Ctrl+OEnter, then Ctrl+X).

  1. (Note: Replace eth0 with your actual internet source interface. This prevents the system from hanging while waiting for VLANs or secondary ports.)

  2. Reload and Verify:

    Bash
    sudo systemctl daemon-reload
    systemctl cat systemd-networkd-wait-online.service
    

2. Disable Boot-Time Update Lag

Ubuntu and Armbian often attempt to download updates the moment they detect an internet connection. This consumes bandwidth and CPU power right when your WiFi portal needs to start.

Run these commands to disable the daily background updates:

Bash
sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer
sudo systemctl stop apt-daily.service

3. CPU Optimization for Instant Portal Loading

When running 20–30 VLANs, your CPU (especially on a Pi 4) is managing 30 separate networks. In "ondemand" mode, the CPU slows down to save power, causing a 1-2 second lag when a customer hits the portal. Switching to Performance Mode keeps the CPU ready at all times.

  1. Install the optimization tool:

    Bash
    sudo apt update && sudo apt install cpufrequtils -y
    
  2. Set the governor to Performance:

    Bash
    sudo cpufreq-set -g performance
    
  3. Make it permanent:

    Bash
    echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils
    

4. Weekly Database Maintenance

Keep your sales and voucher data loading instantly by scheduling a weekly database cleanup every Sunday at 3:00 AM.

  1. Open the crontab editor:

    Bash
    sudo crontab -e
    
  2. Add this line to the bottom:

    Plaintext
    0 3 * * 0 -u postgres vacuumdb --all --analyze >> /var/log/db_maintenance.log 2>&1
    
(Save and exit by pressing Ctrl+OEnter, then Ctrl+X).

5. The Vendo Master Netplan Guide

Your Netplan configuration is the heart of your network. Using the wrong settings can lead to the dreaded "stuck at 100%" loading error.

1. Locate your Netplan File

The file name varies depending on your hardware, but it is always in the same folder.

  • On Raspberry Pi: Usually 10-dhcp-all-interfaces.yaml or armbian-default.yaml.

  • On x86 Ubuntu: Usually 50-cloud-init.yaml or 01-netcfg.yaml.

To find yours, run: ls /etc/netplan/


2. The Speed Fix Settings

When editing your file (sudo nano /etc/netplan/FILENAME.yaml), apply these specific rules to stop the boot-time delays.

SettingTypeWhy it is CRITICAL
optional: trueEthernetsTells Linux: "If no cable is plugged in, don't wait for a handshake." Essential for USB-to-LAN adapters.
forward-delay: 0BridgesThe "100% Status Fix." Bridges normally wait 30s to "listen" to the network. This opens the gate instantly.
stp: falseBridgesDisables Spanning Tree Protocol. Speeds up the time it takes for a port to go from "Off" to "Active."

Optimized Template (Copy-Paste Example)

Here is a sample configuration for a setup with a built-in WAN, USB-to-LAN, and VLANs.
wlan0- bridge to 10.0.0.1
vlan8-eth0.8 with ip 8.0.0.1
VLAN22-eth0.22 in bridge to 10.0.0.1
eth1 -usb to lan with ip 20.0.0.1
br0-with ip 10.0.0.1 and members are wlan0 and eth0.22

YAML
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      match:
        macaddress: 'e4:5f:01:57:04:c8'
      dhcp4: false
      dhcp6: false
      addresses:
        - 192.168.90.250/24
      nameservers:
        addresses: [192.168.90.1, 1.1.1.1, 8.8.8.8]
      routes:
        - to: default
          via: 192.168.90.1
    eth1:
      match:
        macaddress: '80:3f:5d:f7:5f:25'
      dhcp4: false
      dhcp6: false
      addresses:
        - 20.0.0.1/20
      nameservers:
        addresses: [20.0.0.1]
      optional: true  # <--- Speed Fix: Don't wait for USB LAN
    wlan0:
      dhcp4: false
      dhcp6: false
      optional: true    # <--- Speed Fix: Don't wait for WiFi driver Lets Dashboard load before WiFi is ready
  vlans:
    eth0.22:
      id: 22
      link: eth0
      dhcp4: false
      dhcp6: false
      optional: true  # <--- Speed Fix
    eth0.8:
      id: 8
      link: eth0
      dhcp4: false
      dhcp6: false
      addresses:
        - 8.0.0.1/20
      nameservers:
        addresses: [8.0.0.1]
      optional: true    # IMPORTANT: Prevents PPPoE lag at boot
  bridges:
    br0:
      dhcp4: false
      dhcp6: false
      addresses:
        - 10.0.0.1/20
      nameservers:
        addresses: [10.0.0.1]
      interfaces:
        - wlan0
        - eth0.22
      parameters:
        stp: false      # Speed Fix: Disables loop-checking
        forward-delay: 0  # <--- Speed Fix: Removes 30s "Listening" delay/hang at 100%

Pro Tip: Always use sudo netplan try before applying. This gives you 120 seconds to confirm changes before they revert, preventing you from being locked out of your own system!

To save your changes:
sudo netplan try 
(If it says "Configuration accepted," press Enter.)

Troubleshooting Checklist

  • Indentation: Netplan is very picky. Always use 2 spaces for indentation. Never use tabs.

  • Static IPs: Ensure your eth1 and br0 are set to dhcp4: false if you are assigning them manual IPs like 11.0.0.1 or 20.0.0.1.

  • Interface Names: On x86, your ports might be named enp1s0 instead of eth0. Check ip link to confirm names before editing Netplan.


6. Fix "Initializing Firewall" Lag (Walled Garden)

If your Walled Garden (unrestricted sites) is too large, the system wastes minutes performing DNS lookups for every domain.

  1. Map Gateway IPs manually:

    Open the hosts file: sudo nano /etc/hosts and add these essential IPs to the bottom:

    Plaintext
    31.13.71.36   api.gcash.com m.gcash.com gcash.app www.gcash.com
    110.173.128.0 os.alipayobjects.com render.alipay.com m.alipay.com
    13.226.210.20 api.paymongo.com checkout.paymongo.com paymongo.com
    3.1.181.233   api.xendit.co checkout.xendit.co xendit.co
    142.250.190.46 gstatic.com googleapis.com

    (Save and exit by pressing Ctrl+O, Enter, then Ctrl+X).
  2. Clean up your Admin Dashboard:

    Delete redundant subdomains. Stick to these essentials for the fastest performance:

    • api.gcash.com / m.gcash.com

    • gstatic.com / googleapis.com

    • api.paymongo.com / checkout.paymongo.com

    • api.xendit.co / checkout.xendit.co





Monday, March 2, 2026

Adopisoft fixed for RTNETLINK error and almost Full ZRAM1 storage allocation problem

I have updated the C code to be 100% universal. I added an auto-detection feature inside the C code itself. When the binary runs, it will automatically check whether it is on a Pi (/sbin/) or Ubuntu (/usr/sbin/) and route the traffic to the correct folder instantly. This means your never have to manually edit the C code!

Cross-Platform Performance Optimization: The Native C Wrapper

The Symptom: Network Lag and Packet Loss

While deploying an OS-level Bash script successfully prevents the RTNETLINK answers: File exists 10,000-session crash, it can introduce a new bottleneck in high-throughput environments.

Because an interpreted Bash script forces the CPU to open a heavy environment multiple times per second, the physical network interface can momentarily choke under the processing overhead, resulting in ping spikes and "Request timed out" errors during user authentication.

The Solution: A Universal Native C Binary

To eliminate the lag while retaining the protective mathematical armor, the interception logic must be compiled directly into native machine code. A C binary executes in a fraction of a millisecond with virtually zero overhead, passing the hexadecimal translations to the Linux kernel without interrupting packet flow.

The following deployment guide is designed to be fully cross-platform. It automatically adapts to both ARM architectures (Raspberry Pi) and x86 architectures (Ubuntu PC/Server).

Step-by-Step Deployment Guide

Step 1: Ensure Core Packages are Installed Certain minimal server distributions (like Ubuntu Server) may be missing the core traffic control package or the C compiler out of the box. Force the system to install and verify them:

Bash
sudo apt update
sudo apt install --reinstall iproute2 gcc -y

Step 2: Identify and Backup the Native Program Depending on your operating system, the native tc program lives in a different folder. We will use a terminal variable to find it dynamically and safely rename it. Run these two commands exactly as written:

Bash
TC_PATH=$(which tc)
sudo mv $TC_PATH $TC_PATH.original

Step 3: Write the Universal C Source Code Create a new C file in the home directory:

Bash
nano ~/tc_wrapper.c

Insert the following highly optimized C code. This script includes an auto-detection block that automatically finds the tc.original file whether your system is a Raspberry Pi or an Ubuntu machine.

C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char *argv[]) {
    // Auto-detect the original program path (Raspberry Pi vs Ubuntu)
    char *original_path = "/sbin/tc.original";
    if (access("/usr/sbin/tc.original", F_OK) == 0) {
        original_path = "/usr/sbin/tc.original";
    }

    // Allocate memory for the arguments list
    char **new_argv = malloc((argc + 1) * sizeof(char *));
    new_argv[0] = original_path;

    for (int i = 1; i < argc; i++) {
        new_argv[i] = strdup(argv[i]);

        char *colon = strchr(argv[i], ':');
        if (colon != NULL) {
            // Ignore MAC and IPv6 addresses
            if (strchr(colon + 1, ':') == NULL) {
                
                // Catch format "classid 1:10000"
                if (strlen(colon) > 1) { 
                    int minor = atoi(colon + 1);
                    if (minor >= 10000) {
                        int major_len = colon - argv[i];
                        int safe_val = 40960 + (minor % 24575);
                        char new_arg[64];
                        snprintf(new_arg, sizeof(new_arg), "%.*s:%x", major_len, argv[i], safe_val);
                        free(new_argv[i]);
                        new_argv[i] = strdup(new_arg);
                    }
                } 
                // Catch format "handle 10000:"
                else if (strlen(colon) == 1 && colon != argv[i]) { 
                    int major = atoi(argv[i]);
                    if (major >= 10000) {
                        int safe_val = 40960 + (major % 24575);
                        char new_arg[64];
                        snprintf(new_arg, sizeof(new_arg), "%x:", safe_val);
                        free(new_argv[i]);
                        new_argv[i] = strdup(new_arg);
                    }
                }
            }
        }
    }
    
    new_argv[argc] = NULL;

    // Execute the real Linux traffic control program instantly
    execv(original_path, new_argv);

    // This only prints if execv fails
    perror("Wrapper failed to execute tc.original");
    return 1;
}

(Save and exit by pressing Ctrl+O, Enter, then Ctrl+X).

Step 4: Compile and Deploy Use the GNU C Compiler to build the executable binary. The uppercase -O2 flag strictly optimizes the program for maximum execution speed. Using our terminal variable again, we drop the newly compiled armor directly into the correct system folder.

Bash
gcc -O2 ~/tc_wrapper.c -o ~/tc
sudo mv ~/tc $TC_PATH
sudo chmod +x $TC_PATH
rm ~/tc_wrapper.c

Post-Update Verification Check

Whenever your operating system undergoes a major apt upgrade, it is possible for Linux to overwrite this custom wrapper with a fresh, vulnerable copy of the native program.

Network administrators can perform a rapid file-size check to verify the armor is still in place. Run this command:

Bash
ls -lh $(which tc)*

  • If the wrapper is active: The main tc file will be extremely small (approx. 17K), while the tc.original file will be massive (approx. 500K - 800K).

  • If the wrapper was overwritten: The main tc file will jump back up to 500K+. If this happens, simply repeat Steps 2 through 4 to re-apply the patch.



Additinal cronjob that will free space in your zram1



Login to your vendo machine via ssh and add this to cronjob

sudo crontab -e
  then PRESS ENTER and type your password on password prompt


Scroll down to the bottom using <arrow down>
Copy and paste this at the bottom of the line:

#This command will clear logs in zram1 storage every 6 hours
0 0,6 * * * truncate -s 0 /var/log/syslog; truncate -s 0 /var/log/dmesg; truncate -s 0 /var/log/pppoe-server-log; truncate -s 0 /var/log/auth.log; truncate -s 0 /var/log/kern.log; truncate -s 0 /var/log/lastlog; truncate -s 0 /var/log/lastlog; truncate -s 0 /var/log/wtmp; truncate -s 0 /var/log/apt/eipp.log.xz; truncate -s 0 /var/log/apt/dataplicity.log; truncate -s 0 /var/log/apt/alternative.log; truncate -s 0 /var/log/nginx/access.log; truncate -s 0 /var/log/armbian-hardware-monitor.log; truncate -s 0 /var/log/supervisor/supervisor.log; truncate -s 0 /var/log/postgresql-16-main.log; truncate -s 0 /var/log/dataplicity.log; truncate -s 0 /var/log/supervisor/supervisord.log; truncate -s 0 /var/log/alternatives.log

To save your changes press CTRL+O combination then PRESS ENTER
To exit press CTRL+X combination

----------------------------------------------------------------------------------------------------------------------

If in case you decided to remove the wrapper for any reason. You can do it with this:

To make sure you can safely remove the wrapper on any machine without having to guess the folder, here is the Universal Revert Method. It works exactly from previoous guide, but automatically detects where your system keeps its files.

The Universal Revert Commands

Run these three commands in order. The first command locks in the correct folder path, no matter which device you are using:

1. Find the path and delete the wrapper:

Bash
TC_PATH=$(which tc)
sudo rm $TC_PATH

2. Restore the original native program:

Bash
sudo mv $TC_PATH.original $TC_PATH

3. Reboot to flush the kernel:

Bash
sudo reboot

Once the system reboots, it will be 100% back to vanilla Adopisoft running the native Linux networking tools.