11 ms·
Gray386Linux – Linux for 386 Machines
- marmolak 4y agoAble to be booted via network with current (2022) busybox userland.
- anthk 4y agoFor a 486 I'd use NetBSD with ctwm. On support, it's odd no one tested Alpine Linux on a 486, necause Alpine will run perfectly on it. No, Nix, no complex setup, a huge repo of packages. Alpine Linux with a patched X for VLB/ISA: https://github.com/scanlime/avc-edge-linux https://github.com/scanlime/avc-edge-linux
- marmolak 4y agoYeah, but 486 is not 386. Nix is used to preserve development environment of linux kernel. Without nix, setup would be much, much more complex. Thank you for info about avc-edge-linux. Going to take a look :).
- contingencies 4y agoSerious question: if you are that in to Linux on old boxes, why not just run period distributions? https://en.wikipedia.org/wiki/Slackware#Releases https://en.wikipedia.org/wiki/Slackware#Releases is a good breakdown of history.
- marmolak 4y agoIt's easy. There seems to be nothing directly support i386 (I mean: real 386 chip) with latest supported kernel version (as I know) and newest busybox. i386 doesn't support cmpxchg instruction for example and I'm not able (maybe someone can help) to force gcc 12 not to emit these instructions. So I added some kind of emulation of cmpxchg (code is very straightforward and stupid. Only few combinations are supported because it just works for me now). And linux itself it's another story. 3.7.10 should be last with real i386 support, but it's not that much true :). Because I wasn't able to compile 3.7 kernel without some hacks. Main goals were: 1) use as newest software as possible 2) be able to boot from network with 4 MB RAM (8 MB RAM is much better) on real hardware. Also, this distro can be used to bootstrap machines with prepared dos images or other operatin systems. Don't get me wrong. I love floppy disks however I'm too lazy to install systems from them.
- contingencies 4y agoOK, I see the general approach. Some sort of hack to get modern code to run on CPUs without the normally assumed instruction set present. Perhaps consider writing "what problem does this solve" and "how does it solve it" and "why is this approach a good one" at the top of your repo. It would help to generate interest.
- marmolak 4y agoGood point. Thanks. Note to my TODO added.
- hulitu 4y agoHm. "Install nix. --disable-shadow". musl. Better run an old distribution. Anyone knows where can i find 386, 486 era computers besides ebay ?
- anthk 4y agoUse qemu, -cpu 486, -vga cirrus, -soundhw sb16
- marmolak 4y agoBut this emulates 486 systems and not precisely. For example, endbr32 instruction is not a problem under emulation but it's real issue on real i386/i486 hw. Simply because real 386/486 cpus doesn't support multi nop instructions.
- marmolak 4y agoOld distribution with old userspace :). I understand that it looks hard. But you can download precompiled kernel and initrd. Yeah, there is only busybox for now.
- MisterTea 4y ago> Anyone knows where can i find 386, 486 era computers besides ebay ? Older businesses and factories. I saved tons of 386/486/pentium stuff form my workplace. Though I was lucky because my predecessor was a pack rat and never threw anything out.
- ok123456 4y agoThis might be a case for PCEm. https://www.pcem-emulator.co.uk https://www.pcem-emulator.co.uk
- hulitu 4y agoI extensively tested PCem. A lot of the systems do not work. Though i found a Socket 7 Asus Pentium MMX that was able to boot a particular Slackware (10 i think)
- magnat 4y ago> Currently, it's not possible to run gray386linux on i486 machines (but it's possible to run gray386linux on Cyrix 486DLC and similar CPUs) What's the cause? Incompatible/missing peripheral or some breaking changes in instruction set?
- marmolak 4y agoHi. I don't know for now. There is ton's of issues while switching to protected mode (ipxe for example: https://github.com/ipxe/ipxe/commit/bc35b24e3ebd2996b2484b7f9ceb96a3cf25823a https://github.com/ipxe/ipxe/commit/bc35b24e3ebd2996b2484b7f...). It just stuck when I select it from PXE menu and I didn't debugged it further. Maybe someone can figure it out and send patches or advices. Also it's not my goal to run gray386linux on i486 machines because I have another distribution: gray486linux, which aims specially to systems with 486 CPUs.
- andrewf 4y agoBut what about folks who want to give their 386DX system a speed boost with RapidCAD? Will they have to re-install their OS? :) https://www.youtube.com/watch?v=UM4NPh5qg8Y https://www.youtube.com/watch?v=UM4NPh5qg8Y But seriously this stuff is very subtle. An issue (probably different) from a HN thread on similar matters: https://news.ycombinator.com/item?id=30801836 https://news.ycombinator.com/item?id=30801836
- helf 4y agosnort The RapidCAD is pretty amusing since it’s literally just a castrated 486 (no L1! Eek!) The Cyril gray top FastMath FPU is the best bet for an upgrade and still being a real 386 (I’m hunting for one for mine ) - https://www.vogons.org/viewtopic.php?t=65991 https://www.vogons.org/viewtopic.php?t=65991
- pajko 4y agoThis hack might be a cause: https://github.com/marmolak/gray386linux/commit/81f9adb4656f27e9828cea791d7ebe14a390f2ed https://github.com/marmolak/gray386linux/commit/81f9adb4656f...
- SoftTalker 4y agoOpenBSD still builds releases for i386. I don't know for how much longer; they note that "Due to the increased usage of OpenBSD/amd64, as well as the age and practicality of most i386 hardware, only easy and critical security fixes are backported to i386. The project has more important things to focus on." https://www.openbsd.org/i386.html https://www.openbsd.org/i386.html
- marmolak 4y agoNot all i386 in name are real 386. Sometimes they think about i586 or i686 (which is way how to mark generations of CPU). From provided page: Processors All CPUs compatible with the Intel Pentium or later, with Intel-compatible hardware floating point support should work. So no support for real 386 CPU.
- chungy 4y agoOpenBSD dropped support for the 80386 around 2005, and the 80486 sometime later. The arch name i386 doesn't actually mean 386.
- vikingerik 4y agoRight. In this context, i386 really means the 32-bit x86 architecture, as opposed to 64-bit. I don't know of any architectural differences that would require a Pentium over a 386 or 486 (besides a FPU.) The Pentium runs the same software in the same memory and address space, just faster. Unless something requires Pentium MMX or SSE instructions.
- selimthegrim 4y agoAn Iranian film buff, I see.
- helf 4y agoOh sweet! I actually just pulled my childhood 386 out of storage :D It’s just a SX 40 with 12mb of ram tho. I need to get a 387 for it and more memory. This is great! edit Crap just saw the actual cpu compat list. Dammit. edit again Ok wait I was confused by someone else. This /will/ work on my 386. Yessss
- marmolak 4y agoGreat! But don't expect much for now. But personally, I'm happy with result, because I'm able to deploy dos machines with bigger HDDs (with help of XTIDE bios - still playing around) or just put dos images to HDDs via network without too much time spend with real hw. Don't get me wrong. I really like real hw but prepare basic machine setup is soooo convenient in virtual environment nowadays. Also, booting real 386 via network... My childhood dreams come true ;P.
- helf 4y agoYes! I can’t wait to try it out soon. I have an NE2000 ISA NIC in mine. So I’ll be able to give that a go. I’ve been wanting to do some upgrades to it for awhile so now I have an excuse xD
- helf 4y agoBtw, what are you future plans? Do you plan on an X system or?
- marmolak 4y agoX would be great addition. Someone here point me to linux distro for 486 machines with working X. However, I don't think it will be bootable from network with full X window and window manager support. So I need to find a way how to use network storage. BTW: only few ethernet cards are supported now (3com fan here ;)). Maybe I can enable support for NE2000 compatible clones, because it was very common.
- marmolak 4y agoAnd another plan is to review my patches for 3.7.10 kernel, because it's just bunch of hacks and I still learn much more from work on them. Basically, main goal has been: make machine with 3COM card with lanworks proprietary boot rom boots from network on old machine... but what do I going to boot? As a side effect of this effort were gray486linux born (yep. It was first). After some issues (CET instructions emited by gcc aka multinop instructions not supported by i486) it finally booted. Then... how hard it can be to do the same on 386 machine ;P. It was harder and I learned tons of stuff during the process. Also. I would like to have something small which still can be booted over network and I can deploy prepared base images with DOS/Windows 3.11 etc... just that easy (with help of Ontrack or XTIDE bios). Or I can deploy prepared Windows NT 4.0, because it looks like my SCSI cdrom died on one of my machines. But if you have some ideas what to do with it, don't hesitate and let me know.