How to write files to a floppy drive?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
HaotongYang
Posts: 32
Joined: 25. Aug 2021, 21:39

How to write files to a floppy drive?

Post by HaotongYang »

How to write files to a floppy drive???

virtualbox version: 7.0.12
System: Windows 11
virtualbox tool: vbox-img.exe
Used the vbox-img tool to create a blank floppy drive img file:

Code: Select all

vbox-img.exe createfloppy --filename d:\12300.img
My intention is to write a configuration file to 12300.img, what command can I use to write it?

BTW: I have referenced vbox-img.exe to create iso files. When creating an iso file, use the command to include the file in the iso file created:

Code: Select all

vbox-img.exe createiso "d:\12356.img" "D:\xxx.bat" "D:\Xmindxxx" --output d:\12345.iso
This way you can get the ISO containing the files.

In summary: I would like to ask how to include the file inside the floppy drive img file created.

I hope you can help me.

The solution I tried:
1. a full forum search doesn't get the information I'm looking for.
2, google search, same.
3, Someone in the forum recommended viewing the source code, and my god, I'm not skilled enough to read it!
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to write files to a floppy drive?

Post by scottgus1 »

vbox-img.exe createfloppy returns this help information:
--filename <filename>
[--size <size in bytes>]
[--root-dir-entries <value>]
[--sector-size <bytes>]
[--heads <value>]
[--sectors-per-track <count>]
[--media-byte <byte>]
vbox-img.exe createiso returns this helpless information:
[too-many-options]
Someone on the dev team has a sense of humor. An unlisted "-help" option for "createiso" returns the help info in the manual under the section on the VISO file format / RTIsoMaker https://www.virtualbox.org/manual/ch09.html#viso

I gather that since "createiso" initialtes making a Virtual ISO (VISO), it is designed to add files to the ISO.

There seem to be no shown options in the help list for "createfloppy". If the source code (which I would not be able to read either) does not shown "secret" commands for "createfloppy", I think the way to add files is to boot a VM that has a floppy drive then add the files to the floppy image inside the VM.

There is a "convert" option that can take images from one format to another. The manual says that floppy images are in the "RAW" format. So if you can find some tool that can take files and compile them into a RAW file, then convert the RAW file into a floppy image (or maybe a RAW file is renamable to be a floppy image directly?) that may get you going too.
HaotongYang
Posts: 32
Joined: 25. Aug 2021, 21:39

Re: How to write files to a floppy drive?

Post by HaotongYang »

scottgus1 wrote: 19. Dec 2023, 21:47

There is a "convert" option that can take images from one format to another. The manual says that floppy images are in the "RAW" format. So if you can find some tool that can take files and compile them into a RAW file, then convert the RAW file into a floppy image (or maybe a RAW file is renamable to be a floppy image directly?) that may get you going too.
I will keep trying along these lines. Thanks for the lead.
Post Reply