Creating floppy images with files in them

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
collisiondetection
Posts: 3
Joined: Wed Mar 30, 2016 6:16 pm

Creating floppy images with files in them

Post 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?
Techel
Member
Member
Posts: 215
Joined: Fri Jan 30, 2015 4:57 pm
Location: Germany
Contact:

Re: Creating floppy images with files in them

Post 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.
alexfru
Member
Member
Posts: 1112
Joined: Tue Mar 04, 2014 5:27 am

Re: Creating floppy images with files in them

Post 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.
mikegonta
Member
Member
Posts: 229
Joined: Thu May 19, 2011 5:13 am
Contact:

Re: Creating floppy images with files in them

Post 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.
Mike Gonta
look and see - many look but few see

https://mikegonta.com
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Creating floppy images with files in them

Post by Combuster »

Did you try to have a look at the wiki first?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply