AI-Now Linux — Engineering Journal
Date: 2026-11-24 (California local time)
Day: 01 — Genesis
Organization: AI-Now Technology, Inc.
Host: Baihu
Baseline: Linux From Scratch 13.1-systemd
Target: v0.1.0 — Genesis (planned)
Checkpoint: Chapters 1–3 complete; Chapter 4 not started.
1. Purpose and engineering philosophy
The project began as a return to Linux From Scratch after decades of computer engineering experience. Its purpose is not merely to install Linux, but to understand and control the construction of an operating system, establish a reusable distribution foundation, and eventually investigate kernel engineering. The initial deliverable is a bootable x86-64 command-line system, not a production-ready distribution.
The project will ultimately integrate original C, C++ and Python utilities. The first build is manual to establish a reference procedure; the second should automate that procedure; subsequent builds should support modular product configurations. This is a proposed strategy, not an implemented build engine.
2. Chapter 1 — Introduction and project definition
Created ~/Projects/ai-now-linux, initialized Git on main, and prepared docs, scripts, logs, images, profiles/personal and profiles/enterprise. The .gitignore excludes local disk images and logs. Empty directories are not tracked by Git unless they contain tracked files.
Selected the systemd edition of LFS. The exact baseline was subsequently confirmed as 13.1-systemd and pinned in Chapter 3. The initial target is a virtual machine rather than a physical disk, allowing experimentation without repartitioning the workstation. Proposed VM configuration: QEMU/KVM, legacy BIOS, four virtual CPUs and 4 GiB RAM. These VM settings have not yet been tested by booting the new system.
3. Chapter 2 — Preparing the host and target disk
3.1 Host qualification
Baihu runs Ubuntu 26.04.1 LTS, kernel 7.0.0-43, x86-64, Intel Core i9-11950H (8 cores / 16 threads), approximately 30 GiB RAM, and an ext4 NVMe filesystem with approximately 265 GiB available at inspection. The external NTFS disk had only about 18 GiB free and was not selected. Swap was nearly full (8 GiB), but the sampled vmstat did not indicate sustained swap traffic. This is a snapshot, not a guarantee of sufficient memory during compilation. KVM access was verified.
Installed missing host dependencies:
sudo apt install bison m4 texinfo qemu-system-x86 qemu-utils
The host compiler is GCC/G++ 15.2.0; Binutils 2.46; Make 4.4.1; QEMU 10.2.1. The official host check reported all checks OK, including Bash 5.3.9, Bison 3.8.2, Gawk 5.3.2, Python 3.14.4, Perl 5.40.1, Texinfo 7.2, UNIX98 PTY support and 16 logical processors. Host coreutils are uutils 0.10.0, not GNU coreutils; passing the version check does not prove all build scripts will behave identically.
The LFS host check requires appropriate shell and tool aliases. awk resolved to GNU awk and yacc to Bison. /bin/sh initially resolved to dash. sudo dpkg-reconfigure dash did not change the link; the reason was not established. We explicitly changed it:
sudo ln -sfn bash /bin/sh
This is a host-wide change, not an LFS-only change. It may affect other host scripts. Restore the original link after the LFS work if appropriate with sudo ln -sfn dash /bin/sh. Do not restore it during a build that depends on Bash semantics.
Downloaded the official host requirements page to /tmp/lfs-hostreqs.html, extracted the official version-check script using Python HTML unescaping and tag removal, and saved it as scripts/version-check.sh. The first extraction only printed the script; the next saved it and made it executable.
bash scripts/version-check.sh 2>&1 | tee logs/host-qualification.log
All checks passed. Proposed initial build parallelism is -j8, chosen conservatively given available RAM and other running applications; adjust based on observed memory pressure. No target compiler has been built yet.
Git checkpoint: 3565928 Initialize LFS host qualification.
3.2 Virtual disk and incident report
qemu-img create -f raw images/ai-now-linux.raw 80G
sudo losetup --find --show --partscan images/ai-now-linux.raw
The raw image has a logical size of 80 GiB (85,899,345,920 bytes), initially occupying only 4 KiB on the host. Sparse allocation saves host storage until blocks are written. Raw format was chosen for straightforward loop-device access; qcow2 is an alternative for VM snapshots, but is less direct for this workflow.
The assistant accidentally repeated the disk creation instructions, resulting in two loop mappings, /dev/loop19 and /dev/loop26, to the same backing inode 38703350. The user identified the duplication. Both mappings were unpartitioned and unmounted when checked. The duplicate was detached with sudo losetup -d /dev/loop26; verification showed only /dev/loop19 remained and the image still occupied 4 KiB. Recreating an existing raw image can destroy data. Future automation must check file existence, use losetup --nooverlap where appropriate, verify the backing file, and never assume loop numbers remain constant.
Physical disks /dev/nvme0n1 and /dev/sda were not partitioned or formatted.
3.3 Partitioning and filesystem
Used fdisk /dev/loop19 to create GPT, then a 2 MiB BIOS boot partition and a Linux filesystem partition occupying the remaining usable space. Wrote the partition table only after inspecting it.
| Partition | Sectors (512 bytes) | Purpose |
|---|---|---|
| loop19p1 | 2048–6143 | BIOS boot, 2 MiB, no filesystem |
| loop19p2 | 6144–167770111 | Linux root filesystem |
GPT identifier: C813F538-0FA2-4037-9632-479917CC602E.
The BIOS boot partition reserves space for GRUB’s embedded core image when booting GPT with legacy BIOS. It is not an EFI System Partition. UEFI would require a different boot layout. GRUB has not yet been installed.
sudo mkfs.ext4 -L AINOW-ROOT /dev/loop19p2
sudo mkdir -p /mnt/lfs
# Verified mountpoint was not mounted and directory was empty.
sudo mount /dev/loop19p2 /mnt/lfs
export LFS=/mnt/lfs
Verified ext4 UUID cf7b7e99-cf6b-470d-9fe1-87b9742e72af, read/write mount, 20,970,496 4 KiB blocks, 5,242,880 inodes and a 131,072-block (512 MiB) journal. df reported 79G total and 75G available; the image occupied 519M on the host after formatting. The journal supports filesystem crash recovery; lost+found supports recovery of disconnected filesystem objects. Default filesystem settings and reserved blocks were retained. No custom tuning or swap partition was introduced.
4. Chapter 3 — Packages and patches
The initial grep -i '<title>' command returned only the opening HTML tag because the title spanned lines. A subsequent context search found the section title, and searching for Linux From Scratch|Version confirmed the actual book version: 13.1-systemd.
export LFS=/mnt/lfs
mountpoint -q "$LFS" && sudo mkdir -pv "$LFS/sources" && sudo chmod -v a+wt "$LFS/sources"
The mount guard prevents accidentally creating build directories on the host root filesystem. Mode 1777 permits shared writing while the sticky bit restricts deletion/renaming of other users’ entries. Verified drwxrwxrwt root root.
Pinned the exact upstream source list and checksums in a project-specific manifests/ directory:
mkdir -p manifests
export LFS_VERSION=13.1-systemd
export LFS_BOOK="https://www.linuxfromscratch.org/lfs/view/$LFS_VERSION"
printf '%s\n' "$LFS_VERSION" > manifests/lfs-version.txt
wget -O manifests/wget-list-systemd "$LFS_BOOK/wget-list-systemd" &&
wget -O manifests/md5sums "$LFS_BOOK/md5sums"
mountpoint -q "$LFS" && wget --input-file=manifests/wget-list-systemd --continue --directory-prefix="$LFS/sources"
cp manifests/md5sums "$LFS/sources/"
( cd "$LFS/sources" || exit 1; md5sum -c md5sums )
mountpoint -q "$LFS" && sudo chown root:root "$LFS"/sources/*
Both manifests returned HTTP 200; 94 lines each, 6,085 and 5,160 bytes respectively. Downloaded 94 files (86 archives and 8 patches), 628M, in 7m 11s wall time (5m 48s transfer time). All 94 checksum results were OK. Source directory contained 95 files including the checksum manifest. Root ownership was applied without a reported error. MD5 detects accidental corruption but is not a modern authenticity guarantee; future distribution infrastructure should use strong hashes and signed metadata. The manifest directory is our project convention, not an LFS requirement.
Git checkpoint: 87f58eb Pin LFS 13.1-systemd source manifest.
4.1 Why the packages exist
A Linux distribution is assembled from cooperating layers: kernel, userspace ABI and libraries, toolchain, system services, shell utilities, and applications. Not every downloaded component is required at runtime; some exist to build, test or document the system. The kernel provides system calls, scheduling, memory management and device access; Glibc supplies the userspace C library and dynamic loader. GCC, Binutils and their mathematical dependencies establish the compiler toolchain. Systemd initializes and supervises services; GRUB loads the kernel. Bash and utilities provide an interactive operating environment. Build ordering matters because the compiler and libraries must be bootstrapped without accidental dependence on the host.
The appendix inventories every verified download with its purpose. Detailed dependency edges, configuration flags, installation and verification will be documented when each component is actually built. Do not confuse downloaded packages with installed packages.
5. Architectural insight — From DOS to Linux
The project owner recognized the overall construction sequence from earlier personal computer experience: FDISK, FORMAT C:, SYS C:, then install the necessary operating environment. The analogy is conceptual: DOS SYS transfers existing boot/system files, whereas LFS compiles a toolchain and userspace, builds a kernel and installs a bootloader. At today’s checkpoint we have only prepared the disk and downloaded sources, not performed the equivalent of a successful SYS C:.
Likewise, Windows 3.1 running above DOS recalls a graphical environment above a Linux base system. WIN and startx are useful historical parallels, not architectural equivalences. Windows 3.1 includes more than window management; X11 separates display server and window manager, while a Wayland compositor combines display and composition responsibilities. The GUI is a choice of interface rather than the entirety of the operating system. Possible interfaces include pure CLI, KMSCON/TUI, Openbox/X11, Sway/Wayland, and an AI-native voice/vision/agent interface. A custom C/C++ window manager is another research possibility.
Prior DOS and embedded/Yocto experience makes basic disk and package operations familiar. Future teaching should accelerate routine work while retaining engineering documentation, and focus on toolchain bootstrap, kernel configuration, boot, system services, dependency management and automation. LFS is useful even if the underlying architecture is already understood.
6. Distribution design — One Core, Multiple Profiles
The owner explicitly requested these future command interfaces:
./build.sh --profile personal
./build.sh --profile enterprise
./build.sh --profile embedded
./build.sh --profile ai-appliance
Personal targets workstations/development; enterprise targets servers and infrastructure; embedded targets dedicated devices and industrial systems; ai-appliance targets AI compute and agent interfaces. All share a common foundation where practical; profiles select packages, kernel configuration, hardware support, services, security policies and applications. Cross-architecture support is a future goal, not demonstrated.
Proposed repository structure (not all directories exist yet):
ai-now-linux/
build.sh
core/
manifests/
profiles/{personal,enterprise,embedded,ai-appliance}/
packages/
configs/
scripts/
images/
logs/
docs/
LFS provides a transparent baseline; Yocto provides mature recipe/layer-based embedded image construction. Our project can learn from both without claiming to replace Yocto. Potential commercial direction: end-to-end system solutions, including custom hardware, operating systems and AI software for devices such as AION and Neris systems. Maintainability, reproducibility, security updates, package management, licensing compliance and rollback must be designed before commercial deployment.
7. USB Network Build Installer — proposed
The owner proposed booting from USB and constructing a desired Linux system from the network. A minimal bootable environment would detect CPU, GPU, storage and networking, retrieve signed manifests from an AI-Now repository, accept a profile or custom configuration, then download, build, configure and install the selected system. A terminal interface is sufficient.
Three proposed modes: binary installation for speed, source build for maximum customization, hybrid build for prebuilt base components plus selected source rebuilds. This resembles aspects of Debian netinstall, Gentoo and Yocto. A source build needs sufficient temporary disk, memory, CPU time and reliable networking; embedded targets may require cross-compilation on a separate host. A hybrid system needs compatible ABIs and dependency resolution. A USB installer must explicitly confirm the destination disk before destructive operations, support BIOS/UEFI as applicable, validate signatures, and handle interruptions and recovery.
Configuration-as-code could allow ./build.sh --config neris-a.yaml, with declarative architecture, kernel, packages, interface and AI runtime selections. This is a design concept, not a supported command yet.
Tentative assistant-proposed milestones: 0.1 Genesis bootable CLI; 0.2 automated build engine; 0.3 profiles; 0.4 binary repository; 0.5 USB network installer; 0.6 hardware-aware configuration; 1.0 mature customizable distribution. These are not release commitments.
8. Kernel engineering research direction
The owner identified kernel development as a deeper interest. Distribution engineering assembles a system; kernel engineering implements or modifies its privileged core. Finish the LFS baseline as an experimental platform. Separately investigate whether to modify Linux or write an original educational kernel; no choice has been finalized.
Proposed original-kernel study sequence: bootable hello world; serial console; GDT/IDT and exceptions; hardware interrupts; physical memory allocator; paging; scheduling; user mode and syscalls; VFS; shell and user programs; SMP; networking. Suggested tools are C, x86-64 assembly, GNU toolchain, QEMU, GDB and Vim. None of these original-kernel milestones has been implemented.
9. GitHub publication and closeout
Created English README identifying AI-Now Technology, Inc. and describing the Genesis target and planned profiles. The first git add README.md failed because the file had not yet been created. Created it in Vim and committed successfully: 536d2ba Introduce AI-Now Linux project (79 lines).
Attempted gh repo create ainow/ai-now-linux --public --source=. --remote=origin --push; GitHub rejected the request because johntsaiainow could not create a repository under ainow. The assistant had assumed the namespace without verifying permissions. The owner agreed to use the personal account because of their relationship to the company. Proposed destination: https://github.com/johntsaiainow/ai-now-linux. Successful creation/push is not present in the supplied log and remains unverified. Public visibility was proposed; project licensing remains undecided. Do not publish raw logs containing private paths or temporary signed download URLs.
10. Acceptance and next session
Before resuming, check the actual loop mapping and mount, available RAM/disk and current Git status. Do not recreate or reformat the existing image. Follow the pinned LFS book for Chapter 4, and distinguish upstream requirements from project-specific choices. For every subsequent package record purpose, necessity, dependencies, build order, configuration flags, installation, verification and customization opportunities.
References: Pinned LFS book, local terminal transcripts dated November 24 California time, and today’s project design discussion. No external verification of GitHub publication was performed.
Appendix A — Verified source inventory and functional roles
The filenames below are extracted from the 94 successful checksum lines in the terminal transcript. Functional descriptions are engineering explanations, not evidence of installation or an exhaustive dependency graph.
| Verified file | Purpose |
|---|---|
acl-2.4.0.tar.xz |
Access control lists |
attr-2.6.0.tar.gz |
Extended attributes |
autoconf-2.73.tar.xz |
Configure script generator |
automake-1.18.1.tar.xz |
Makefile generator |
bash-5.3.tar.gz |
Shell |
bc-7.0.3.tar.xz |
Calculator |
binutils-2.47.tar.xz |
Assembler and linker |
bison-3.8.2.tar.xz |
Parser generator |
bzip2-1.0.8.tar.gz |
Compression |
coreutils-9.11.tar.xz |
Core utilities |
dbus-1.16.2.tar.xz |
Message bus |
dejagnu-1.6.3.tar.gz |
Test framework |
diffutils-3.12.tar.xz |
File comparison |
e2fsprogs-1.47.4.tar.gz |
Ext filesystem tools |
elfutils-0.195.tar.bz2 |
ELF tools |
expat-2.8.3.tar.xz |
XML parser |
expect5.45.4.tar.gz |
Interactive test automation |
file-5.48.tar.gz |
File identification |
findutils-4.11.0.tar.xz |
File search |
flex-2.6.4.tar.gz |
Lexer generator |
flit_core-4.0.2.tar.gz |
Python build backend |
gawk-5.4.1.tar.xz |
AWK |
gcc-16.2.0.tar.xz |
C/C++ compiler |
gdbm-1.26.tar.gz |
Key-value database |
gettext-1.0.tar.xz |
Localization |
glibc-2.44.tar.xz |
C library and loader |
gmp-6.3.0.tar.xz |
Integer arithmetic |
gperf-3.3.tar.gz |
Perfect hash generator |
grep-3.12.tar.xz |
Text search |
groff-1.24.1.tar.gz |
Typesetting |
grub-2.14.tar.xz |
Bootloader |
gzip-1.14.tar.xz |
Compression |
iana-etc-20260805.tar.gz |
Network service data |
inetutils-2.8.tar.gz |
Network utilities |
iproute2-7.1.0.tar.xz |
Routing tools |
jinja2-3.1.6.tar.gz |
Console tools |
kbd-2.10.0.tar.xz |
Kernel module tools |
kmod-34.2.tar.xz |
Pager |
less-704.tar.gz |
Capabilities |
libcap-2.78.tar.xz |
Foreign function interface |
libffi-3.8.0.tar.gz |
Pipeline library |
libpipeline-1.5.8.tar.gz |
Library build tools |
libtool-2.6.2.tar.xz |
Password hashing |
libxcrypt-4.5.2.tar.xz |
Kernel and headers |
linux-7.1.8.tar.xz |
Fast compression |
lz4-1.10.0.tar.gz |
Macro processor |
m4-1.4.21.tar.xz |
Build executor |
make-4.4.1.tar.gz |
Manual reader |
man-db-2.13.1.tar.xz |
API documentation |
man-pages-6.18.tar.xz |
Template engine |
markupsafe-3.0.3.tar.gz |
HTML escaping |
meson-1.12.0.tar.gz |
Build configuration |
mpc-1.4.1.tar.xz |
Complex arithmetic |
mpdecimal-4.0.1.tar.gz |
Decimal arithmetic |
mpfr-4.2.2.tar.xz |
Floating point arithmetic |
ncurses-6.6.tar.gz |
Terminal UI |
ninja-1.13.2.tar.gz |
Build executor |
openssl-4.0.1.tar.gz |
TLS and crypto |
packaging-26.3.tar.gz |
Python packaging metadata |
patch-2.8.tar.xz |
Patch utility |
pcre2-10.47.tar.bz2 |
Regex library |
perl-5.44.0.tar.xz |
Scripting language |
pkgconf-3.0.5.tar.xz |
Build flag discovery |
procps-ng-4.0.7.tar.xz |
Process monitoring |
psmisc-23.7.tar.xz |
Process utilities |
Python-3.14.7.tar.xz |
Python runtime |
python-3.14.7-docs-html.tar.bz2 |
Python documentation |
readline-8.3.tar.gz |
Line editing |
sed-4.10.tar.xz |
Stream editor |
setuptools-84.0.0.tar.gz |
Python build tools |
shadow-4.20.2.tar.xz |
Account management |
sqlite-autoconf-3530400.tar.gz |
SQL database |
sqlite-doc-3530400.zip |
SQL documentation |
systemd-261.2.tar.gz |
Init and service management |
systemd-man-pages-261.2.tar.xz |
Systemd documentation |
tar-1.35.tar.xz |
Archive utility |
tcl8.6.18-src.tar.gz |
Tcl runtime |
tcl8.6.18-html.tar.gz |
Tcl documentation |
texinfo-7.3.tar.xz |
Documentation tooling |
tzdata2026c.tar.gz |
Time zone data |
util-linux-2.42.2.tar.xz |
System utilities |
vim-9.2.1025.tar.gz |
Editor |
wheel-0.48.0.tar.gz |
Wheel packaging |
xz-5.8.3.tar.xz |
Compression |
zlib-1.3.2.tar.gz |
Deflate compression |
zstd-1.5.7.tar.gz |
Zstandard compression |
bzip2-1.0.8-install_docs-1.patch |
Bzip2 documentation patch |
coreutils-9.11-i18n-1.patch |
Coreutils localization patch |
expect-5.45.4-gcc15-1.patch |
Expect GCC compatibility patch |
glibc-2.44-upstream_fixes-1.patch |
Glibc upstream fixes |
glibc-fhs-1.patch |
Glibc hierarchy patch |
kbd-2.10.0-backspace-1.patch |
Console backspace patch |
Python-3.14.7-openssl_4-1.patch |
Python OpenSSL compatibility patch |
tar-1.35-acl_fix-1.patch |
Tar ACL patch |
End of Day 01 — From source code to independent systems.