Fading Coder

One Final Commit for the Last Sprint

Building Static and Shared Libraries with GCC on Linux

Static libraries bundle multiple object files into a single archive, while shared libraries defer symbol resolution until load or runtime. Both forms are comon on Linux and can be produced with GCC and standard binutils. Inspecting a system static library Static archives are regullar files with the...

VXLAN on Linux: Point-to-Point Tunnels and Cross-Host Docker Networking

Linux VXLAN support The in-kernel VXLAN driver landed in Linux 3.7 (2012). Produtcion deployments typical target ≥3.9/3.10 for maturity and feature coverage. The driver supports IPv4/IPv6 underlay, unicast and multicast flood/learn, and integrates with iproute2. Check availability by inspecting ipro...

FAT12 on 1.44 MB Floppy Images: Layout, Metadata, and a Linux Walkthrough

FAT12 on 1.44 MB media organizes space using clusters (allocation units), which are made of one or more sectors; sectors are the smallest addressable blocks. A standard 3.5" floppy uses 80 cylinders × 2 heads × 18 sectors per track × 512 bytes per sector = 2880 sectors (1,474,560 bytes). Logica...

ARM Linux Memory Layout and MMU Configuration: Device Tree, Memblock, and Page Tables

Kernel virtual address map on 32‑bit ARM PAGE_OFFSET: base of kernel virtual space at 0xC000_0000 lowmem: direct linear mapping of RAM into the kernel (virt = phys + PAGE_OFFSET); capped at 896 MiB HIGH_MEMORY: first virtual address not linearly mapped (end of lowmem) pkmap: permanent mappings for h...

Linux C/C++ Socket Programming by Example: TCP/UDP Chat, select, Threads, Timers, and fork

TCP Chat over a Local Network Minimal TCP Echo Server (C) #include <arpa/inet.h> #include <errno.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <sys/types.h> #include <unistd.h&...

Deploying Snort with Barnyard2 and BASE on Ubuntu Linux

Installing and wiring Snort, Barnyard2, and BASE on Ubuntu to build a basic network intrusion detection stack (LAMP + Snort + Barnyard2 + BASE). The steps assume Ubuntu 18.04 and a user with sudo privileges. Environment Example host: 1 vCPU, 2 GB RAM, 40 GB disk OS: Ubuntu 18.04 Network interface in...

Configure Samba to Share Users’ Home Directories

1. Install required packages On Debian/Ubuntu systems: sudo apt-get update sudo apt-get install -y samba samba-common-bin openssh-server 2. Enable the per-user home share in smb.conf Back up the current configuration, then edit it: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup sudo nano /et...

Fix dpkg warnings about missing files list for packages

When apt/dpkg reports messages like "files list file for package … missing; assuming package has no files currently installed", it usually means the package’s .list metadata under /var/lib/dpkg/info is gone. The safest fix is to reinstall the affected packages. Below is a small workflow an...

Accessing Physical Memory with /dev/mem and mmap on Linux

Accessing Physical Memory with /dev/mem and mmap on Linux Overview For low-level debugging and register poking, user-space can reach device registers or RAM by mapping physical addresses through /dev/mem. Tools like devmem do this by invoking mmap on the /dev/mem character device, establishing a vir...

Zabbix Troubleshooting Guide: Frequent Errors and Practical Fixes

1. Agent fails to start, PID file missing, semaphore errors Sample logs: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) after start zabbix-agent.service never wrote its PID file. Failing Agent log indicates IPC/semaphore allocation failure: zabbix_agentd[5922]: cannot open log: cannot cr...