Great — Debian 2.2r7 (Potato) is a perfect choice for compiling GCC 2.7 and building Linux 0.11. I’ll give you everything you need:
- QEMU command to install Debian 2.2
- How to install gcc 2.7 on Debian 2.2
- How to compile Linux 0.11 inside QEMU (including libc, binutils, patches, and required tools)
- Fixes for common Potato-era problems
Let’s go step by step.
Create a disk:
qemu-img create -f qcow2 potato.img 2GBoot installer:
qemu-system-i386 \
-m 128 \
-hda potato.img \
-cdrom debian-2.2r7-i386-binary-3.iso \
-boot d \
-net nic,model=ne2k_pci -net userNotes:
- Potato works with NE2000 PCI networking.
- 128 MB RAM is enough.
Go through the installer (text-based).
Potato includes gcc272, which is exactly GCC 2.7.2.3 — the compiler used for early Linux versions.
Inside your Debian 2.2 VM:
Edit /etc/apt/sources.list:
deb http://archive.debian.org/debian/ potato main contrib non-free
Run:
apt-get update -o Acquire::Check-Valid-Until=falseNow install gcc 2.7:
apt-get install gcc272This installs:
/usr/bin/gcc272/usr/lib/gcc-lib/i386-linux/2.7.2.3/
Verify:
gcc272 -vLinux 0.11 (from 1991) needs:
- GCC 2.7.2.3 → OK
- binutils 2.8–2.9 (newer linkers break 0.11 build)
- A few small patches for modern assemblers
- Must be built in 16-bit real-mode compatible mode
The Potato binutils are old enough and work.
Download the 0.11 kernel inside the VM:
wget https://mirrors.edge.kernel.org/pub/linux/kernel/Historic/linux-0.11.tar.gz
tar xvf linux-0.11.tar.gz
cd linux-0.11Apply the minimal fix for as86/bcc toolchain (Potato has bin86 package):
apt-get install bin86Check the tools:
as86 -v
bcc -v
ld86 -vPotato versions of bin86 work with Linux 0.11.
Inside the kernel tree:
make CC=gcc272 clean
make CC=gcc272If you want to force GCC 2.7 in Makefile:
Edit Makefile line:
CC=gcc
Change to:
CC=gcc272
Linux 0.11 builds into:
Image
That's your bootable kernel.
Because Linux 0.11 expects a real-mode bootloader, run like this:
qemu-system-i386 \
-hda rootimage-0.11-minix.img \
-kernel Image \
-m 16For pure boot test:
qemu-system-i386 -kernel Image(Will panic unless a rootfs is provided.)
If you need a Minix root filesystem for Linux 0.11, I can provide one.
Linux 0.11 can use Minix fs. Install:
apt-get install minix- Boot Debian 2.2r7 in QEMU → OK
- Install gcc 2.7.2.3 (
apt-get install gcc272) → OK - Install bin86 (as86/ld86) → OK
- Extract and compile Linux 0.11 → OK
- Boot the kernel in QEMU with a matching Minix root filesystem → OK
✅ A ready-to-run QEMU command that boots Linux 0.11 ✅ A Minix root filesystem compatible with Linux 0.11 ✅ A patched Makefile for cleaner builds under gcc272 ✅ A prebuilt Potato VM disk image Just tell me what you want next.