Install FreeDOS via Bootcamp

Is it possible to run FreeDOS via Bootcamp on a Mac?

If so, what are the instructions for doing so?


There were a few housekeeping chores that I preformed before booting from the FreeDOS DVD. I have both Yosemite and El Capitan installed on my Mac. To avoid SIP problems, I chose to preform the chores while booted to Yosemite. SIP was still enabled, but Yosemite ignores the SIP settings. I assume you can use El Capitan with SIP disabled.

I required the partition, that I chose to install FreeDos, to meet certain requirements.

  1. The partition must be formatted MS-DOS (FAT) by the Disk Utility application. Note: Later when installing FreeDOS, I reformatted the partition again.
  2. The partition must appear in the the Master Boot Record (MBR) partition table. The contains of the this table can be displayed by using the following command.

    sudo  fdisk  /dev/disk0
    

    If you are installing on a second internal disk, then replace disk0 with disk1.

  3. The id shown in the MBR table for this partition must be 0C. This usually occurs after formatting the partition as MS-DOS (FAT). In my case, I first had to format the partition as "Mac OS Extended (Journaled)", then format as MS-DOS (FAT). This must be a bug in the Disk Utility.
  4. The partition must be flagged as active in the MBR table. By "active", I mean "bootable". The active partition is marked with an asterisk * character in first column of the output from the

    sudo  fdisk /dev/disk0
    

    command. You can use the

    sudo  fdisk  -e  /dev/disk0
    

    command to change the active partition. The proper interactive command is flag.

Note: More information on the fdisk command can be found by entering the command man fdisk or online here.

I also had additional requirements.

  1. The Mac needs to be set to boot using legacy mode. This can be done with the bless command. In my case, I was installing to the 4th partition on disk 0, so I used the following.

    sudo  bless  --device  /dev/disk0s4  --setBoot  --legacy
    

    The 0 represents disk0 and the 4 represents the 4th partition. Actually, when booting in legacy mode, the partition is chosen by the bootstrap code stored in the MBR. It is safe to assume this code will choose the partition set active in the above step 4. So when booting, the partition value set by the bless command will be ignored.

  2. The MBR must contain valid bootstrap code or no bootstrap code. OS X is installed without this code. This is why you see the warning message below when using the fdisk command to change the MBR.

    fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
    

    When I installed FreeDOS, the MBR contained the bootstrap code that was being used by Windows 10. You can view the contents of your MBR by using the following command.

    sudo  hexdump  -C  -v  -n  512  /dev/disk0
    

    If you are unsure if the bootstrap code in your MBR is valid, you can zero out this memory by using the following command. The bootstrap code occupies hex addresses 0 through 1B7.

    sudo  fdisk  -u  -f  /dev/zero  -y  /dev/disk0
    

At this point, you should be able to start installing FreeDOS using the DVD. I chose to install everything.

When I reached the display shown below, the computer seemed to freeze. In reality, the computer was just taking a long time to install software. More that just the Kernel is being installed here. This is why the progress bar does not seem to change.

web

Also, in some of the subsequent steps, I needed to press the space bar several times before the installation would proceed.

When reached the step associated with the display below, I chose 1.

enter image description here