User:Oldcpu/Boot DOS without Floppy
Applicable to openSUSE-10.x to 11.x
- 1 HOWTO: Boot a DOS floppy-image without a floppy drive
HOWTO: Boot a DOS floppy-image without a floppy drive
One has a problem with their PC, and has identified that a BIOS update may fix it. Hence one needs to flash their motherboard/laptop/notebook BIOS, but it requires DOS on one's PC, and one has a Linux ONLY PC with no DOS nor Windows partition.
Hardware supplier has prepared a BIOS update to fix a problem, but has not (which is typical) provided for Linux support when creating files for flashing their BIOS.
This guide was originally written to help users perform a BIOS update utility without a floppy drive, where DOS was required for that BIOS update. The guide sets up a FreeDOS boot with no separate partition prepared.
From step 2 onwards you'll have to be root most of the time. The sample zypper commands are for openSUSE-10.x to 11.x.
Unfortunately some manufacturers now require MS-Windows on a PC to update the BIOS of a laptop, which this Guide does NOT address. I believe that (only supporting Windows in the BIOS) to be a monopolistic support practice, which should be stopped.
1. Download the fdos and the files you theoretically would want to put on a floppy. (for example TBD), open the archive if needed:
...and lets assume the hardware manufacturer has created a DOS compatible BIOS flash program called "bios_flash.exe":
wget ftp://some-ftp-address-example/bios_flash.exe unzip bios_flash.exe
or alternatively try to unzip it with wine:
Where in the above example I assumed an executeable called "bios_flash.exe". Substitute the real address and real name.
2. Install syslinux (dos floppy bootloader):
zypper install syslinux
Create DOS directory and copy bootloader/diskimage
3. Create a directory for DOS stuff and copy the bootloader and the disk image there. memdisk may be elsewhere on your system, and the image will be wherever you copied/unzipped it to.
mkdir /boot/dos cp /usr/share/syslinux/memdisk /boot/. cp fdboot.img /boot/dos/.
For an example of where a boot image was loaded (from an example "bios_flash.exe" file) instead of "FDOEM.144" see the Ubuntu forums example of this.
Create mount point and mount floppy image
4. Create a mount point and mount the floppy image.
mkdir /media/floppy mount -t msdos -o loop /boot/dos/fdboot.img /media/floppy
Note, if a different boot image is being used (instead of FDOEM.144) that should be called instead. See the Ubuntu forums guide here.
Once /media/floppy is mounted, one can copy various DOS programs to that "floppy" area, such that they will be present after one reboots.
Add boot option to grub for floppy
5. Add a boot option for the floppy image. With grub on openSUSE this means adding something like this into /boot/grub/menu.lst (preferably at the end of /boot/grub/menu.lst file):
###Don't change this comment - YaST2 identifier: Original name: FreeDOS### title FreeDOS root (hd0,1) kernel /boot/memdisk initrd /boot/dos/fdboot.img boot
Again, note if a different BIOS boot image is being used, it should replace "FDOEM.144" in the /boot/grub/menu.lst file. See the Ubuntu forums example.
reboot and test
6. Reboot, choose the "FreeDOS" boot option. Run whatever DOS programs you need to run, based on whichever other program you added to this area earlier:
- This howto was copied off of Ubuntu forums and made more generic. This How-To was successfully tested on an openSUSE-11.0 test PC.
- How to flash motherboard BIOS from Linux with no DOS windows and no Floppy Drive
- How to update BIOS on Linux
A couple of more links: