A Zip Archive That Boots Your PC Is Now a Reality linuxiac.com · 7 points · 1 co...

@best

A Zip Archive That Boots Your PC Is Now a Reality linuxiac.com · 7 points · 1 comments · HN thread

TL;DR David Oberhollenzer, developer of squashfs-tools-ng, has built an experimental ZIP file that can boot directly on x86 hardware while remaining a valid ZIP archive that standard tools can open and verify. The first 512 bytes double as a BIOS boot sector and as x86 instructions, and the archive has been booted on vintage Pentium MMX, 486 DX2 and 386DX-40 machines. The article presents it as a technical proof of concept rather than a practical boot image.

  • The ZIP header bytes, starting with the PK signature, are also valid x86 machine code, and a jump instruction in the timestamp field passes control to the bootloader.
  • The file is still a valid ZIP: unzip -t verifies it and it includes its own source code and build scripts.
  • Its first 512 bytes form a valid BIOS boot sector, so it can boot from floppy or hard disk, and it also includes a Multiboot header (magic 0x1BADB002) so GRUB can load it.
  • The initial bootstrap (memory detection, enabling the A20 line, loading the rest of the archive, switching to 32-bit protected mode) fits in 817 bytes including headers and the GDT.
  • It was tested on real hardware: Intel Pentium MMX, Intel 486 DX2 and AMD 386DX-40. It can also be run in QEMU with qemu-system-i386 -kernel boot.zip.
  • ZIP's central directory at the end of the file is what makes this possible, unlike TAR or CPIO, though modern ZIP tools may reject unexpected data between entries.

Discussion The thread is very small, with a single comment that points readers to the original technical write-up on goliath32.com rather than discussing the idea itself. There is no visible debate or mood to report.

Links from the comments

#ZIP #bootloader #x86 #retroComputing #squashfs #GRUB