As someone who only runs Linux, I occasionally need to run DOS for updating the BIOS on various machines.
Floppy disks are no more an option, since it has been nearly two decades with machines not shipping with them. Therefore, the only realistic option is using USB flash drives.
One excellent alternative to Microsoft MS-DOS, is FreeDOS, a free clone that needs very little resources to run. It can be used to run legacy applications, and one of them is flashing a new BIOS.
There are instructions on how to create a USB disk with FreeDOS, but these instructions require components from SYSLINUX and Grub, and involves a lot of manual steps, which makes it complicated and error prone.
Another tutorial on how to create a bootable FreeDOS USB disk, is better, but is missing a few crucial steps.
In this article, we detail the steps needed to create a bootable FreeDOS disk from Linux.
First, insert a USB flash drive into your PC running Linux, and then type the following command:
sudo parted /dev/sdb mklabel msdos
You will see a warning, and confirmation:
Warning: The existing disk label on /dev/sdb will be destroyed and all data on
this disk will be lost. Do you want to continue?Yes/No? yes
New disk label type? [msdos]?
Information: Don't forget to update /etc/fstab, if necessary.
Then display the partition table:
sudo parted /dev/sdb print
The output will look similar to the following:
Model: FlashDis Flash Disk (scsi)
Disk /dev/sdb: 530MB
Sector size (logical/physical): 512B/512B
Partition Table: msdosNumber Start End Size Type File system Flags
Information: Don't forget to update /etc/fstab, if necessary.
This means the partition table is empty.
Now create a primary partition. You need to know the size of the USB flash drive you are using:
sudo parted /dev/sdb mkpart primary fat16 0 530MB
Make the partition bootable:
sudo parted /dev/sdb toggle 1 boot
Create a FAT32 filesystem on the partiton:
sudo mkfs.vfat -F 32 /dev/sdb1
Install unetbootin:
apt-get install unetbootin
Now, run unetbootin, which has an easy to use Graphical Interface.
Under 'Select Distribution', select 'FreeDOS'. The 'Version' will be 1.0.
Under 'Type', select 'USB Drive', and under 'Drive', select the partition, for example: /dev/sdb1.
Once you click OK, unetbootin should download FreeDOS, extract the foles, and copy them to the USB flash drive.
Click Exit.
Then, unmount the partition.
sudo umount /dev/sdb1
Now you have a USB drive that is bootable, and you can copy to it the BIOS or other files to the target machine.
Most Comments
Most commented on articles ...