Skip to content

adabarbulescu/linux-from-scratch-12.4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

   .~.
   /V\
  // \\
 /(   )\
  ^`~'^
Linux From Scratch 12.4

Kernel GCC Glibc Build Time Packages Status

A complete GNU/Linux system compiled entirely by hand. Every binary. Every library. From nothing.


Built to understand the Linux boot process and toolchain at a level that using a distribution does not require. No package manager, no installer — every binary compiled in dependency order from source, on a clean VirtualBox VM running on Windows/WSL2.


The System

Neofetch

Build time Packages compiled Kernel panics survived GRUB failures overcome RAM at boot
~12 hours 80+ 2 5 142 MiB

What Happened

The process: download 80+ source tarballs, compile a cross-compiler from scratch, bootstrap an isolated chroot environment, compile every package in dependency order, configure and compile the kernel, install a bootloader, boot.

Three things went seriously wrong. All of them got fixed.

GRUB hit five distinct failure modes — missing efibootmgr, wrong platform target (BIOS vs UEFI), a parallel build race condition, VirtualBox EFI not enabled, then a wrong kernel path in grub.cfg. Each required understanding the system well enough to diagnose from the error message alone.

GRUB Shell Error

Full walkthrough

The first real boot kernel panicked.

Kernel Panic

VFS: Unable to mount root fs on unknown-block(0,0) — the SCSI and AHCI drivers were compiled as loadable modules, not built into the kernel. Without an initramfs, the kernel needs those drivers to mount the filesystem that contains those drivers. Circular dependency. Recovery: boot Ubuntu Server LiveCD, set up SSH, bind-mount virtual filesystems, chroot back into the broken system, reconfigure and rebuild the kernel.

Ubuntu Rescue Environment

Kernel Rebuild

Full walkthrough

Network interface named wrong — config said enp0s3, actual interface was eth0. One-minute fix after first login. → Details


First Successful Boot

Successful Boot

First Login


Configuration

Disk layout:

/dev/sda1   1 GB    /boot/efi   vfat    EFI System Partition
/dev/sda2   4 GB    [swap]
/dev/sda3   55 GB   /           ext4

Kernel options built-in (not modules — no initramfs):

CONFIG_BLK_DEV_SD=y    CONFIG_SATA_AHCI=y    CONFIG_EXT4_FS=y

Config files: configs/grub.cfg · configs/fstab


Repository

├── LESSONS-LEARNED.md
├── configs/          grub.cfg · fstab
├── troubleshooting/  grub-uefi.md · kernel-panic.md · network-interface.md
└── screenshots/      7 images documenting the build

LFS 12.4 Book · BLFS · Kernel Docs · GRUB Manual


February 2026 · Every package compiled by hand · Every failure debugged from first principles

About

Linux From Scratch 12.4 built from source in ~12 hours. Kernel 6.16.1, GCC 15.2.0, Glibc 2.42. Survived 2 kernel panics and 5 GRUB failures. Full troubleshooting docs included.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors