The fixes which were included in VirtualBox 4.0.8 happen to help not only OS/2 1.x but also Xenix. The 386 versions of Xenix 2.3.x (not necessarily older versions!) should install in a VM without trouble, but the 286 versions are trickier. The reason for that is deceptively simple: different distribution media.
Xenix is one of the few operating systems which determine the format of diskettes based on the floppy drive type. In contrast, all operating systems which use DOS formatted floppies (including DOS, OS/2, and Windows) use the information stored on the diskette itself to determine its format.
VirtualBox by default emulates a 1.44 MB 3½” floppy drive. Attempting to boot Xenix 286 version 2.3.2, which comes on 1.2 MB 5¼” floppies, ends up like this:
The error message isn’t very obvious, but the failure to load /etc/emulator means Xenix is confused about the filesystem on the floppy. The kernel itself is loaded by the BIOS and can be successfully read even when the 1.2 MB floppy image is used in a 1.44 MB drive. It’s of course physically not possible to use 5¼” 1.2 MB floppies in 3½” 1.44 MB drives, but it is possible to format 3½” high density diskettes as 1.2 MB media.
Note the message indicating the floppy type as 135ds18. In Xenix parlance, that means 135 TPI drive (high density 3½”), double sided, 18 sector per track. In other words, standard 1.44 MB drive.
So how to fix it? It’s actually quite easy. The solution is setting the VM’s floppy drive type to 1.2 MB. The functionality is not exposed in a user-friendly way, but the VBoxManage command can be used to set the type:
VBoxManage setextradata <vm> VBoxInternal/Devices/i82078/0/LUN#0/Config/Type "Floppy 1.20"
With that small change, the Xenix 286 installer successfully starts:
Notice that the floppy drive type is now 96ds15, indicating a 5¼” 1.2 MB drive. Xenix 286 can now be installed.
- The virtual hard disk should be 500 MB or smaller or Xenix will have trouble using it.
- When Xenix asks to “hit any key to reboot” after shutting down, reset the VM instead using the <Host>-R key combination.
I always get requests on Xenix, but I always wonder what on earth do people want to do with it? From what I understand there is a bunch of multiuser foxpro stuff floating around, although nobody shares…. I always wonder why the interest in the 286 version of Xenix, I mean in this day & age doesn’t everyone have 32bit machines….?
Just wondering, what’s your take on why Xenix 286 is so… popular? Or even Xenix 386?
I doubt there’s anything Xenix can do better than any old Linux of FreeBSD release. Yes, there’s FoxPro for Xenix, there’s MS Word, maybe a few other apps. Nothing really attractive that I know of.
But I understand the attraction of wanting to experience Microsoft’s version of UNIX, and the best-selling *nix system of the 1980s. 16-bit x86 UNIX is just as exotic. Xenix for the 286 was one of the first (if not the first) protected-mode operating systems for the AT. 386 Xenix was the first 32-bit OS available for the PC, years before any other significant 386 OS showed up. It’s also fun to trace which Xenix features ended up in Linux. Virtual consoles anyone?
So yeah, I can kinda understand why Xenix is interesting. I’m not sure it counts as “popular” 🙂
Well, you guys wanna have a SERIOUS CHUCKLE ?
I have an app that is running with a 286 version of RM/COBOL , but in a Xenix 2.3.4 386.
I managed (with great adventures) to suck the disk using old PC + knoppix + dd + nfs + my laptop , and then dd’ed that into a USB stick, stuck it into my laptop, booted SCO Openserver 6 running in Virtualbox 4.1.8, mkdev hd’ed it, divvied it, dd’ed the needed partition into an image. Then engaged a buddy of mine to “recreate the file system”
then we stuck all the data, and RMCOBOL into a Virtualbox 4.1.8 running Xenix 386, using KERMIT (which I copied into the Xenix using a DOS diskette image), via a Host Pipe, from another Virtualbox running fedora.
Probolem is, the “./rmcobol” command dumps core, instead of giving me the standard “Usage…..” message.
Any clues ? is this maybe that the Virtualbox cannot execute 286 code, when running a 386 OS ?
????????????????? I am open to all ideas, I even tried linux-abi, iBCS, running on RedHat 7.3 (all stopped at x286emu, which just says “segv!” and exits LOL)
Are you running OpenServer in a VM or is it Xenix 2.3.4? The latter should work.
Unfortunately, a core dump means everything and nothing. There are far too many possible causes. You have the core dump, you should be able to analyze it… At any rate, VirtualBox certainly can execute 16-bit code in a 386 OS.
The crash could be caused by some virtualization bug, but it could just as well be an incorrect transfer of the app. You could try some checksums etc. to verify that the files at least were properly copied. It may also be worth checking of the original system has some special configuration.
Unfortunately, this fails in VirtualBox Version 4.1.22. Setting Type to “Floppy 1.20” causes the VM to fail to start. Without this fix, I get exactly where you got, so it is indeed the floppy configuration. I have not been able to find any sort of documentation on the type values for the floppy. In fact, the documentation for anything one level down in VBoxManage is seriously lacking.
Any idea what they changed “Floppy 1.20” to?
You’re making the common mistake of assuming that if you can’t get feature X to work, feature X must be broken. As far as I can tell, it’s not. I can change the floppy type (on VirtualBox 4.2.0, but there’s no reason to expect it’s any different from 4.1.x) exactly as described in the above post… so all I can say is that it works for me and I don’t know why it’s not working for you. Especially since you didn’t provide any detail, such as why exactly the VM failed to start (at least the VBox.log file should contain a specific error message).
Unfortunately Virtualbox can’t change anymore the floppy drive type.
I guess they “optimized” Virtualbox because they thought, nobody uses anymore floppies.
Now it seems that Virtualbox assumes ALWAYS a 1.44 MB floppy drive.
Even if you tried to change it by VBoxManage.
Make sure you open a bug ticket for that. Problems get fixed, but complaints need to be properly directed. Which is true of all such projects.
Installed Xenix 286 2.3.2d on 1st try using VirtualBox 5.2.18.
@peter: That’s funny, it works fine for my VMs on both VBox 5.1.22 and 6.0.4 (after running that command, the VMs see the drive in question as a 5.25″ drive [for instance, Windows VMs at least from 95 through 7 show the 5.25″-drive icon in Windows Exploder rather than the 3.5″-drive icon, and 95, at least, shows 5.25″-specific formatting capacity options rather than 3.5″-specific ones]); the only ones for which I _can’t_ confirm that it works are Windows 8 and newer, which I can’t get to recognise any VBox emulated floppy drive _at all._