   Creating a floppy disk image
  At one point a year ago I was playing around with the OS dev tutorials at Broken Thorn, which are really, really good, but now I'm running Windows 7, and Virtual Floppy Drive won't work properly due to driver signing (and because I'm running 64 bit).  My solution is to write a program that will create a floppy disk image, and copy my bootloader data into the first part of it, but I can't find any information on the layout of a floppy disk image (.IMG).I thought it would just be a flat 1.44 MB binary file, but that doesn't seem to work.  Does anyone have any experience or bookmarked resources they can share?Thanks.   
  I dunno wich program u are using to access ur floppy image, but im currently doing some similar stuff, and written a program to create my floppy image, to test with a virtual machine, and it work just fine. There's no header, just 2880 sectors of  512 bytes to write into a file, and ur done, also remember to write the boot sector in the first sector (first 512 bytes). Also, doing this will render the floppy image unreadable by windows, this is normal since the 1st sector just been altered.Here's my code to create my image from a .exe containing the boot sector data:#include <stdlib.h>#include <conio.h>#include <stdio.h>void main(int argc,char *argv[]){   // Make sure we have at least 2 argumentsif(argc < 2){printf("Usage :.. <sourcefilename> <outputfilename>");exit(0);}// The File HandlesFILE *srcFile, *dstFile;   // Open the source file for readingprintf("Opening exec file %s",argv[1]);if((srcFile = fopen(argv[1],"rb"))==NULL){ printf("\nfatal-error: file (%s) not found. exiting..",argv[1]);exit(1);}   // Usefull valuesconst int NumSectorPerFloppy = 2880;const int SectorSize = 512;const int BufferSize = SectorSize * 2;   // Create a 1k buffer to read our .exe data into and fill it with 0schar* ExecBuffer = new char[BufferSize];for(int Cpt = 0; Cpt < BufferSize; Cpt++)ExecBuffer[Cpt] = 0;   // Read the source file data(should be 1k)int NumBytesRead = 0;NumBytesRead = fread(ExecBuffer,1,BufferSize,srcFile);   // Make sure we've read 1024 bytesif(NumBytesRead < BufferSize){ printf("\nfatal-error: .Exe file too small (must be 1k)",argv[2]);delete [] ExecBuffer;fclose(srcFile);exit(1);}   // Create the output image fileif((dstFile = fopen(argv[2],"wb+"))==NULL){ printf("\nfatal-error: output file (%s) could not be created. exiting..",argv[2]);delete [] ExecBuffer;fclose(srcFile);exit(1);}printf("\nCreating destination file %s",argv[2]);   // Create a buffer of 512 bytes and fill it with 0schar *EmptyBuffer = new char [SectorSize];for(Cpt = 0; Cpt < SectorSize; Cpt++)EmptyBuffer[Cpt] = 0;   // Write the image datafor(Cpt = 0; Cpt < NumSectorPerFloppy; Cpt++){switch(Cpt){case 0: fwrite(&ExecBuffer[SectorSize], 1, SectorSize, dstFile); break;default: fwrite(&EmptyBuffer[0],    1, SectorSize, dstFile); break;}}   // Delete allocated memorydelete [] EmptyBuffer;delete [] ExecBuffer;   // Close the filesfclose(dstFile);fclose(srcFile);printf("\nDone.\n");exit(0);} [Edited by - Vortez on April 12, 2010 7:26:27 PM];Page on OSDEVMy favorite tool was BFI, but now, using FreeBSD (Linux has similar procedures), I just create a file-backed memory device and mount_msdosfs it.   