Tuesday, December 22, 2020

[Solved] Proxmox 6.3 DHCP Error on Huawei RH2288 V3 Servers: No Working Lease in Persistent Database

When booting the Proxmox VE 6.x installer on enterprise Huawei FusionServer RH2288 V3 rack servers, the graphical installation aborts and drops into a debug shell with the error: No working lease in persistent database.

Root Cause: Kernel framebuffer conflict with Huawei integrated server graphics (BMC) and IOMMU initialization.

Step-by-Step Resolution

  1. At the Proxmox GRUB boot menu, press e to edit the boot entry.
  2. Locate the linux kernel line and append the following kernel parameters:
    modprobe.blacklist=nouveau amd_iommu=on video=efifb:off
  3. Press Ctrl+X or F10 to boot.

Assigning Static IP in Debug Shell (If DHCP is Unavailable)

If your datacenter environment does not offer DHCP on the management network, configure network parameters directly in the debug prompt:

ip addr add 192.168.1.50/24 dev enp2s0f0
ip route add default via 192.168.1.1 dev enp2s0f0
echo "nameserver 1.1.1.1" > /etc/resolv.conf

How to Install Matching Linux Kernel Headers on Sangoma OS (FreePBX Distro)

When running the FreePBX Sangoma OS distro inside a VirtualBox virtual machine, installing VirtualBox Guest Additions fails with "Kernel headers not found for target kernel" even after installing kernel-devel and kernel-headers via yum.

Root Cause: In FreePBX Sangoma OS installations, the build directory symlink /lib/modules/$(uname -r)/build is missing from the active kernel directory.

The 1-Line Fix

Create the missing build symlink pointing to the kernel source directory:

# 1. Install development packages
yum install dkms gcc kernel-devel kernel-headers -y

# 2. Fix the missing module build symlink
ln -s /usr/src/kernels/$(uname -r) /lib/modules/$(uname -r)/build

# 3. Mount and build Guest Additions
mount /dev/cdrom /media/cdrom
cd /media/cdrom
./VBoxLinuxAdditions.run

The kernel module compilation will complete cleanly, enabling dynamic display resizing and shared folders.

Tuesday, December 15, 2020

How to Compile and Install the Latest Tesseract OCR 4/5 on Debian 11 (Bullseye)

Tesseract OCR is Google's optical character recognition engine. Compiling the latest upstream release directly on Debian 11 ensures access to LSTM neural network model improvements and enhanced UTF-8 language model accuracy.

Prerequisites: Leptonica image processing library • Autotools • C++17 compiler

Build and Installation Commands

# 1. Install build headers and Leptonica
sudo apt-get update
sudo apt-get install g++ autoconf automake libtool pkg-config   libpng-dev libjpeg62-turbo-dev libtiff5-dev zlib1g-dev libleptonica-dev -y

# 2. Download and compile Tesseract
VERSION="4.1.1" # Or latest 5.x release
cd /usr/src
wget https://github.com/tesseract-ocr/tesseract/archive/${VERSION}.tar.gz
tar -zxf ${VERSION}.tar.gz
cd tesseract-${VERSION}

./autogen.sh
./configure --prefix=/usr/local
make -j$(nproc)
sudo make install
sudo ldconfig

# 3. Download traineddata language models (e.g., English and Persian/Arabic)
cd /usr/local/share/tessdata
sudo wget https://github.com/tesseract-ocr/tessdata_fast/raw/main/eng.traineddata
sudo wget https://github.com/tesseract-ocr/tessdata_fast/raw/main/fas.traineddata

Sunday, December 13, 2020

Connecting USB GSM / 3G / 4G Dongles to Raspberry Pi 4 (Huawei E303, usb-modeswitch, and Gammu)

USB cellular modems (such as the ubiquitous Huawei E303, E173, and E3372) enable Raspberry Pi 4 projects to send SMS notifications, handle emergency alerts, and provide cellular backup connectivity. However, modern USB modems initially boot into a virtual CD-ROM storage mode (ZeroCD) to deliver Windows drivers, requiring usb-modeswitch to toggle them into serial modem mode.

Hardware: Raspberry Pi 4 • Huawei E303 USB Dongle • usb-modeswitch • Gammu SMS Gateway

1. Installing usb-modeswitch and Gammu

sudo apt-get update
sudo apt-get install usb-modeswitch usb-modeswitch-data gammu minicom -y

2. Switching from Mass Storage to Modem Mode

Check lsusb to identify your device vendor and product ID:

# Example: ID 12d1:1f01 (Mass Storage Mode)
lsusb | grep Huawei

# Mode-switch into serial modem mode (12d1:1001 or 12d1:14db):
sudo usb_modeswitch -v 12d1 -p 1f01 -M '55534243123456780000000000000011062000000100000000000000000000'

Confirm the modem serial nodes are created under /dev/ttyUSB0, /dev/ttyUSB1, and /dev/ttyUSB2.

3. Sending a Test SMS via Gammu

Configure ~/.gammurc:

[gammu]
port = /dev/ttyUSB0
connection = at115200

Send an automated test message:

echo "Alert: Raspberry Pi online!" | gammu sendsms TEXT +1234567890

How Google Antigravity Solved the Mysterious NVIDIA Sleep Reboot on My Dell Inspiron 7567 (Ubuntu Linux)

If you run modern Ubuntu or Linux on a Dell Inspiron 15 Gaming (7567) or a similar 7th-gen Intel laptop paired with an NVIDIA GeForce GTX ...