Floppinux – An Embedded Linux on a Single Floppy
bits.p1x.in
bits.p1x.in
I vaguely remember the name—however from some time recovery tools changed to mini-CD for me, which is not too large either with ~170 mb or something like that. I gotta find the name of whatever recovery-CD build I had, since it's got memtest86+, which can still come in handy…
it was a demonstration on how one dynamically compile (for smallest binaries), but then "reassemble" libc to only include the symbols needed for the actual applications. I demonstrated doing this with uclibc which didnt need the help as much as well as glibc (which if my memory serves me correct was basically close to the size of the floppy by itself). if all the binaries were statically linked, they would have been too big (because of duplication of symbols between them), but by essentially stripping libc of unneeded symbols, was able to create an embedded system that worked perfectly.
It might be a bit harder today for the same reason its hard to actually statically link glibc today. glibc at runtime can do dynamic loading itself, even if statically linked into the binary.
Apropos of this, another solution I've seen (more of a dirty trick, but also greater space savings) is to build libc as a fixed chunk of page-aligned memory, and then de-duplicate the underlying disk sectors between different executable files. Works pretty well, assuming a read-only or cooperative filesystem.
This could be useful for other embedded systems - as 2MB of storage could be fit into ROM pretty easily.
The box was loud while booting (because of the floppy), but once booted was completely silent as everything ran from RAM. The Pentium CPU had just a heatsink with no fan, and no fan on the power supply.
I updated the post with that info.
Thanks!
1) Network support - it's glitchy at best; ODI drivers + Watcom TCP never seem to work for very long. If I toss out coreutils, that gives me close to 500k for a network stack.
2) Boot time. I suspect this will be _worse_ on Linux than on FreeDOS, but bootstrapping bare essentials like APM and an ANSI terminal driver do add overhead that's "just there" on Linux, so they may be neck-and-neck for all I know.
Any layer 3 router is basically just a computer and software. Some of the more mechanical tasks can be accelerated in hardware, but that's only important with really high throughout setups. It is pretty impressive how much data you can shovel through a modest CPU, though. Part of that is the fact that CPUs process many bits in parallel. You could imagine a 20 year old CPU running at 100Mhz shovelling 50 million words per second between memory locations, which at 32-bits is 1.6Gbps.
Also, in hardware routers packets are routed on dedicated custom silicon without them hitting the relatively slow general purpose CPU.
Sure, you'll likely need purpose-made hardware above a certain amount of throughput. I suspect that practical threshold these days is between 1Gps and 10Gbps, although it's a much grayer line than it was 20 years ago. The network interfaces are likely the bottleneck rather than the CPU's ability to shovel, and latency will always be higher than dedicated hardware.
There will of course always be a need for hardware to go faster than what a CPU can do. Tbps is becoming a unit folk use regularly.
Needs a server or router and all you have is an old computer with some NIC's? All you have is a pendrive and needs to recover some files from an unbootable machine? Do not have msword but can use gzip and grep and wants to extract text or images from a docx? Got an old computer without harddisk but working floppy drive and needs linux running on it? Need to send an SOS AM signal and all you have in an old CRT? A modern linux distro with a few dev packages and system tools is like a digital swiss army knife on these situations.
Some of these scenarios are stretching the reality, but some are not. These skills are the modern IT equivalent to MacGyverisms.
It's amazing how much comes back just researching for this comment-- fond memories of manipulating "root flags" with "rdev", for example. Knowing exactly what was going on, from BIOS handing off the boot sector thru the kernel starting up and mounting the root filesytem was a real treat.
Dealing with the unreliability of floppy disks and floppy drives, however, I will never feel nostalgia for.
I would be surprised if the resulting kernel is any bigger than a floppy disk.
"Due to new features being introduced and the general size increase of the Linux kernel, devices now need at least 8 MB of flash and 64 MB of RAM to run a default build of OpenWrt."
1. Your bootstrap ROM boots the system from a file on floppy, tape, or file server.
2. That file is either a second-stage bootstrap with more features that repeats this process, or an installation kernel that has support for a minimum/guaranteed system configuration.
3. You boot that kernel, and tell it where your installation root is (floppy, tape, file server), and it uses that to run the installer.
4. The installer walks you through partitioning and copies a miniroot to your swap partition, and reboots to that.
5. The booted miniroot completes the installation, whether prompting or using information stored to the miniroot from the previous step, and reboots.
6. At this point you may have more config to do since you’re running the “real” system. Some UNIX systems had fancy automatic configuration that would detect what devices you had beyond the minimum and rebuild your kernel with the appropriate drivers and tuning parameters, create the /dev nodes, and so on, and then reboot one more time to a “complete” system.
7. Done! Now is the time for the system administrator to back this all up, so all they need to do in the future is use the installer to partition and restore the contents of the partitions from a backup instead of distribution media.
the reasoning was that I had an already old for the time 486dx and the floppydistro was the logical choice.
of course starting using gnu/linux using a small floppydistro with no graphical tool and little help was a dumb idea lol.
Back in the day, there was also LOAF (Linux On A Floppy). [1]
I had a go at it, until I realized someone beat me to the name.
[1] https://linux-center.org/en/distributions/mini-distributions... (Only the index still remains)
http://rgr.freeshell.org/flinux/
This is of course much better because the tools and kernel are modern. Great work !
For me it's the best way to learn Linux.
There's a retrobattlestations contest to "boot from a 5.25" floppy disk" coming up this week, so I've been down in the basement grabbing disks, and coming up all DOS..
Full size: 1440KiB / 1.44MiB Kernel size: 632KiB Tools: 552KiB Free space left (du -h): 272KiB
So... it does look to me like the kernel and tools would fit 1.2MB too.
But I don't think it is what you want. For sane set of tools it was a little bit over 1MB. Mine is bigger as I still need more tools for fixing/experimenting on live system (I'm using shell scripts for my application). In the end I will be removing more and more tools.
EDiT: done :)
wget https://krzysztofjankowski.com/floppinux/downloads/0.1.0/flo... 2021-05-22 16:28:03 ERROR 404: Not Found.
Archive.org mirror link works.
Will test it out when I have a chance.
Starting init: /sbin/init exists but couldn't execute it (error -8)
it then tries to run /bin/sh as a backup, with the same error.
I followed your instructions exactly; I also verified these are all marked executable. Any idea?
I ended up building the whole system on a 32bit old laptop and just don't care about the problems with installing missing 32bit libs on my 64bit system.
> I'm using the latest revision. It's a feat of it's own that connects old and new technologies togheter.
'togheter' -> 'together'
So it looks like the video is trying to prevent a software copy pandemic.
I think there is a problem with the menu selections. Is there a command line way to select the right options? Or can someone share a working config file for both the kernel and busybox?
Idea: create a hello world program in c, configure your make script to statically link it, make sure it is compiled for the same arch as the distro you are booting (amd64 vs x86), place that as /sbin/init, ensure execute bit is set, create a new image, boot, and see if you get output.
- you compiled some parts in 64 bits and try to run the QEMU 32 bit system. Try qemu-system-x86_64
- you do not enabled starting #! scripts in the kernel
3X the RAM (and 10X the clock rate) of the original VAX-11/780 that 4BSD (a full-featured UNIX including TCP/IP etc.) was designed on and for, the sort of machine which might have served an entire CS department (or other organization) in the early 1980s.
With sample application and KIOSK mode.