
Booting a 486 from floppy with the most up-to-date stable Linux kernel - LeoPanthera
https://www.insentricity.com/a.cl/283
======
locao
Does anyone else miss having this level of motivation? And that's not an
isolation effect on me, I gave up on trying fun things like this for a long
long time now.

~~~
kristopolous
Dealing with garbage tech is what brings me down. Completely broken, unusable
garbage software is everywhere, backed by egos, emotions, power plays, and
entrenchment. That's the part I don't want to deal with. The only thing worse
than having to deal with a bunch of idiots is having to deal with a bunch of
things made by them. It pisses me off how broken everything is and how few
people seem to take issue with it.

Everything is like this. Sturgeon's law is everywhere.

Once I can somehow push those things out of my life, I'm good.

~~~
myself248
This is why I save my vacation days up and take a big chunk once or twice a
year, instead of frittering away fridays and mondays to have little "long
weekends" throughout the year, as I did in the past.

I discovered that, after 4 or 5 days of staycation, I've handled most of the
crap that was hanging over my head. I've caught up on laundry, done whatever
administrative stuff I had been procrastinating about, and I can finally start
to relax. Which is to say, pursue leisure activities without feeling like
there's something else I should be doing.

Being able to unplug from the day-job allows me to disconnect from a lot of
that garbage tech and its frustration factors, and dedicate long periods of
concentration to in-depth tasks that might not yield immediate payback. When I
only have a few hours in the evening to put towards a task, I tend towards
things with short-term payback, so I don't feel like I wasted the evening.
That keeps me from really hacking on stuff in my spare time.

~~~
blaser-waffle
I'm super into the 3-day weekends, but I also agree with the extra long
vacation-staycation thing, where you can just "be" for a while. Like 4 days of
nothin & puttering around, followed by 2 days of cleaning & finally attending
to {X,Y,Z}.

------
aksss
The virtue of reusing an old system is somewhat eroded by the fact that its
noise and power consumption exceed that of a more powerful Pi 3 B+, which can
be had for $50-60 with case and power supply (circa 2020).

I see little advantage in keeping the old hardware around anymore. I think I
still have some old ISA cables downstairs in a box - high time to acknowledge
to myself that I will NEVER use those again.

~~~
userbinator
The Pi is also notoriously Broadcom-proprietary[1], whereas an x86 PC has been
a de-facto standard for decades; everything is well-known or has been reverse-
engineered already, especially with a 486-era system.

It's somewhat similar to the reason people (like me) restore and drive old
cars, also despite the "noise and power consumption" (and some happen to like
the former ;-) --- they're relatively simple and well-understood.

Likewise, there is also a very active retrocomputing community, although a lot
of it goes back much older than 486 or even PC --- the C64, ZX, and the like
continue to have plenty of _new_ software written for them.

[1] and if you ask for a datasheet or any more details about it on their
"excellent community" (to quote some), you basically get told politely to
f'off:
[https://www.raspberrypi.org/forums/viewtopic.php?t=163420](https://www.raspberrypi.org/forums/viewtopic.php?t=163420)

~~~
grishka
Hmm. This [https://s-matyukevich.github.io/raspberry-pi-
os/](https://s-matyukevich.github.io/raspberry-pi-os/) made it seem like it's
about as open as an x86 PC. The only thing I see that's proprietary is the
very initial bootloader that apparently runs on the GPU. But then x86
motherboards come with proprietary BIOSes as well.

~~~
agapon
We are talking about hardware specifications.

------
jschwartzi
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
Recent versions of Debian require a 686.

[https://www.debian.org/releases/stable/i386/ch02s01.en.html#...](https://www.debian.org/releases/stable/i386/ch02s01.en.html#idm272)

~~~
znpy
also, 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-
sup...](https://www.zdnet.com/article/good-bye-386-linux-to-drop-support-
for-i386-chips-with-next-major-release/)

~~~
twoodfin
Anyone 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
I 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.

------
datenwolf
The author twice mentioned looking for a suitably tiny initrd / initramfs.

FYI: You don't need an initrd / initramfs. Just link the drivers required for
mounting the rootfs from IDE statically into the kernel image and you're done.

Initrd used to be a kludge to work around bootloaders not supporting
multiboot. And then we normalized that deviation in the form of initramfs.

------
compsciphd
back in 2002, I built a floppy that had a linux kernel (2.4.18-rc4) with
multiple ethernet drivers (back then tulip was taking over the 100mbps
ethernet world, so pretty sure that was included, as well as the 3c509
driver), X (vesa driver), busybox (or proto/fork busybox), rdesktop to build a
a thin client on a floppy. I even had a version that was able to squeeze in
vncviewer by using the over 1.44MB modes of writing floppy disks.

the project's point was to showcase stripping shared libraries of unused
symbols to get the per binary density of statically linking across one's
entire set of binaries. (useful for saving space on embedded systems) i
wouldnt claim that it was unique (I believe Debian did something similar), but
was a fun project.

------
pgtan
Modern days Linux kernel requires a bootloader, as seen in the video. In the
old days, you could dd the kernel to the floppy disk and use rdev to point to
the root partition to start after loading the kernel.

~~~
cesarb
A couple of days ago, I went looking for when this code was removed. It was
removed in 2003:
[https://lwn.net/Articles/21512/](https://lwn.net/Articles/21512/)

~~~
fierarul
Nice link!

The code is so tiny they could have kept it... But, oh well, progress.

I like the message:

    
    
      -  .ascii "Loading"
      +bugger_off_msg:
      + .ascii "Direct booting from floppy is no longer supported.\r\n"
      + .ascii "Please use a boot loader program instead.\r\n"
      + .ascii "\n"
      + .ascii "Remove disk and press any key to reboot . . .\r\n"
      + .byte 0

~~~
cesarb
> The code is so tiny they could have kept it...

Not for long; the EFI headers later used the same space, which even required
severely shortening that "no longer supported" message (the first two lines of
the message were replaced by just "Use a boot loader.\r\n")

------
anthk
There was a Nethack floopy for 3.4.3 (still played a lot by tons of people)
which was booted up from a tiny Linux floppy. Amazing. It may work under a
486. Search for "nehabodi".

[http://nehabodi.sourceforge.net/](http://nehabodi.sourceforge.net/)

------
dbolgheroni
Wish I had this flexibility with other kinds of hardware, like a phone. Having
to throw out a much newer and completely functional hardware 2 years after
being released, because there is almost nothing you can do with it is not
good.

(And for those who want to instruct me about PC being a defined architecture,
where there no such thing with smartphones, etc, etc, etc, I know all this,
but the point is still valid.)

~~~
MayeulC
Have you looked at postmarketos?
[https://postmarketos.org](https://postmarketos.org)

Lots of fun to be had, if only to play with a battery-backed raspberrypi-like
headless server in the worst, less-supported cases.

------
znpy
back when i was 13, didn't have a computer i could mess with and internet at
home, i remember unsuccessfully trying to boot coyote linux on an internet
café computer from a floppy disk.

"floppydistro"s where a thing back in the day. the challenge was to fit a
whole linux system along with some utilities in one or two floppy disks.

usually the first floppy disk was for core os + base utilities and the second
floppy disk was for additional software.

oh the memories.

~~~
jeffbee
QNX used to distribute a floppy containing the entire OS and a web browser,
for x86.
[http://toastytech.com/guis/qnxdemo.html](http://toastytech.com/guis/qnxdemo.html)

------
josteink
Posts like this showcase how malleable Linux really is without getting overly
complicated to follow.

Really a nice quick read.

~~~
zozbot234
But not nearly as malleable as it could be. Hopefully, true 80386 support can
be reintroduced to the kernel in a way that keeps it properly self-contained
and easy to support. There are also a few kernel-tinification approaches
floating around that could make the kernel smaller and easy to fit in a
floppy-using scenario.

~~~
cesarb
> Hopefully, true 80386 support can be reintroduced to the kernel in a way
> that keeps it properly self-contained and easy to support.

The merge which removed the 80386 support
([https://git.kernel.org/torvalds/c/743aa456c1834f76982af44e8b...](https://git.kernel.org/torvalds/c/743aa456c1834f76982af44e8b71d1a0b2a82e21))
stated as the reason "[...] complexity has plagued us with extra work whenever
we wanted to change SMP primitives, for years."

That is, it was not easy to keep it self-contained. Every new SMP primitive
has to be implemented and maintained for all the architectures supported by
the kernel, and the original 80386 ISA was too limited. Not to mention that
the 80386 didn't honor the write-protect bit in the page tables while in the
kernel
([https://git.kernel.org/torvalds/c/a5c2a893dbd4956a72fb261e87...](https://git.kernel.org/torvalds/c/a5c2a893dbd4956a72fb261e8790d19f67b52c99)),
with consequences all over the kernel
([https://git.kernel.org/torvalds/c/96d4f267e40f9509e8a66e2b39...](https://git.kernel.org/torvalds/c/96d4f267e40f9509e8a66e2b39e8b95655617693)).

~~~
zozbot234
Were 80386 SMP systems really all that common to begin with? Perhaps 80386
support should just focus on the uniprocessor case, at least as a start.

------
dylan604
went to youtube to find a better video of the sound of the floppy drive, as
the one in the posted video is very quiet. instead, came across this:
[https://www.youtube.com/watch?v=c52JQHVVqFM](https://www.youtube.com/watch?v=c52JQHVVqFM)

~~~
Fabricio20
Have you ever heard of the floppotron?
[https://www.youtube.com/c/PawełZadrożniak/featured](https://www.youtube.com/c/PawełZadrożniak/featured)

------
jeffbee
I wonder how well it works. If you take an x86_64 system and make a memory
control group with only 32MB of memory (and kmem tracking is enabled, which is
true by default) the container will OOM right away. I've been operating under
the belief that Linux now requires 64MB at a minimum, but perhaps a 32-bit
uniprocessor build can get by with less.

~~~
znpy
> the container will OOM right away

that doesn't really makes sense in linux-parlance. you should try and see
which is the process that is actually triggering the OOM.

if you're able to do that then you can try and swap that with another binary.

you could try and build an hello world that does while(1) sleep(30); build
that with static linking and boot the container with that -- it will probably
work.

also, i should look for that page, but i remember reading a page about
trimming away anything possible from an hello world binary and ending up with
something as small as like ~60 bytes.

~~~
znpy
here it is!

[https://www.muppetlabs.com/~breadbox/software/tiny/teensy.ht...](https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html)

i was off by a bit. the binary is 45 bytes and prints the number "42" (plus a
newline).

~~~
nathell
It does not print anything. It returns with exit code 42.

------
MBCook
I had no idea the Linux kernel still supported the 486. I thought you had to
have a Pentium class or better.

~~~
kelnos
Kernel support for 386 was dropped recently, but 486 and above are fine. I
think many distros have probably dropped 486 support, though; someone upthread
mentions that Debian is 686 and above only now.

~~~
MBCook
That’s probably where I got the idea. Debian is usually one of the last
distros to make a move like that too since they’re conservative.

------
radoslawc
Oh the floppy drive sound. I kind of miss it. Kind of, what I don't miss
(besides capacity) is how those floppies were fragile, and this yyyy - yyyy
---- yyyy - yyyy sound when it was trying to re-read the sector, which was
most of the times sound of defeat.

------
MayeulC
> Normally I would bypass a floppy install entirely and just boot an older
> computer via PXE and then install over the network. I thought I could put
> iPXE on a floppy and stick in an ISA NIC but iPXE just hangs without any
> error messages right after it's loaded from floppy.

How about the plop boot manager? It has helped me a lot back in the days. Or
any other pxe implementation.

Or veven installing everything on that drive from another computer, which is
likely the easiest way.

I recently came across IDE/SD card adapters. Perfect for that kind of project,
as it is much easier, cheaper and energy efficient to find, swap and use SD
cards nowadays. My use-case is an Xbox console for nxdk dev work, but I
haven't tried yet.

------
rubenhak
Now that it boots, time to bring up a Kubernetes and deploy a Spark cluster

------
jdofaz
A long time ago I remember installing gentoo on a 486 33Mhz (Tandy I think). I
initially compiled everything on a much faster Athlon XP. I do remember
compiling an updated kernel on the 486 and that it took 3 days, but it did
finish :D

I remember the hard drive was too big to boot from directly, there was some
bootloader that could run from the floppy disk then finish booting from the
hard drive.

It also had this horrible sound card/cd-rom combo controller that I never was
able to make work in linux

~~~
rawoke083600
Haha I've done that also.. Except my 486 was a GEODE like a low-power-sbc of
it's day and I compiled Gentoo on that !! Tooks days !!! :) Good Times.

------
mobilio
Almost 20 years ago i have internet, but didn't buy router. And found
floppyfw: [https://www.zelow.no/floppyfw/](https://www.zelow.no/floppyfw/)

Absolutely brilliant distribution that works perfect. And fit on one floppy -
kernel and userspace.

~~~
dredmorbius
See also: tomsrtbt ([http://www.toms.net/rb/](http://www.toms.net/rb/)) and
trinux
([http://trinux.sourceforge.net/legacy/](http://trinux.sourceforge.net/legacy/))
, among others.

------
MuffinFlavored
most up to date kernel, but Aboriginal Linux was end-of-lined in 2017

[http://landley.net/aboriginal/](http://landley.net/aboriginal/)

------
headmelted
Clicked on the video to see AMERICAN MEGATRENDS INC. and wasn’t disappointed,
ya freakin patriot!

------
butz
Will sing-a-long contest return this year? That's a neat idea.

------
sideshowb
What's a floppy? /s

