Page 1 of 1
Creating floppy images with files in them
Posted: Sat May 07, 2016 12:13 pm
by collisiondetection
While my operating system is only a little bootloader, I wanted to automate the build process. I have a little system in place to build the whole thing and drop the compiled files into a specified folder (I may release a video on YouTube explaining how this works, but that'll be for later). The next step is to put it all into a floppy image and test the floppy image in a virtual machine. Preferably, the processes of creating the floppy image and launching the virtual machine would also be automated.
What I'm asking is if anyone knows a way to create a floppy disk image, overwrite the MBR (although I'll probably just use PARTCOPY for that.) with my own, and move the compiled files onto the filesystem, all under Windows?
Re: Creating floppy images with files in them
Posted: Sat May 07, 2016 12:17 pm
by Techel
Have a look at imdisk virtual disk drive, you can use it to mount an image and copy files on it, there's a command line tool too.
Re: Creating floppy images with files in them
Posted: Sat May 07, 2016 12:19 pm
by alexfru
For FAT12 floppies I have made this tiny tool:
https://github.com/alexfru/BootProg: mkimg144.c
Does not support directories (writes to root dir only), though.
Re: Creating floppy images with files in them
Posted: Sat May 07, 2016 12:27 pm
by mikegonta
collisiondetection wrote:What I'm asking is if anyone knows a way to create a floppy disk image, overwrite the MBR (although I'll probably just use PARTCOPY
for that.) with my own, and move the compiled files onto the filesystem, all under Windows?
"Format" it in assembly language, assemble, mount the image with
ImDisk and copy the files over. This can all be done with a cmd script.
While you're at it take a look at
The 1.44MB FAT32 floppy disk and
MikeOS-4.5 FAT32 (16-bit real mode) to see how simple it is to use
FAT32 instead of FAT12.
PS. The formatting is done in bootload.asm in the MikeOS-4.5 FAT32 (16-bit real mode) distribution.
Re: Creating floppy images with files in them
Posted: Mon May 09, 2016 12:23 am
by Combuster
Did you try to have a look at
the wiki first?