4 ms·
If you want to boot Debian on there you can actually build a complete Debian system from the package archives using either Debootstrap or Multistrap. Debootstra
by jschwartzi 6y ago
If you want to boot Debian on there you can actually build a complete Debian system from the package archives using either Debootstrap or Multistrap. Debootstrap is useful for building a Debian system inside of another Debian system, while Multistrap is useful for building a root filesystem to copy to another computer. If you can boot an initramfs then you can boot the root filesystem using pivot-root.
The Linux kernel can execute a shell script as PID1 from the initramfs, meaning that you can just execute the minimal commands needed to mount the main root filesystem and then use pivot-root to change from the linuxrc script in your initramfs to the main init process supplied in your main root filesystem.
You might have to get really creative with compression and static linking as the linker/loader clocks in at a few-hundred kilobytes, plus the gcc support library and the glibc for another few megabytes. Alternatively you could find a way to make the system calls directly and bypass the libc. Busybox will also fit on that disk and it ships with a mount command too, so you could get up and running with that pretty easily.
- drt1245 6y agoRecent versions of Debian require a 686. https://www.debian.org/releases/stable/i386/ch02s01.en.html#idm272 https://www.debian.org/releases/stable/i386/ch02s01.en.html#...
- quotemstr 6y agoWould it be feasible to just build a Debian image for the i486? Few packages should depend on something newer.
- asveikau 6y agoI don't know offhand what instructions were introduced in Pentium or later. Doing some googling... 486 had cmpxchg, that's good. Seems it didn't have rdtsc. It's not out of the question, I might say even pretty common, for user mode code to use that one via inline asm to implement a timer. Obviously no SIMD instructions. If they say they're supporting 686 or better they might have some compiler flags that depend on mmx or similar? SSE came late to P6.
- giantrobot 6y agoSince the modern Linux kernel doesn't make any promises of 486 support there's very likely plenty of places inline assembly uses instructions unavailable on a 486. So even if you compiled it with strict -march i486 you'd end up with unsupported instructions. Modern GCC also doesn't like emitting strict i386 or i486 code anymore so you'd be likely to end up with unsupported instructions even without any inline assembly.
- znpy 6y agoalso, this video features a 486 cpu because linux dropped 386 support a while ago. https://www.zdnet.com/article/good-bye-386-linux-to-drop-support-for-i386-chips-with-next-major-release/ https://www.zdnet.com/article/good-bye-386-linux-to-drop-sup...
- pan69 6y agoI was always under the impression that Linux 386 simply meant 32 bit support. So, no 386 support would mean no 32 bit support rather than the 386 specifically.
- Symbiote 6y agoNo, that's x86. They dropped 386 support, but a 486 still works.
- II2II 6y agoI have seen i386 being used in a couple of contexts. For example, Debian uses it to refer to the 32-bit port[1]. It also seemed to be used when various Linux distributions built Pentium optimized packages when that became a thing. In that case 386 would be used for earlier 32-bit processors and 686 would be used for later 32-bit processors. So the nomenclature is not always clear. [1] https://www.debian.org/releases/stable/i386/ https://www.debian.org/releases/stable/i386/
- twoodfin 6y agoAnyone know what in particular the 486SX had that the 386 didn’t to make keeping only the former alive practical? Unfortunately the kernel mailing list link in the zdnet article appears to be rotted away.
- BruiseLee 6y agoI believe 386 did not have certain "atomic" instructions like CMPXCHG or XADD. So in order to support 386, the kernel had to have special versions of all locking primitives just for 386.
- 6y ago