The build
The recipe
Seven scripts, run in order. No glibc build: the initramfs reuses the host’s glibc libraries.
./fetch.sh # upstream sources into downloads/
bash wsl-prereqs.sh # host toolchain + QEMU + fakeroot (root once)
bash build-busybox.sh # suid (11 applets) + nosuid (221) into dist/
bash build-kernel.sh # TC 6.6.8 kernel into dist/bzImage-6.6.8-tc
bash assemble-core.sh # Core-scripts + busybox + host glibc + users into dist/core.gz
bash boot-qemu.sh # boot in QEMU, serial log to file
bash embed-initramfs.sh # optional: kernel with embedded initramfsBUILD defaults to /root/tc-build and overrides with an argument.
boot-qemu.sh honors INITRD= and APPEND= overrides.
The seven bugs
Every one surfaced at boot. Every fix went back through QEMU before it counted.
- Dead init. The kernel panicked with no working init. The
lib64/ld-linuxsymlink dangled, and busybox is dynamically linked, so every exec failed. Fix: point the link at../lib/x86_64-linux-gnu/. - Missing mount.
/initandrcSfound no mount and no/proc. Upstream keeps mount in the 11-applet suid binary, and assembly had installed only the nosuid tree. Fix: installbusybox.suidand retarget its 11 applet links at it. - Hung boot. The boot hung after the udev stage.
tc-configwaits forever on/dev/zram0and/dev/rtc0, which nothing creates. Fix: boot withnozswap nortc, documented TinyCore escape hatches. - No serial console. Init respawned around a missing
/dev/ttyS0. The static/devhad no serial nodes. Fix:mknod ttyS0-3, with 666 perms on the console, null, and tty nodes. - Unknown users. A password prompt and
chown: unknown user/group tc:staff. Upstream ships no passwd, group, or shadow files. Fix: create root with no password and a locked-down tc (uid 1001:50), with/home/tcfromskel/. - Missing helpers.
rotdashand autoscan not found.tc-miscnever compiled, and its CFLAGS target i486, which modern gcc rejects. Fix: build the 3 non-X tools with overridden CFLAGS into/usr/local/bin. - Missing blkid.
rebuildfstabneeds blkid, disabled in the upstream nosuid config. Fix: enableCONFIG_BLKIDplusFEATURE_BLKID_TYPEinbuild-busybox.sh.