Install FreeDOS on Ubuntu Linux: Dual-Boot Guide
In this article
Yes, you can install FreeDOS on an Ubuntu Linux system, and the cleanest way is to set up a dual-boot with a separate partition. This guide walks you through partitioning, creating a bootable FreeDOS USB drive, installing FreeDOS, and adding it to the GRUB boot menu. You'll need a USB stick (at least 1 GB), a computer with UEFI or BIOS, and basic comfort with the terminal.
What You'll Need
- A USB flash drive (1 GB or larger) – all data on it will be erased.
- FreeDOS 1.3 RDOS or the latest stable ISO from the official FreeDOS website (freedos.org).
- Ubuntu installed and booting normally (any recent version).
- At least 2 GB of free disk space for the FreeDOS partition.
- An internet connection to download the ISO and tools.
Step-by-Step
- Back up your data. Partitioning and installing another OS carries risk. Back up important files from Ubuntu to an external drive or cloud before proceeding.
- Download the FreeDOS ISO. Go to the official FreeDOS website and download the latest stable ISO (e.g., FreeDOS 1.3 RDOS). Save it to your home folder.
- Create a bootable USB drive. Insert the USB stick. Open a terminal (
Ctrl+Alt+T). Find the USB device name withlsblk– it will look like/dev/sdbor/dev/sdc. Double-check it's the USB, not your hard drive. Then write the ISO with:
Replacesudo dd if=~/freedos.iso of=/dev/sdX bs=4M status=progress && sync~/freedos.isowith the actual path and/dev/sdXwith your USB device (e.g.,/dev/sdb). This erases the USB. - Prepare a partition for FreeDOS. Open the Disks utility (GNOME Disks) or use
gparted(install withsudo apt install gpartedif needed). Shrink your Ubuntu partition to free at least 2 GB. Create a new partition in the free space, format it as FAT32, and label it DOS. Note the partition name (e.g.,/dev/sda5). - Reboot from the USB. Restart your computer. Enter the boot menu (usually by pressing F12, F2, Esc, or Del during startup – depends on your motherboard). Choose the USB drive. If you have UEFI, you may need to disable Secure Boot or enable Legacy/CSM mode temporarily, as FreeDOS is a 16-bit OS and may not boot directly in UEFI mode.
- Run the FreeDOS installer. When the FreeDOS boot menu appears, choose the default option (usually “Boot from CD” or “Install to hard disk”). Follow the on-screen prompts. When asked for installation type, select “Install to hard disk” or “Custom”. Choose the partition you created earlier (the FAT32 one). Accept the default file system (FAT32). The installer will copy files and ask to install the boot manager – choose “No” for now, because we'll use GRUB from Ubuntu.
- Finish installation and reboot. Once the installer completes, remove the USB stick and reboot. Your system will boot back into Ubuntu (or possibly directly into FreeDOS if the installer wrote a boot sector – if that happens, see Troubleshooting).
- Add FreeDOS to GRUB. Open a terminal in Ubuntu. Run
sudo update-grub. This scans all partitions and should detect FreeDOS. If it doesn't, you may need to manually add an entry. Create a custom GRUB script:
Add the following (adjust partition if needed – usesudo nano /etc/grub.d/40_customhd0,msdos5for/dev/sda5):
Save (Ctrl+O, then Ctrl+X). Then runmenuentry "FreeDOS" { set root=(hd0,msdos5) chainloader +1 }sudo update-grubagain. - Test the dual-boot. Reboot. The GRUB menu should now show “FreeDOS” along with Ubuntu. Select it to boot into FreeDOS.
Common Mistakes
- Choosing the wrong device in
dd. Writing the ISO to your hard drive will destroy your Ubuntu installation. Always verify the device name withlsblkand check its size. - Installing FreeDOS's boot manager. If you let FreeDOS install its boot manager, it may overwrite GRUB and make Ubuntu unbootable. Always select “No” when asked to install a boot manager.
- Using a partition that's not FAT32. FreeDOS requires FAT16 or FAT32. If you format as ext4, the installer won't see it.
- Booting in UEFI mode without CSM. Many modern PCs can't boot FreeDOS directly in UEFI mode. You may need to enable Legacy/CSM boot in BIOS, or use a virtual machine instead.
Tips
- If you only need FreeDOS occasionally, consider running it in a virtual machine (like VirtualBox) instead of dual-booting – it's safer and simpler.
- Keep your Ubuntu partition backed up before partitioning.
- Use a USB 2.0 port for the installer if you have issues with USB 3.0 detection.
- Label your partitions clearly so you don't confuse them.
- After installation, you can remove the USB stick and keep it as a rescue disk.
Troubleshooting
- Ubuntu won't boot after installing FreeDOS. Boot from a live Ubuntu USB, open a terminal, and reinstall GRUB:
sudo mount /dev/sda1 /mnt(replace with your Ubuntu root partition), thensudo grub-install --boot-directory=/mnt/boot /dev/sda. Then runsudo update-grubfrom the live system. - GRUB doesn't show FreeDOS after
update-grub. Manually add the entry as described in Step 8. Ensure the partition number is correct (e.g.,hd0,msdos5for the 5th partition on the first disk). - FreeDOS installer doesn't see the partition. Make sure the partition is FAT32 and is primary (not logical). If it's logical, convert it to primary using GParted before installing.
- FreeDOS boots but shows “Invalid system disk”. The boot sector wasn't written correctly. Reinstall FreeDOS and ensure you choose the correct partition, or use the
syscommand from the FreeDOS prompt to transfer system files. - USB stick not recognized in boot menu. Try a different USB port, disable Secure Boot, or use a tool like Rufus (on Windows) to create the bootable USB if
ddfails.
Frequently Asked Questions
Can I install FreeDOS on a UEFI-only system?
FreeDOS is a 16-bit OS and does not support UEFI natively. You'll need to enable Legacy/CSM boot mode in your BIOS. If your system lacks CSM, consider using a virtual machine instead.
Will FreeDOS overwrite my Ubuntu bootloader?
Only if you let it. During installation, choose “No” when asked to install a boot manager. Then GRUB remains intact and you can add FreeDOS via update-grub.
Can I access my Ubuntu files from FreeDOS?
FreeDOS can read FAT32 partitions, but not ext4 (Ubuntu's default). To share files, create a separate FAT32 partition for data exchange, or use a USB drive.
Is it safe to shrink my Ubuntu partition?
Yes, but always back up first. Use GParted from a live USB for best results, and avoid shrinking below the used space plus a few GB.
Do I need a separate hard drive for FreeDOS?
No, a separate partition on the same drive works fine. Just ensure you have enough free space and that the partition is formatted as FAT32.
Can I uninstall FreeDOS later?
Yes. Delete the FreeDOS partition using GParted, then run sudo update-grub to remove its entry from the boot menu.