LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to compile Linux Kernel and write it to a 1.44M floppy disk? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-compile-linux-kernel-and-write-it-to-a-1-44m-floppy-disk-4175726569/)

The486Nerd 07-03-2023 08:25 AM

How to compile Linux Kernel and write it to a 1.44M floppy disk?
 
Hi guys! I'm a retro computing nerd and I want to make a Linux Distro for very old computers (486 and up). To start off I just want to compile the kernel and put it on a 1.44M floppy disk. What would be the most recent version of the kernel could I do this with, and how would I go about compiling it to a .img file or whatever?

Thanks!

Projectile 07-03-2023 08:38 AM

Hello, I'm curious about this too but I fear only the old versions 2.4.x still fit on a floppy.

Might also want to look into DamnSmallLinux, you could probably extract the small kernel and root from it.

hazel 07-03-2023 08:39 AM

You should be asking what is the most recent version of the kernel that would actually run on a machine like that! Probably something in the 2.0 series.

To compile a kernel, you download the source and use a command sequence like make menuconfig->make bzImage->make modules. But again I don't know if a very old kernel would compile at all with modern compilation tools.

The486Nerd 07-03-2023 08:41 AM

Quote:

Originally Posted by hazel (Post 6439911)
You should be asking what is the most recent version of the kernel that would actually run on a machine like that! Probably something in the 2.0 series.

To compile a kernel, you download the source and use a command sequence like make menuconfig->make bzImage->make modules. But again I don't know if a very old kernel would compile at all with modern compilation tools.

Hmm... Alright, I'll see if I can 2.0 compiled.

fatmac 07-03-2023 08:41 AM

I don't know about compiling a kernel, but maybe take a look at these.....

https://lunduke.substack.com/p/3-lin...ns-that-fit-on

https://hackaday.com/2021/05/24/runn...e-floppy-disk/

hazel 07-03-2023 08:52 AM

You would be short of both disc space and memory so you would not want to build any drivers for hardware that was not present on the machine. If it was me, I'd put drivers for the disk controller, partition and filesystem into the kernel (so no need for an initrd) and compile the few other drivers you would need as modules.

boughtonp 07-03-2023 09:04 AM


 
Not quite what you're asking for, but these projects might still be useful...

No idea if it'll run on a 486, but Tiny Core Linux gets a modern kernel down to 17MB without a GUI, 23MB with GUI. (Maybe check if there are download archives of early versions that go smaller?)

The typical "old computer" distro is AntiX Linux, but it requires at least a Pentium 1 (i.e. 586), and would require a CD.

More importantly, both of them have forums where you might be able to ask advice on going smaller/older... Tiny Core Linux Forum and AntiX Forum.


business_kid 07-03-2023 12:54 PM

1.44MB? Forget it.

Until recently, you could get tomsrtbt at www.toms.net/rb. That reformatted the floppy to 1.82MB, and wrote a 2.0 kernel and ancient busybox to it. It was libc5 based, and enshrined everything that was bad about early pcs. But you want that, by the sound of it.

You may find tomsrtbt mirrored somewhere. Otherwise, pick up a kernel from the 1990s and get a second floppy for the initrd & busybox. Slackware was originally distributed on floppy disks. Slackware goes back to version 1.x on ftp.slackware.uk, which has decent bandwidth.

EDIT: Slackware was compiled i486 for most of it's 32bit life. I'm sure it was i386 back then.

wpeckham 07-03-2023 01:32 PM

Have you considered looking into FreeDOS instead?

The486Nerd 07-04-2023 05:54 AM

2.0 won't compile on modern Ubuntu Linux. Should I try setting up a older linux disro in a VM and compile it on there?

business_kid 07-04-2023 07:17 AM

Quote:

Originally Posted by The486Nerd (Post 6440066)
2.0 won't compile on modern Ubuntu Linux. Should I try setting up a older linux disro in a VM or something?

I would grab an old distro kernel which is precompiled. That stuff links against libc.so.5. Everything since about kernel 3.0 links against libc.so.6 and the two are teetotally different.

Early slackware was distributed on floppies in the mid 1990s, when 486s were current.

syg00 07-04-2023 07:35 AM

floppinux seems to be pretty current - gotta be worth a try.

The486Nerd 07-04-2023 07:59 AM

Well, let's say I drop the 1.44MB limit. Would the newest linux kernel run on a 486? (I remember hearing somewhere they were thinking about dropping support for it, not sure if that happened.)

boughtonp 07-04-2023 09:08 AM


 
Try it and find out!

If you're serious about making your own distro, you need a mindset of exploring and figuring things out.

Hint: The Tiny Core Linux website I linked in post #7 contains a FAQ, and the FAQ lists minimum requirements...


The486Nerd 07-04-2023 10:03 AM

Quote:

Originally Posted by boughtonp (Post 6440100)
Try it and find out!

If you're serious about making your own distro, you need a mindset of exploring and figuring things out.

Hint: The Tiny Core Linux website I linked in post #7 contains a FAQ, and the FAQ lists minimum requirements...


Ah, thanks! :)


All times are GMT -5. The time now is 01:03 AM.