[SOLVED] Writing a floppy disk image file (.img) on Windows

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Kragen
Posts: 2
Joined: Fri Aug 21, 2009 11:41 am

[SOLVED] Writing a floppy disk image file (.img) on Windows

Post by Kragen »

I'm using Bochs to play around with a bootable floppy (.img file) and so I've had a fair amount of success playing around on a Windows XP machine.

The troule is that now I've switched to using Windows Server 2008 (x64), and the tools I was using to make my bootable floppy disk just arent working - I was using a virtual floppy drive to mount the image (http://chitchat.at.infoseek.co.jp/vmware/vfd.html) and using the built in debug command to write directly to the boot sector.

Although I've managed to get the virtual floppy drive to work by building it myself, its a pain because I cant properly sign the driver and so Windows moans. Whats more the debug command is missing from 64 bit versions of Windows, so even after managing to mount it I haven't yet found a way to write to the boot sector.

All I want is an easy convenient way of writing to a floppy disk .img file (both the FAT12 filesystem and the boot sector), but I've been looking on the web for 2 days now and haven't found decent tool(s) for doing this - I've been looking with envy at the linux command dd (I dont want to switch to linux as my main job is mostly Microsoft based), but there dont appear to be any functional Windows equivalents.

I'm one step short of writing a tool myself, but I figure that someone else must be in the same position as me and have done the hard work already...

So whats the best way to write bootable floppies on 64 bit versions of windows?
Last edited by Kragen on Fri Aug 21, 2009 6:13 pm, edited 1 time in total.
User avatar
-m32
Member
Member
Posts: 120
Joined: Thu Feb 21, 2008 5:59 am
Location: Ottawa, Canada

Re: How to write a floppy disk image file (.img) on Windows

Post by -m32 »

CoreUtils for Windows has dd. Works the same way as on Linux...

http://gnuwin32.sourceforge.net/packages/coreutils.htm
dosfan
Member
Member
Posts: 65
Joined: Tue Oct 14, 2008 1:18 pm
Location: Scotland

Re: How to write a floppy disk image file (.img) on Windows

Post by dosfan »

I've found WinImage useful in the past and they have an 64bit version up.

I will warn you though, it's shareware with a 30-day trial...

http://www.winimage.com
All your base are belong to us.
Kragen
Posts: 2
Joined: Fri Aug 21, 2009 11:41 am

Re: How to write a floppy disk image file (.img) on Windows

Post by Kragen »

Thanks for your replies - in the end I used MagicISO to write files onto the filesystem and wrote myself a short 4 line app to write over the boot sector.

Seeing as I'm going to need to learn how to read / write to FAT12 anyway I expect I'll probably end up writing an app to write files to the image too at some point (I'm not a fan of MagicISO - it keeps a handle open on the file which is irritating and means I keep on having to open / close MagicISO)

Thanks again though :-)
User avatar
~
Member
Member
Posts: 1228
Joined: Tue Mar 06, 2007 11:17 am
Libera.chat IRC: ArcheFire

Re: How to write a floppy disk image file (.img) on Windows

Post by ~ »

You can try to use a 64-bit patched version of that VFD driver here:
http://levicki.net/downloads/

Look for the "64-bit version of vfd.sys built from vfdsrc-080206.zip — for use with Virtual Floppy Drive 2.1"

This is what the author says about "signing the driver":
Vista x64 users, you know the drill — you will have to press F8 and disable driver signature checking in order to use it.

Do you have the command line "debug" program. What I do to rewrite the 512-byte boot sector of a floppy under Windows is first open a console "CMD.EXE", and then I run this.

C:\>debug
-l mybootsector.bin
- w 100 0 0 1
-q

I also use RAWWRITEWIN to copy images from/to floppies, and use VFDWIN to avoid using real (and limited in durability) floppies to test with Bochs.



Or I think you could install some form of the distro called TopologiLinux. It requires no partitioning, no system restart, no switching to Linux. It can run inside windows using coLinux (already included and configured) but you must be very careful when asked if you want to update the MBR fo your hard disk, you should answer NO.

At least it works in 32-bit, WinXP.

That's why I have never liked XP for my development machines or for anything else. If I could I would be running Windows 98 in all my machines to have a more reachable hardware and DOS at hand.
Post Reply