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.​

No comments:

Post a Comment