Installing Linux On a 386 Laptop
An anonymous reader writes with a link to Hack A Day's step-by-step guide to installing Linux on a 386 laptop, which looks like a nice rainy-day project, as long as you are a stubborn hardware collector. It gets complicated, though, because 386 support has long since disappeared from most mainstream distros, which is why the writer went with Debian 1.3.1.
So it's now considered a "hack" to install software onto a device it was meant to run on?!?!?
Considering how shite this summer's weather has been in central Europe, we would have had time to install gentoo from Stage 1 on a 386.
The Linux kernel and the GNU userland is afterall i386, is it not? Up until just recently I had a long-running OpenBSD system on an old P75 with 64mb of RAM. It wasn't until just last year OpenBSD/i386 actually started requiring a 486.
...but does it (still) run linux?
Because it's AWESOME!
WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
compact flash and a ide adapter, you dont need a 40 gigger on something like this
There are even a few installation reports for ELKS Linux on laptops with 286 CPUs.
I did pretty much that to install a linux distro on a 486 laptop - I compiled the kernel, libraries, etc. - then built a bootdisk and filesystem. I then went on and copied the ~15m filesystem using a bunch of floppies (no network) one disk at a time after booting from the floppy, and finally installed the bootloader.
The Linux From Scratch HOWTO has all instructions for it, although in my case I diverted a little bit from it - for instance I used uClibc instead of Glibc and a 2.2 kernel. Doing it from scratch gives you the best way to select more recent components for some parts while using smaller/older ones elsewhere, so you don't end up with a totally outdated system.
I feel dated, I mean, "back in the day" this was how you used a machine like this...
Shoulda used gentoo. If gcc can compile for it, gentoo can do it! Plus it would have been a hack too, as all gentoo boxen are hacks!
And yes, I run gentoo on all my machines and have done so since 2003. (My first gentoo box was in 2002, the rest of my machines were converted a year later.)
I am the penguin that codes in the night.
As the author of the referenced article pointed out, many/most distros dropped support for the 386 some time ago. IIRC from the discussions on the NetBSD mailing list, a lot of this had to do with the bloat required to support 386-specific workarounds which were not an issue for the 486 and later chips. There was some discussion of handing it with conditional defines and/or separate ports, but it came down to the level of code obfuscation (from the conditionals) vs. the number of real users.
It is a geek thing. We wonder if you could run a website from a Commodore 64 (I will be nice and not link to that one), a two-axis panning time lapse rig built from Lego, or build a nuclear reactor. You don't need a practical purpose to do these things. The point is to see if they can be done.
Now I have to agree with the first poster that installing an old version Linux on a 386 doesn't rank too high on the scale of these sorts of things. It would be interesting just to remind us how far things have progressed since then.
I have to admit I have an installation of Windows 3.1 running on DOSBox for this very reason. But that is not too hardcore either. Much more amazing is the fact that I know someone who still actively uses their Windows 3.1 system as their only computer. When you see how capable Word 6 was, it shows that things haven't improved a great deal in the word processing world in all that time.
I have gone down the path of LFS, mostly by way of setting up a very specialised system. I definitely wouldn't bother with it for a desktop box, since life is just too short to subject yourself to the workload of effectively maintaining your own distribution.
However, a simple approach to getting Linux running on a 386 might be to simply download one of the slightly older Slackware ISOs. I haven't checked the most recent offerings since I migrated to Arch, but IIRC it wasn't that long ago (1-2 years?) that Slack was offering 386 binaries as standard.
And yet some people's hobby are vintage cars too, even though you could get more MPG from newer stuff...
I was wondering, hypothetically, if somebody where to take the source code of Debian 1.3.1 and compile it with the latest version of GCC and somehow made it compile; I wonder how much faster it will compared to the binary that was released back then. I mean, has compiler technology improved much in the last 14 years when it comes to slow machines like the i386?
Why didn't the guy just make the stack of install floppies like we used to do back in the day? Or break out his PCMCIA SCSI card (still have one along with a single speed SCSI CD)
Find a local Computer Recycler. These guys are local to me. http://www.compurecyclers.com/ You can get a box of IDE drives for the cost of lunch. Also, lots of old hardware, and hard to find memory.
The question is why? When you can get much more processing power at less dollar and energy cost from installing Linux on a hacked/rooted old smart phone, ereader, and yes even router.
Because the same hardware that chugs with Win98SE running an antivirus and a decent firewall, even when NLited - but can be pretty responsive when running modern true-32-bit software. "Leverage new life out of old hardware with new software". This post is being made on an IBM T22 Thinkpad running Squeeze KDE. I don't have plasma effects or widgets enabled (nor do I want them). But this processor and 256MB of RAM won't run anything useful and modern using the software of it's era - for most tasks it's just as quick as my 6 month-old high-end 2GB RAM laptop - which runs Windoof 7. Except power on to useable is 8 seconds, shutdown is 5 seconds (guess which OS does that).
Disclaimer: once Windoof 7 has been around for a few more years there'll be more way to trim the fat - but I'll never have the ability to do that at source code level, and it's not in the companies interests to release performance patches.
By all means *you* go buy the latest hardware every year - if it does what you want, then more power to you. But if your 2GB of sub-light speed RAM, dual-core 64-bit 3GHz machine with it's SATA hdd can't do anything useful quicker than my sub 1GHz single-core 32-bit processor with 256MB of PC100 dragging an IDE drive.... hey you do the math - you help the economy, I'll watch my wallet and my power bill.
Though really it's just about building things - gives me more joy than acquiring things.
Sad really.
I installed Linux on a vellum codex! I even included X11, but went with Xfce instead of GNOME 3. It's sweet, man ... very illuminated.
The issue is the bloated glibc libraries eat up all the ram.
The libc ones in OpenBSD use much less memory and the system is less intensive. BSD init is much leaner as well. If I were bored I would install a BSD OS on such a beast and would not even consider Linux unless old 2001 era libc 5 is being used.
http://saveie6.com/
Ill install OS/2 from the original floppies on a PS/2 model 80. ya, that will show them!
WTF? and why do we care?
---- Booth was a patriot ----
If you manage to make it run, you should try Dune 2. It's a revolutionary game.
Love many, trust a few, do harm to none.
Why a hack?
Because it's not a DX chip (full 32-bit). It won't work "out of the box" ...
The SX is 100% compatible with the DX from a software perspective. IIRC modern Linux distributions do not work out of the box because they are compiled to use PentiumPro (sort of a 686 - three generations ahead of the 386) instructions.
The "hack" is doing it under an hour. He used a different PC to install it onto the IDE disk and afterwards put it back into the laptop. It's a little more convoluted than you thought, but still kinda boring.
Twinstiq, game news
I sometimes wonder how old PC could you use if we made a lo-fi version of everything in current world. If we cut some corners, for example Facebook could be run in text mode with images viewed in some separate "SVGA viewer" program. :) MP3/video playback would be tough. Pentium II should be able to do anything. Of course today we have better minimal hardware like Atom/ARM available.
Slackware is compiled for i486 and has been for a LOOOOOONG time.
Yes, but it was not until gcc started to output i486-specific opcodes whether you liked it or not. At that point, what the hell. :)
It is a geek thing. We wonder if you could run a website from a Commodore 64 (I will be nice and not link to that one), a two-axis panning time lapse rig built from Lego, or build a nuclear reactor. You don't need a practical purpose to do these things. The point is to see if they can be done.
I disagree completely. All of those things are things which *shouldn't* be possible but are. That shows the adventurous spirit to explore the unknown.
Installing Linux on a 386 is more akin to restoring a 1990 Huffy kids bike to mint condition. The path is obvious, we know it can be done and the reward is stupid since you're restoring crap back to its original state.
When I hear someone built a nuclear reactor in their kitchen I go "Whoa cool!" when I hear someone installed linux on their old computer I think "Isn't that the point of linux?"
For people who never dealt with that hardware and those distros, it's educational.
We can TELL them "we were so poor that if we didn't wake up on Christmas Day with a hardon we got nothing to play with", but that
isn't the technotactile experience of actually using the gear.
An emulator is nice, but not the same.
"This post is an artistic work of fiction and falsehood. Only a fool would take anything posted here as fact."
Hey, with iOS 5 you won't have to do the USB cable thing anymore! Awesome hack!
A while ago, I tried to tackle a similar project with an Acer 486 class notebook I was given for free. (It was in practically new condition, other than its battery not holding much of a charge any more. The owner took immaculate care of it and then stuffed it in a carrying bag, in a coat closet, for years before giving it to me.)
I thought it was a shame not to try to get it running something useful. (It had Windows '95 on it, which didn't run very well. Even if I wanted to keep '95 on it, I would have needed the restore/recovery media which was missing.) Linux seemed like the obvious answer, but after wasting several days downloading and trying out various distros, I found that the only ones providing good performance were VERY stripped down obscure versions designed for old/obsolete hardware.
In the end, I wound up with a machine that had a working Linux OS on it, but nobody would ever really use for anything. I mean, why bother when the typical smartphone was WAY more functional and user-friendly? Not to mention, replacement battery packs for this old laptop were still selling for upwards of $70 new, which would REALLY make no sense to invest in it. Yet without one, it didn't even offer the level of portability a laptop was supposed to provide.
If you step back to something even OLDER like this 386 machine? You're really reaching a point where you're simply being foolish to waste your time with it. Even the article's author struggled to justify a possible use for the computer he going working with Debian. Basically, all he could come up with is that it might work as something you didn't care if you screwed up, just to poke around and learn the basics on Linux on. Well, let's stop and think about that one a minute. With all the hassle it was setting it up in the FIRST place, would it really be "no big deal" if you screwed up the installation messing around with it? I think, as slow as it was doing the install on it, it would be a rather big headache, actually. And you'd really want to use an ancient 386 laptop as a Linux learning tool? You couldn't find SOMEONE who'd give you a free Dell or HP desktop/mini tower that had at least a generation or two newer CPU in it?? (I think I have at least 4 or 5 such systems out in my garage collecting dust as we speak.)
About the only real nugget of interest I gleaned from this whole article is the fact that pretty much everyone has removed the 386 support from their Linux distros these days. (I doubt I would have ever spent the time to verify that fact myself.)
I like computer history as much as the next guy, but that doesn't mean a feel a duty to be curator of my own computer hardware museum. If you can't find a good dedicated job for an ancient machine of this type to do (say a controller for a model railroad layout or a dedicated machine to program phone PBX systems or high-end routers or switches with?), I think you're probably best sending it off for recycling and looking for something a little newer.
What about FreeSCO router project? It's Linux, it runs from a floppy, and runs on 386's... I've had it on a 486 before, but mostly only have newer Pentium-2s to use for that sort of thing. Which are good for FreeNAS.
My old hardware hack was a 486SX that had IIRC 8M of memory. It was an old Gateway desktop (the old style case where it was designed to sit on your desk with the monitor on top) that I don't even remember where I got it. I had it running 95/98 at some points for my dad at a real estate office he was working at on and off to use with some awful 14" CRT. (They would not have had a computer period had we not put that thing there. But that is another story.)
So once I got it back I was in need of a router. Installed Barebones RH v5.0 and removed every package that it did not absolutly need to run to get enough room to install GCC and some other things on it. It ran ipchains like a champ for a few years. I remember one of the NICs was a 3Com who's driver had been written by some guy at NASA back in the day.
One day the PSU fan's bearing went so I had to pull it and did not have a replacment for it and so it ran totally fanless for a while after that until I retired it. I don't mind having my much smaller, more modern, and lower power all in one wifi router but I do kinda miss my old pizza box router sometimes.
imagine a beowulf cluster of those.......
da da da dum indeed.
When Caldera, Redhat, and Slackware ruled the Linux world, 386 support was everywhere. I still have some Caldera Disks, as well as Redhat 4.x or so haha. Now I have a reason to keep them. Oh now about that 386....Anyone got a spare? lol
"Computers are a lot like Air Conditioners" "They both work great until you start opening Windows"
I can pinpoint it for you
anything before slackware 9 supports 386, 9 and above require 486
that was normal, in 1995... today your lucky if you can find more than a couple sites that even document how to deal with a 386, and a trillion hits of "um can I run linux on a 1.4ghz 1gb pentium 3, its really old"
I get pushed more and more into being "the old geek".
I still have Red Hat 4.2 CDs that were intended to run on 386 and up... Why is this noteworthy?
Seriously.
Haven't you people ever seen an RPM? Do you know what that "i386" in the filename means?
I'm not impressed.
NTITE
-You can cry, but you'll still die. There'll be no tears in the end.
Yea, I had to exclude ubuntu as well when I was picking a distro for an AT&T Globalyst 380TPC I was trying to get running, a 486 as well. Free/OpenBSD wouldn't install but NetBSD did, 5.1 the current version even.
That'll be really, really slow. Unlike an SSD a CF card won't do intelligent management of writing, so every time the OS writes a block to the "disk", a huge number of blocks will be erased and rewritten. So you would need to use a rather contrived arrangement, such as a read-only root filesystem with /tmp in RAM, or the entire root filesystem in RAM. On an old machine with very little RAM, this will be tricky.
I'd suggest an PATA to SATA adapter to enable the use of a modern hard disk.
You're an immobile computer, remember?
About 12 years ago, or something.
if its going into a 386 I doubt you would care about its speed
I'm way late to this (girlfriend was over all weekend so I didn't touch a single computer. How's that for an excuse?)
Buuuut... I currently have a 300mhz K6-II from 1998 that runs a current Debian Stable. I thought I would make it a minecraft server but it turns out that it doesn't have enough ram (minecraft will refuse to even start without at least 800MB or so). Prior to this it was a FreeBSD 8.x webserver, fileserver and firewall. It replaces the 486DX2 that was running (then current) FBSD 6.x at the time the smoke came out of its power supply.
I applaud when people find uses for older hardware, but IMHO putting a similarly aged OS on an old computer isn't really much of a hack. I could get all retro and put Win95 on this machine and Slackware 5.0 in a dual-boot setup like the old days. (Still have the disks in the closet).
That said, running older hardware just isn't as fun as it sounds. Pulling up the list of fbsd software packages in sysinstall takes a full 13 minutes (from download to uncompressing the tarball to displaying the menu). I know because I've timed it. You really have to consider if you want to build a package from ports, because it can easily eat up an afternoon, and/or an evening depending upon dependencies. Rebuilding the kernel was about 4.5 hours, and a build world on just a base install is about a day and a half.
As a Debian machine, the install scripts will only install a '486' kernel. Building a new kernel from new source was a serious ordeal, much more serious than the days when this was my #1 box up to about 2002. The reason I chose Debian is because Archlinux, (the distribution that champions itself as the saviour of older systems) doesn't support anything i586 and lower. Irony.
All I initially wanted was a text-only system for software development (C and Perl). Maybe some occasional BitchX and Mutt use now and again. It does that pretty well (I want to say FreeBSD is a better choice than the Debian, in this case), but that's about *all* it does well. As a fileserver, it's pretty slow, even on the LAN. 12 year old hard drive technology and 33mhz busses, etc.
I could go on a rant about software bloat in the OSS community and how 2008 seemed like an abrupt cutoff for when I could run X or anything graphical on this machine, but I'll save it for another day.
do() || do_not();
As long as one is not installing X or any GUI, why not? In CLI only mode, any Linux, BSD should work. But if you have something like that, maybe try HURD!
Actually, Minix 3 is a better option, since it's targeting precisely this space!