# FreeBSD 7, 8, 9, 10 etc. on 486, Pentium, K6, etc.



## Uniballer (Jul 2, 2014)

I still have some old hardware, some of which I actually have a use for (I guess the rest is just retro-computing).  I thought I was version locked on 6.4-STABLE on these old systems because the GENERIC kernel on the installation media would not run on later versions, but I recently realized that this is mainly due to the old motherboards not having an APIC or proper ACPI support.  I have found that 9.3-PRERELEASE will run on the old hardware if I build a custom kernel (NOAPIC, NOSMP, NOACPI seems to be the key).  Of course, it makes installation a bit of a pain.  Is there an easier way than building a system disk by hand with a custom kernel on a working system?  Remember that you can't count on booting from USB, or maybe even CD, on these old machines.


----------



## wblock@ (Jul 2, 2014)

If they're new enough to have PCI slots, install a network card that can netboot.  Then build your custom installer and host it on the server.

Machines with only ISA slots might be able to do it.  A lot of those old cards had ROM sockets, but I never had one with an actual ROM.  There are iPXE floppy images, too.


----------



## Uniballer (Jul 2, 2014)

One of the problems is that the BIOS on old motherboards doesn't understand big disks.  Some of the ones I have are limited to about 2GiB, some to around 8.4Gib.  So hand building the system disk includes partitioning the disk so that the boot code and all of /boot are within the range that the BIOS can load.  The easiest way is to make the root filesystem pretty small (<1 GiB) and have separate filesystems for /tmp, /var, /usr, /home etc.  Just like sysinstall used to do it.

I was thinking it might be possible to `make memstick` with my custom kernel and copy the image onto an IDE disk drive installed in a USB carrier on the build system, then cable the resulting disk directly to the motherboard as a secondary drive.  If I could boot from that then I could do an ordinary install pretty easily.  Would that be likely to work?  I took a shot at it and so far it fails really quickly.  How would I build that for an i386 system on an amd64 system?

I assume that I'm doing it wrong because I'm misunderstanding something crucial.  Here's what I did that failed:

```
cd /usr/src
make buildworld TARGET=i386
make buildkernel TARGET=i386 KERNCONF=OLDKERN
make installworld TARGET=i386 KERNCONF=OLDKERN DESTDIR=/home/me/release
make installkernel TARGET=i386 KERNCONF=OLDKERN DESTDIR=/home/me/release
# so far, so good
cd release
make memstick TARGET=i386 KERNCONF=OLDKERN DESTDIR=/home/me/release
```

Here is the whole output:

```
mkdir -p dist
cd /usr/src/release/.. && make TARGET_ARCH=i386 TARGET=i386 distributeworld DISTDIR=/usr/obj/usr/src/release/dist
mkdir -p /tmp/install.aVbEqRe0
progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown  date echo egrep find grep id install install-info  ln lockf make mkdir mtree nmtree mv pwd_mkdb  rm sed sh sysctl test true uname wc zic tzsetup; do  if progpath=`which $prog`; then  echo $progpath;  else  echo "Required tool $prog not found in PATH." >&2;  exit 1;  fi;  done);  libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u |  while read line; do  set -- $line;  if [ "$2 $3" != "not found" ]; then  echo $2;  else  echo "Required library $1 not found." >&2;  exit 1;  fi;  done);  cp $libs $progs /tmp/install.aVbEqRe0
cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.aVbEqRe0/locale
mkdir /home/me/release//usr/obj/usr/src/release/dist/doc
mkdir: /home/me/release//usr/obj/usr/src/release/dist: No such file or directory
*** [distributeworld] Error code 1 (ignored)
mtree -deU -f /usr/src/etc/mtree/BSD.root.dist  -p /home/me/release//usr/obj/usr/src/release/dist/doc >/dev/null
mtree: /home/me/release//usr/obj/usr/src/release/dist/doc: No such file or directory
*** [distributeworld] Error code 1

Stop in /usr/src.
*** [distributeworld] Error code 1

Stop in /usr/src.
*** [base.txz] Error code 1

Stop in /usr/src/release.
```

I seem to get very similar results if I try to `make release` instead of `make memstick`.


----------



## Uniballer (Jul 2, 2014)

I guess I have to leave off the `DESTDIR=` for the `make memstick` target.  I don't know yet if it's doing what I wanted, but at least it's doing something.


----------



## wblock@ (Jul 2, 2014)

Can't speak to the details, but in theory it should work.  Netbooting is easier, though.


----------



## Uniballer (Jul 3, 2014)

It worked.  As to whether or not it is the best way, I don't know yet.


----------

