Booting FreeDOS with GRUB


To toy around, I decided to install FreeDOS on a real system running Ubuntu. This post will document the process of adding an entry to the GRUB menu loader to boot it. Some small notes:

  • Resizing partitions with GPartEd is somewhat funky (no global progress bar) and can take some serious time (if you are moving data, it first performs a complete test run, thus taking twice as long as the vanilla operation)
  • If you use the XFDISK tool from the FreeDOS CD, you’ll have to restart the system for the installer to continue – this is a limitation of DOS, which can’t dynamically update the list of partitions.
  • By default, the FreeDOS installer doesn’t muck around with the MBR – a wise choice, but one which can make you wonder: how do I boot this thing? Read on an you will find out…
  • Some memory manager configurations presented in the FreeDOS boot menu will not work – if this is the case, try other ones.

To add FreeDOS to your GRUB menu, do the following:

  1. Find out the UUID of the partition you’ve installed FreeDOS on (you coult use the direct addressing, but UUID’s just look more fun :-)). There are several ways presented on the ubuntu forums, from which I like the following the best: ls -la /dev/disk/by-uuid.
  2. Open your menu.lst in a text editor: sudo gedit /boot/grub/menu.lst
  3. Go to the end of the file after the “### END DEBIAN …” part. That part is overwritten every time a kernel update is installed, so it is wise to avoid it, unless you want to repeat these steps frequently 🙂
  4. Add the following lines:

    title    FreeDOS
    uuid     1abf-24ac
    makeactive
    chainloader +1
    boot
    

  5. Some notes: of course you can make the title whatever you want. The UUID must be the UUID of the partition which you’ve determined at step 1. It must be lowercase (otherwise the boot will fail).
  6. Save the file and test the new entry by rebooting, entering the GRUB menu (by pressing ESC during the 3 seconds grace time) and choosing the new entry.

PS. You can read the GRUB manual for more commands, however I found it to be a little outdated (for example it doesn’t mention UUID).

, , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *