Howto run FreeBSD 1.0 in an emulator

I was aware of this release, but seems there is some interest on the forum to see the state of version 1.0 of our OS :)
Instead of trying to run it "natively", this is an archaic OS used on very old PCs. Many of the peripherals this OS run worked in 16 bit mode. An PC emulator sounds like the most straightforward choice to make.

First things first, install emulators/86box.

Then go on and download https://winworldpc.com/download/40632273-18c3-9a11-c3a4-e284a2c3a570. Unzip the archive to get the ISO, and then extract the whole ISO somewhere on the disk.

Everything, including system requirements, can be found at floppies/install.txt file, cdinstall/INSTALL.TXT. Read as much as you can. There is a lot you can skip, about preparation of installation floppies on other OSes and such.

Apart from users basic understanding of installation procedure, which is very lean, the challenge of installing FreeBSD is matching both the hardware and its configuration, which back in the day, was done mostly statically, by jumping stuff around the boards. And here we also need to know what out emulator can provide of that hardware to find the match. If you go on without prior knowledge of affairs, via trial and error, you will find many of the platforms will simply refuse to work.

The scope of this first part of howto will be to install and boot into the system by setting up the proper 86box config. In subsequent parts we will explore networking, X Windows and running proprietary Unix software.

We will use the combination of IDE drive, a SCSI CD-ROM, but will perform a floppy based install. I find this procedure the most stable one. Also keep in mind that floppy images are for 5 25 drives, 1.2M.

(continued in next post)
 
Fire up 86box, click on new machine and type some nice name for your new FreeBSD installation :). Don't mind the IBM ROM message if you get it, click OK. Now we should be in the settings screen.

We will, as is historically accurate, use a late 386DX w/ 16 MB RAM system for this.

1769183116886.png


Make sure to always match what is in screenshots, all the values!
Next, left, click Display and set up a venerable Trident card :

1769183176947.png


Click on configure to set video RAM to 1 MB

1769183234438.png


Left side, "Storage controllers" next. We want to have this configuration :

1769184294494.png


Click on configure next to Adaptec SCSI, and the values should be this

1769184412425.png
 
Now lets jump down to "Hard disks" and define a hard disk image - click on "New"
We will use the following geometry :

1024 cylinders
16 heads
63 sectors

Type it into the boxes.

It should equal 504 MB and it is the biggest hard disk type that old CHS based controllers can work against, a safe value.

Also use a raw image, not VHD. And drop down the speed from ramdisk to ATA-2. The result should look like this :

1769184541597.png


Finally we have the "Floppy and CD-ROM drives"

1769184589963.png


With this we're ready to boot the machine. Click OK to close the settings window, and power it on via Play button or by double click.

As soon as the machine window appears, click on Media (in the menu), Floppy 1 -> Existing image, and select the floppies/kcopy_ah.flp from where you extracted the CD. Then we'll mount that CD directly too, and leave it in, because this system cannot boot from CD. So Media->CD-ROM 1 (SCSI) ... -> Image and select it.
The machine should be booting to POST, hit the Del key to go to BIOS Setup. Press enter to go to Standard CMOS setup, press enter again at message, and then navigate using keys described at the bottom. Hit down key until you get to Hard Disk C: Type values, and then enter our CHS in the fields. It should come up as :

1769185559335.png


Hit ESC to get out, go down and select save and reboot.

Our emulated PCs configuration is 100% done and we're now ready to get on with FreeBSD installation.
 
The machine now should boot from kcopy_ah floppy and then, ask for filesys floppy, so switch it in the menu, hit enter and allow for kernel to boot :

1769185980100.png


If you set up everything correct, you should see the IDE and SCSI CD ROM detected

1769186046241.png


We're now into question phase for which all defaults are usable. You can hit enter until you get to final yes/no, of course slowly with understanding of what's being done.

1769186212671.png


At this point, type yes.

Here - the fun part starts. The installation is nowhere done after this point. We're prompted with a procedure to execute :

1769186348887.png


So the system is merely partitioned. In FreeBSD 1.0 world we install stuff manually :)
First is to halt this one, reboot into kcopy_ah.flp again, but hit enter at the filesys prompt. This will allow us to copy a kernel to our wd0a disk installation.

1769186659082.png


It will halt the machine when done, so remove the floppy img from the drive.

The next phase is the first drive boot. (continued)
 
Reboot the machine and on first boot FreeBSD kernel will automatically extract the mini-fs floppy from cpio floppy. When asked, insert it and hit enter.

1769186832805.png


Copying takes a while. Don't worry about 'File exists' error here. Hit enter to avoid installing the optional dos floppy. Then halt, remove the floppy img from drive, and reboot.

You will be greeted by a strong README message saying it's all-OK and OS must halt/reboot again, and it will do so automatically.

Finally, we boot to a mini-FreeBSD 1.0!

1769187188585.png


Now when you press return you'll get a bunch of instructions on how to tape or floppy load the distribution sets. We don't need that, as we have extraction scripts on the cd, so lets go ahead and mount/run them;

1769187288950.png


It takes a while to complete (it's a 6x CD-ROM...). Don't mind the file errors, because they're the running processes of existing files.

And voila! That is it, the basic installation of FreeBSD 1.0 :) We are now left to perform initial system configuration. For that we use configure to get into the hostname/networking wizard, answer 'n' to the ethernet interface as we'll do one later.

As we reboot, we'll be now greeted into a configured and installed FreeBSD running multiuser environment and services. We can login with root, no password is set.

1769188079489.png


And that concludes today's posts, with the functioning system.
I forgot to mention in the opening, ports and packages, I will do them next.

Here is also resulting hdd image and 86box configuration for your convenience :

 

Attachments

  • 1769187646617.png
    1769187646617.png
    122.4 KB · Views: 21
Just extract the src dist and build it as you would
The Makefile doesn't work on 14.3 i386.

Command: make
===> bin
===> bin/cat
make[2]: "/tmp/filesys/usr/src/share/mk/bsd.prog.mk" line 66: The .else directive does not take arguments
make[2]: "/tmp/filesys/usr/src/share/mk/bsd.prog.mk" line 73: The .else directive does not take arguments
make[2]: Fatal errors encountered -- cannot continue
make[2]: stopped in /tmp/filesys/usr/src/bin/cat
Lines 66 - 73 of bsd.prog.mk:
66 .else defined(LDONLY)
67
68 ${PROG}: ${DPSRCS} ${OBJS} ${LIBC} ${DPADD}
69 ${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
70
71 .endif
72
73 .else defined(PROG)

This doesn't mean anything to me but someone may spot something which needs changing so that make works.
 
If you really want to build on a modern FreeBSD it is certainly better to compile the old make(1) first instead of hacking up the Makefiles.
 
The Makefile doesn't work on 14.3 i386.

Of course it doesn't. You have to do that on FreeBSD 1.0

I've switched the CPU to 486 iDX4-100 which is fastest this board supports, and running the build. When I used fast forward functionality of emulator, the build failed. It seems to be running well in normal mode.

I will keep on and report the (rough) time to build the world
 
I wonder how long a `make world` takes on a today's machine.

First you have to move the installation to a modern machine because you cannot install it on one for multiple reasons.
Then, if it has enough legacy support, it may be able to work against the "IDE controller".

And then it would be hard to use that installation because no network support. Actually that system will be limited to interacting with emulated BIOS, emulated legacy mode IDE controller, and VESA/VGA ports and memory addresses.

On top of that you may have number problems with too large memory amount, too big of a CPU freq, etc.

If you manage to avoid all these issues then I guess you could make a demonstrator for builds.
 
Just to be clear, it probably doesn't have to be only FreeBSD 1.0, maybe a bit less arcane version like 7-series, but we're running that now.
It would be great if the build could be achieved on modern FreeBSD, haven't looked into that.
 
It is a bit of weird question to make. This product is from 1993. Your 14-series is from 2025.
The tooling has long ceased to be compatible.
I think i386 is pretty established. Going to try this emulated for fun. Maybe I can try something on an unused Digital 486 with a SD2IDE card that I have. Is there any hardware support list? I wonder if an old 3com ISA card can do something. Otherwise we still might have working serial and parallel ports to avoid actual floppies. I have 1000 but most are permanently rotten.
 
It is a bit of weird question to make. This product is from 1993. Your 14-series is from 2025.
The tooling has long ceased to be compatible.
But why shouldn't source code compile?

I ran

cc cat.c -o cat


and it produce an executable.

file -s cat
cat: ELF 32-bit LSB executable, Intel i386, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 14.3, FreeBSD-style, with debug_info, not stripped
I guess I am asking a dumb question, but to my mind 'hello world' written in 1972 should continue to build today. But as I say, it may be a dumb POV.
 
balanga No you're not asking a dumb question. All the tools have changed the defaults into something else. Since a while, cc on FreeBSD builds ELF binaries by default, so you have to tell it to build a.out. I don't think the march for "i386" is actually i386 because modern 32-bit FreeBSD does not run on anything below Pentium Pro, so you should also set that manually.

In my opinion, if I went about it, I would first compile the GCC that is used on FreeBSD 1.0 using modern cc and test it. Then I would move onto building tools like make, sed, everything that is run by Makefile of /usr/src can't be a modern version because the defaults have changed. I would only trust bourne shell compatibility and not much more. When all that is done, and it is not a small task, chrooted build attempt might happen.

Don't take my initial question as criticism, I just happen to be aware that best practice with working with ancient code is try to get as historically-close environment as you can. Besides, modern compilers do not emit optimized code for ancient architectures because those optimizations slow down the "regular" use case of building for modern platforms. For example if you want to make stuff for DOS for 90s machine you would use 90s GCC for DOS and not the fresh ones. You could use fresh ones, if your target is DOS but modern, such as FreeDOS-based utility ISO application.
 
Maybe I can try something on an unused Digital 486 with a SD2IDE card that I have. Is there any hardware support list? I wonder if an old 3com ISA card can do something. Otherwise we still might have working serial and parallel ports to avoid actual floppies. I have 1000 but most are permanently rotten.

Ethernet controllers
SMC/WD 8003, 8013, and equivalents
(including the SMC "Elite" series)
Novell NE1000, NE2000
3COM 3c503
ISOLAN ISOLink

I have initially failed to install on a Large or LBA drive, so I picked largest CHS values. If your SD2IDE is fully software and uses .img as backend you can try booting the image I left on the google link. If it's 1:1 to SD card it's going to be too large.

CF cards are native IDE and ofc you can under-provision it with 504MB geometry.

Biggest issue with real hw is SCSI reliance for larger drives and CD ROMs, unless you have ancient 2x Mitsumi+controller combo...

Fastest way to get this to real hardware is to install on emulator, install distribution sets but no configure, and then dump the image to a CF card. The real PC should boot it, the disklabels should match.
 
Back
Top