LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-04-2023, 11:44 AM   #16
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325

Look, any 32bit kernel will run on the 486 - all the 5.x kernels anyhow, and anything before. I didn't think they had dropped 486 yet, as there's still support for a lot of 32bit architectures, what space they would save in dropping 486 is minimal.

There's other things you'll need to know. The standard exploit on a linux server back then was to exploit a buffer overrun (inetd, httpd, sendmail & bind were all buggy back then). Directly above the buffers was the stack(?) then executable memory. A 'goto 0x0000' would be placed there, and when the program got to it, you'd have root access to the machine. Numerous root & branch security reforms have come along since, and many, many patches.So stay off the internet. The only security you have is that young hackers were still in nappies/diapers when this was going on. An nmap scan would reveal youropenness to every CVE in the last 15-20 years.

If you can lay hands on an old ide hard drive you might get a few hundred MB of storage for the full OS. You need lilo for booting, although those things default to the floppy at boot. There's actually some dweeb selling floppy disks still. I read an article about him once.

Internet connectivity was achieved with dialup modems via serial port. No isp has that stuff today. So if you want to risk your OS, get a 10MB nic and connect through your real pc. Alternatively, connect directly to your router, or via mains powerline network adapters.
 
Old 07-04-2023, 01:46 PM   #17
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,640

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
Did you investigate tinyroot? IT is a floppy Linux available using GIT. The whole source is bigger, but once you trim down to only the drivers you need it fits on a floppy with room to spare.

Tom's Root Boot is still around, but a bit harder to find these days. I once had sources for it, but reclaimed that space LONG ago!

I seem to remember SERIAL TERMINAL LINUX being a thing, and it fit on a floppy.
 
Old 07-04-2023, 01:58 PM   #18
The486Nerd
LQ Newbie
 
Registered: Jul 2023
Distribution: Linux Mint
Posts: 11

Original Poster
Rep: Reputation: 0
Alright, I got the kernel compiled and made the bzImage. I tried to boot from it as a floppy in QEMU but it just says use a boot loader. I shouldn't have to install grub on a floppy, should I?
 
Old 07-04-2023, 07:04 PM   #19
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: Windows 7...
Posts: 773

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Why not tiny lilo?
 
1 members found this post helpful.
Old 07-04-2023, 09:33 PM   #20
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by The486Nerd View Post
I shouldn't have to install grub on a floppy, should I?
Wrong. You do need an external loader. I used to use the original grub (not the current one), but I only used it to boot my on-disk system so I didn't have to worry about having a kernel on the floppy itself.

It is possible to configure the linux kernel to boot itself (no external loader) but not on the hardware you are talking about.
 
Old 07-05-2023, 03:05 AM   #21
Projectile
Member
 
Registered: Jun 2023
Posts: 72
Blog Entries: 1

Rep: Reputation: 13
Quote:
Originally Posted by The486Nerd View Post
I shouldn't have to install grub on a floppy, should I?
Legacy GRUB 0.97 fits just fine on a 1.44M floppy as I remember. Alternatives (that I haven't personally tried yet) are LILO and SYSLINUX (maybe version 4.07).

Anyway don't give up on trying to fit it on a floppy. Also, this probably isn't relevant to your 486 computer but have you tried MenuetOS yet? It's not Linux but it's very impressive. Boot from a floppy into a GUI.
 
Old 07-05-2023, 04:22 PM   #22
The486Nerd
LQ Newbie
 
Registered: Jul 2023
Distribution: Linux Mint
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Projectile View Post
Anyway don't give up on trying to fit it on a floppy.
I've got the bzImage down to around 6mb, I'll see how low I can get it .
Quote:
Originally Posted by Projectile View Post
Also, this probably isn't relevant to your 486 computer but have you tried MenuetOS yet? It's not Linux but it's very impressive. Boot from a floppy into a GUI.
Thanks for telling me, I'll check it out!
 
Old 08-30-2023, 07:13 AM   #23
The486Nerd
LQ Newbie
 
Registered: Jul 2023
Distribution: Linux Mint
Posts: 11

Original Poster
Rep: Reputation: 0
After a while I decided to come back to this project. I figured out how to boot the bzImage in QEMU with -kernel flag. But of course when it boots it gives errors about not finding a root FS. Now I'm having trouble creating a initrd, how should I go about making one?
 
Old 08-30-2023, 11:08 AM   #24
Projectile
Member
 
Registered: Jun 2023
Posts: 72
Blog Entries: 1

Rep: Reputation: 13
The486Nerd, according to the mkinitrd manpage, the initrd is a cpio+gz archive, so a caveman-like approach would be to use cpio and gzip. If I were you I'd just try to steal the initrd (and kernel) from DamnSmallLinux before even attempting to build my own from scratch. Kudos to you for a more direct approach.

The Linux From Scratch project has a page you might find useful:
https://www.linuxfromscratch.org/blf...initramfs.html
 
1 members found this post helpful.
Old 08-30-2023, 01:04 PM   #25
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
For your information old kernels did boot from floppy without bootloader, but this feature is long gone.
I just checked, in 6.4.7 sources one can enable compiler optimizations for 486SX or 486DX, which means they are supported.
 
1 members found this post helpful.
Old 08-30-2023, 01:34 PM   #26
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,583
Blog Entries: 19

Rep: Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454
Quote:
Originally Posted by Emerson View Post
For your information old kernels did boot from floppy without bootloader, but this feature is long gone.
My first Linux ran like that. The hard drive booted Windows98, but I had a partition with Red Hat 6 on it and a self-booting kernel on a floppy. I can't remember the version but I suppose it could be checked. I did notice at some later point that booting from a kernel no longer worked, but I assumed it was the BIOSes that had been updated so that they no longer recognised the Linux kernel as a valid bootloader.
 
Old 08-30-2023, 02:43 PM   #27
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
There was tomsrtbt, which built a 2.0 kernel, busybox, and squeezed them onto a 1.44MB floppy which was formatted out to 1.82MB or so. There's a script in the archive which does that, but the site is down now. It mat be worth a web search, and you need a good floppy. This link might do it
https://archive.org/download/tucows_68437_tomsrtbt

Get the tar.gz. It's libc5 stuff, so don't add a thing, just use it. It had ext2 and msdos modules. Some scsi, it knew about ISA, no pci/pcie/X. It can fix a bootloader, and fsck those disks. /dev/fd0 is the root drive.

EDIT: Internet was a dialup modem via serial port and pppd :-). If you have a wired nic, you just might get that up, but don't expect firmware! One in an ISA slot would be best. It did have dhcp, iirc.

Last edited by business_kid; 08-30-2023 at 02:50 PM.
 
Old 08-30-2023, 04:24 PM   #28
The486Nerd
LQ Newbie
 
Registered: Jul 2023
Distribution: Linux Mint
Posts: 11

Original Poster
Rep: Reputation: 0
I found a super old web page on making a initramfs with busybox. I got it working and now I have a shell and some basic commands.
 
Old 08-31-2023, 04:45 AM   #29
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
What kernel version? Tomsrtbt's boast was that it was the most linux on a floppy. Oh, mark this thread solved.
 
Old 08-31-2023, 01:03 PM   #30
The486Nerd
LQ Newbie
 
Registered: Jul 2023
Distribution: Linux Mint
Posts: 11

Original Poster
Rep: Reputation: 0
I wasn't able to get the bzImage down enough with kernel 6.5 so I decided to go with putting it on a CD. One more question, how would I go about putting network card drivers in the CD? Is there a file I need to put in the initramfs or something?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enable a Hard Disk to read/write to a USB device but disable the USB device to read/write to the hard disk without user permission? ce309 Linux - General 33 05-22-2019 04:30 PM
LXer: Palm Pays $44M For Perpetual OS License LXer Syndicated Linux News 1 10-13-2007 03:15 PM
LXer: Palm pays $44m for Palm OS source code licence LXer Syndicated Linux News 0 12-07-2006 04:54 PM
floppy only reads first disk, if new disk is inserted data from first disk is shown. lakosked Debian 3 02-18-2006 08:44 PM
Redhat 9 Boot Stalls after line "Floppy drive(s): fd0 is 1.44M" nevyn738 Linux - Laptop and Netbook 0 04-02-2004 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration