You are not logged in.

#1 2017-12-04 19:14:34

deep42thought
Administrator
From: Jena, Germany
Registered: 2017-06-17
Posts: 236

i486 motivation thread

Originating from a probably not that serious comment from Andreas Baumann, I'd like to start a thread to motivate him (and anyone else involved) getting archlinux32 ported to i486.

So this is (part of) my setup.
P1090603_.JPG
The bottom left one is my raspberry pi 1 running archlinux arm, the other is my router which currently runs debian. (The devices are mounted beneath my desk.)
It is an ALIX 2d3 doing various net-related tasks:
dhcp, routing, wifi, vpn, dns, nat64, dns64
I also tried running a tor node on it (and combining it with dns resolution of .onion tld), but this was too much for the small cpu. smile

Anyway: Once archlinux32 will be available for in86 with n<6, I'll give it a shot and try switching to archlinux32 on that box.

Offline

#2 2017-12-05 16:59:09

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 346
Website

Re: i486 motivation thread

And I thought I'm the only one crazy enough to host his central infrastructure on an Alix and a Raspberry PI. :-)

alix_rpi.jpg

I have a split horizon DNS, DHCP, firewall on the Alix, it's running OpenBSD (which I will not change even
if I have a i486 build).

The Raspberry PI (a Pi 1) runs the mail, Roundcube webmail, my home page and some other Joomla-based
web content (which I cannot recomment on that limited system because Mysql doesn't play well on it).

Real i486 hardware is darn expensive nowadays, the oldest thing I have is a 150MB RAM Pentium I motherboard
which will serve as a test base for the distro. Also a AMD K6 is on the list as test server.. :-)

Offline

#3 2017-12-28 16:12:17

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 346
Website

Re: i486 motivation thread

I don't want to spoil Christmas, but we don't need an i486-specific build for the Alix boards.

Just installed on an Alix 1.E with AMD Geode LXD800 a Vanilla Archlinux32 for i686.
The CPU has all necessary commands it seems.

pacstrap onto the CompactFlash, no problem.

The only tricky part was to get past booting:

/etc/mkinitcpio.conf
MODULES=(pata_cs5536)
mkinitcpio -c /etc/mkinitcpio.conf -p linux

noatime in /etc/fstab

etc/sysctl.d/99-writeback.conf
vm.dirty_writeback_centisecs = 1500

I need older hardware to test the i486 on the real thing.

Still, systemd needs some taming (no journal or in memory journal and hell no
coredumps to the Compact Flash!).

Some really useful links:

https://wiki.ubuntuusers.de/Alix/CF-Boo … erstellen/ (German, sorry)
https://www.daniel-boehmer.de/thinkpad-cf/#cf-ide
https://bbs.archlinux.org/viewtopic.php?id=147061
http://buecher.mamawe.net/buecher/headl … -linux.pdf (German again, sorry again)

P.S. Order a 2 GB CF at least or you have a hard time to install even a very basic Archlinux32 :-)

Offline

#4 2017-12-29 10:03:56

deep42thought
Administrator
From: Jena, Germany
Registered: 2017-06-17
Posts: 236

Re: i486 motivation thread

hmm, interesting.
I tried to get i686 linux running on my alix once (I'm not 100% sure, I tried archlinux, too) and failed - also debian with i686 kernel didn't work out for me, but debian with i586 kernel did.

Offline

#5 2017-12-31 17:28:52

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 346
Website

Re: i486 motivation thread

First ISO and cross-compiled packages for i486 are running.

http://archlinux32.andreasbaumann.cc/i486/
http://archlinux32.andreasbaumann.cc/arch486isos/

Please don't use yet. They are not really Archlinux-y yet (for instance uinit instead of systemd).
And not yet self-hosting, meaning I cannot compile the Archlinux32 i486 on the system itself yet.

A first working machine is one without CMOV:

vendor_id       : AuthenticAMD
model name      : AMD-K6(tm) 3D processor
flags           : fpu vme de pse tsc msr cx8 pge mmx syscall 3dnow k6_mtrr cpuid 3dnowprefetch vmmcall

The build process is a shell script (or text file) with 2'440 lines, not yet suitable for publishing.

But in principle I'm using crosstool-ng for i486, then I use 'asp' to fetch the PKGBUILDs and apply patches
from Archlinux32 and specific i486-cross-compilation patches, finally I build the package, install it into
a 486-chroot (for creating the CD and for chrooting), and into the toolchain sysroot. Seems to work. :-)

AMD-K6.jpg

Offline

#6 2018-04-07 08:56:10

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 346
Website

Re: i486 motivation thread

A very first ISO is available: http://archlinux32.andreasbaumann.cc/ar … 7-i486.iso

Currently you can install only base and base-devel packages, the rest you have to build on your own as I
don't have a buildmaster or slave yet set up for continuous i486 package building.

Currently booting the ISO and installing from it needs at least 288 MB of RAM, during installation I recommend
adding a 512MB swap and mount it as very first action before doing a pacstrap or a mkinitcpio.

The memory demands of the standard squashfs-based ISO root file system and the glibc-based RAM disk
make it currently impossible to boot on real vintage computers with as little as a i486 with 32/64 MB of RAM.
That's the next goal to provide non-memory intensive special ramdisks and ISOS. Also installing via PXE/NBD
seems to be a requirement for old vintage machines.

The standard ISO is for machine with enough RAM but not having a "modern" CPU like AMD K5/K6, real Penitum I and II,
and i486 and clones.

BTW: Using the official NBD mounting with archiso_nbd_srv and archiso_nbd_name with the ISO is an option if you have at
least 768MB of RAM as the ISO is slurped into a ram disk with an overlay filesystem.

Offline

#7 2018-04-10 19:23:41

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 346
Website

Re: i486 motivation thread

A good way to install to low-memory machines seems to be to use PXE/TFTP to load the
kernel and the RAM disk. The RAM disk itself should have the mkinitcpio-nfs-utils mkinitcpio-nbd
hooks installed as follows:

MODULES=(8139too e100 nbd isofs)
BINARIES=(/usr/bin/mount.nfs4 /usr/bin/nbd-client)
HOOKS=(base udev autodetect modconf block filesystems keyboard net nbd)

This has to be built on a i486 installation (I'm using a virtual image for this).

Then I set up a tftp-hpa (atftp always runs into timeout issues, no clue why?)
with a structure like this:

/srv/tftp/*.c32 (from syslinux)
/srv/tftp/*.bin (from syslinux)
/srv/tftp/pxelinux.cfg/default
/srv/tftp/initramfs-linux.img
/srv/tftp/vmlinuz-linux

The kernel can be taken from the linux pacman package (the one installed on the VM).

/srv/tftp/pxelinux.cfg/default contains the necessary configuration to load the kernel and
the ramdisk via TFTP:

say Archlinux32 i486 NBD based install

default linux
prompt 1
timeout 100

label linux
com32 cmd.c32
initrd initramfs-linux.img
linux vmlinuz-linux
append rw nomodeset ip=:::::eth0:dhcp nbd_host=<IP of NBD server> nbd_name=arch486install debug root=/dev/nbd0

cmd.32 and nomodeset are important as some old machines really don't like VGA mode switching and KMS fiddling
(neither does my old Olivetti CRT monitor, 30 years old and still working!).

You have to configure your DHCP server to hop to 'next-server <IP of TFTP server>'.

Now the NBD server has to serve the airootfs.sfs as unpacked file system:

truncate -s 2G /data/nbd/arch486install.img
mkfs.ext4 -O ^64bit /data/nbd/arch486install.img
mount -o loop arch486install.img /mnt
mount -o loop archlinux-2018.04.07-i486.iso /media/cdrom
cd /mnt
unsquashfs /media/cdrom/arch/i486/airootfs.sfs
mv squashfs-root/* .
rmdir squashfs-root
# add the unofficial i486 mirror
sed -i 's/Server/#Server/g' /mnt/etc/pacman.d/mirrorlist
echo 'Server = http://archlinux32.andreasbaumann.cc/$arch/$repo' >> /mnt/etc/pacman.d/mirrorlist

In /etc/nbd-server/config:

[arch486install]
        exportname = /data/nbd/arch486install.img
        copyonwrite = true

So now, 64 MB is sufficient to boot an old 486 and install from the mounted NBD root as usual.

Just make sure to add a swap partition or swap file before doing anything memory consuming. :-)

Another caveat: Use mkfs.ext4 -O ^64bit for 32 bit systems..

Caveat 2: If I say PXE, I mean, use iPXE, I had some weird issues with some network firmware claiming
to support PXE. iPXE has a i486 bug, so has syslinux, use versions from around 2011 which are still running
(I used iPXE aaf7a35207f4fa88c6d3e1b1e26d1950c19a8169 and syslinux 4.07).

And a side note: using the default ISO with archiso_nbd_srv=<IP of NBD server>
archiso_nbd_name=arch486iso and archiso.img is an option if you have more than 768 MB RAM.

Offline

Board footer

Powered by FluxBB