urjaman/i586con
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is the recipes for a little CONsole-only linux for i586's (or better) (thus the i586con name) based on buildroot, for use when you just need to get to a commandline with some tools pretty quickly*. A little list of notable tools i've picked: - the usual cli partitioning tools - ntfs-3g and ntfsprogs - fatresize - ddrescue - rsync - cdrkit (wodim, genisoimage) - flashrom less tools-y, more fun: - gpm mouse support (nano, links) - links browser with framebuffer graphics support - mocp (Music player, MP3 and FLAC... optimized for myself lol) - linux-vt-setcolors (just "setcolors" on the CLI) + example themes in /usr/share Build dependencies (on arch linux): pacman -S wget cpio unzip rsync bc dosfstools mtools plus base-devel and git (but these are obvious, right?) How to build: - use ./fextract.sh to download and extract+patch buildroot - use ./init_bdir.sh to initialize a build directory (optionally make menuconfig or make linux-menuconfig if you need/want to adjust the kernel or package selection etc) - make to build it (hopefully) (Do read the scripts before using them.) If you just want an .iso, the autobuilder results might be found at: https://urja.dev/i586con_autobuilds/ ## Tech notes ------------- There's a couple of boot methods: - use linux (kernel+initramfs) to copy the squashfs image from CD to RAM (Linux to RAM) - same but mount the squashfs image on CD (Run from CD) - have the bootloader load everything (BIOS2RAM) CD here means just boot media/device - we can load from USB stick or a hard drive too... All of the boot methods above use the img/rootfs.img file in some way, it is actually two files concatenated: - uncompressed cpio archive of a single squashfs file "ro.sqfs", that contains the initial state of /usr, /etc and /home. This format allows it both to be loaded by the kernel as initramfs (BIOS2RAM), and also loopback mounted from the file with a fixed offset. - gzip compressed cpio archive of the rest of the system, including BIOS2RAM init script and tiny boot busybox, plus saved state if hd_save is used There is a companion file named ro-size that just contains the size of the cpio archive that contains ro.sqfs. This is to help with hd_save and allows "Linux to RAM" to discard the rest of rootfs.img on boot. The point of keeping most of the system in a squashfs image in RAM (instad of unpacking a packed initramfs into RAM) is to be able to fit the entire linux system in 64M of RAM. The two first boot methods use img/save.tgz instead of the second part of rootfs.img. This is to allow cd_save to burn a single file on a CD-R to effect a savestate --- even if you were to write the full rootfs.img, most BIOSes of the era we care about do not understand multisession CDs and would boot the first session regardless. It will try to bring up up to one internet connection (LAN only) using DHCP, and then brings up a ssh daemon (no logins are possible until somebody sets a password for some account), and it will do this in a rather ghetto way - eudev runs a script that tells an another script-daemon (that was launched earlier) about the interface. ## Size note ------------ Regarding the "runs in 64M of RAM", my hard limit is that the rootfs.img size <= 30 MiB, and kernel bzImage is <= 3 MiB. The ISO-image can in principle contain any number of extra things if desired, CDs have all the space for us :P ## Hardware target ------------------ - Pentium 1 upto Pentium 3 - Boot from PCI PATA/IDE controller (or USB) - BIOS2RAM will boot from anything that your BIOS can, tho - Preferably 64M or more of RAM - 16M in "Run from CD" mode should be able to get a shell (and the first thing you should do is login as root and setup a swapfile/partition somewhere) - Optionally USB 1.1 (and even 2.0) as UHCI/OHCI + EHCI - Optionally an Ethernet adapter - Optionally VESA VBE 2.0 framebuffer graphics - Optionally PS/2, USB or serial mouse - serial mouse is untested but the module is included; YMMV - More than 768M of RAM is too fancy - 64-bit processor is too fancy ## ext/ ------- Note: I havent touched this in a while Is a little fun adventure of getting a C compiler on an i586con system -- buildroot doesn't want to know of this, they purposefully refuse to support shipping a gcc for the target -- but also i dont really need gcc (also have you heard of how much RAM it uses these days?) So, TCC (Tiny C Compiler) will do just fine, and is actually fast on ancient hardware too :) Anyways, ext/ has scripts to create a "bolt-on" squashfs that can be mounted at /opt on an i586con system and provides (for now) basic TCC incl. the system headers and crt*.o files from buildroot and make. ## *on quickly -------------- Ever tried to boot even a bog-standard modern debian CD on an actual Pentium 233? You should grab a drink and a snack for that... Or a modern gparted live CD, or other similar things... And this is also a problem for Pentium 2 (and early 3) era hardware. That was the initial desire I had when i started this... It should just be a small linux system, and be able to drop me into a working usable shell snappily - and the less CD drive abuse I have to listen to, the better. /rant
About
Ramdisk console linux for old computers
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published