Tuesday, August 22, 2017

How to get involved in FreeDOS

Interested in getting involved in FreeDOS, but aren't sure where to start? We have several ways for new developers to get engaged. Here are two starting points:

Port FreeDOS utilities to OpenWatcom
When we created FreeDOS in 1994, there weren't a lot of Free software or open source software C compilers for DOS. The few that existed were subsets of C, or so limited in their functionality that they weren't useful in creating the FreeDOS utilities. The most popular C compilers of the era were Borland's C Compiler and Turbo C Compiler. (A few years after FreeDOS, Borland released the Turbo C Compiler at no charge as part of their "Museum" collection of old DOS software.) It's not surprising that a lot of FreeDOS utilities were written using one of Borland C or Turbo C.

Since then, the folks over at OpenWatcom have released an open source software C compiler for DOS. But many FreeDOS utilities must still be built using the closed source compilers. We prefer to be able to compile all code in a compiler we can distribute in FreeDOS itself.

I encourage any new developer to pick up a FreeDOS utility, and port it to the OpenWatcom C Compiler for DOS. The difficulty level here is variable. For simple file tools, this is likely straightforward and may require little work other than writing a new Makefile instruction. For other utilities, such as disk tools, there may be much more work involved.

If you take on this challenge, I also encourage you to reach out to the program's developer or maintainer. The FreeDOS utility may not be abandoned; more likely, the developer may not have needed to make new releases if their utilities are feature complete and haven't had bugs reported in years.
Port GNU Utilities for FreeDOS
Years ago, the "GNUish" project ported many GNU utilities to DOS. But eventually the project stalled. Before GNUish shut down, they asked us to mirror their files. You can find them at gnuish on ibiblio. As far as I know no one has created a comprehensive update to GNUish.

I think it would be great for someone to pick up the GNUish project again. Port the GNU Utilities to FreeDOS using OpenWatcom, or DJGPP. This is likely challenging, as it will require creating wrappers for different functionality, and workarounds for other functionality that doesn't exist on DOS.

If you're interested in contributing to FreeDOS, but you aren't sure what to work on, you might consider porting the GNU Utilities or other Unix utilities to FreeDOS. We'd love to add them to our archive. Read more at Unix utilities for FreeDOS

Saturday, August 5, 2017

FreeDOS for OEM

Jerome Shidel contributed this article for the FreeDOS summer coding blog challenge, about how to use FreeDOS for OEM PCs.
Different computer manufacturers will sometimes include FreeDOS as a pre-installed operating system option. This is always great to see! And FreeDOS, like any DOS, is pretty easy to set up as a pre-installed operating system.

When creating the FreeDOS 1.2 installer, I thought it would be good to keep this subject in the back of my mind. How can we make FreeDOS easier for original equipment manufacturers (OEMs) to include as a pre-installed operating system?

All of those computers, the ones that ship with their only installed operating system being FreeDOS, they should be considered. Yes, I do realize that mostly they are sold outside of the United States as a low cost option. And, users will most likely just be installing a copy of Windows or Linux onto them. But, I figured there may be some people that get them to run FreeDOS. So, I kept that in mind while designing how the installer handles certain things. Nearly always, I attempted to maintain an OEM PC compatible and extensible design. I knew it should work. But, I was very busy prior to the 1.2 release and never got around to testing it.

Now that FreeDOS 1.2 has been out for a while, I wanted to come back to the subject. I finally have tested it, and wow—it is awesome!

So, here is the quick way I made an OEM PC style setup with FreeDOS 1.2:
  1. Create a USB fob drive using the USB "Full" installer (FD12FULL.img).
  2. Boot that USB fob drive on the PC.
  3. When the installer launches, select the language then exit to DOS.
  4. Run FDISK 2
  5. Create your FreeDOS Recovery Partition. In my test, I used 1024MB.
  6. Exit FDISK and reboot the computer.
  7. When the installer launches again, select the language then return to DOS.
  8. Run FORMAT D: /q/u/v:FD-RECOVERY
  9. Run XCOPY /E C:\*.* D:
  10. Run SYS D:
  11. Run FDISK 2
  12. Activate the Recovery Partition on the D: drive.
  13. Create the user's big main FreeDOS partition, but do not activate it.
  14. Shutdown, then clone the drive a couple million times.
Once done, it has a couple really cool effects:
  • The first time the PC is booted, the user gets to install FreeDOS. They even get to pick their language and keyboard settings for their install. Afterwards, when the system reboots, it boots into their install.
  • The C: drive is that big user partition and the D: drive is the Recovery Partition. The Recovery Partition has all of the packages from the FreeDOS 1.2 distribution. So, you can use FDIMPLES to install and remove more packages with out needing to insert any additional media.
  • OEM vendors could add additional packages. Vendors might do this for networking and sound drivers. Those custom packages could be configured to be automatically installed.
There was only one issue of note that I found. If the user wishes to reinstall over their existing installation, using the Recovery Partition, they will need to change their active partition using FDISK to the Recovery Partition. Otherwise, the SYS transfer will fail. This actually has to do with force-updating of the MBR code, and not the simple SYS transfer. You can also avoid this problem by running the FreeDOS Installer in Advanced mode and “Not transferring the system files.” But, it is easier just to re-activate the Recovery Partition and reboot.​