Vbox won't attach some .img floppy files

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.
Post Reply
Nova
Posts: 3
Joined: 23. Jul 2014, 23:25

Vbox won't attach some .img floppy files

Post by Nova »

Vbox version: 4.3.12
Host: Windows 7
Guest: MS DOS 6.22
Have installed DOS to a .vdi and it boots. During this process I discovered that Vbox will attach some .img files to the floppy controller but not other .img files. I had to keep trying different DOS boot and setup .img files to find ones that would attach. I tried creating my own .img files but those would not attach or if they did attach they could not be read by the vm. I used ImgBurn to create them.
Now that the OS is operational, I want to transfer files into it and used ImgBurn to create a .img file from them. Again, the .img file wont attach to Vbox.

I read a little about the .img format and got the idea that the drive the source files are copied from needs to be a format compatible with DOS, ie FAT. So I moved the files to a FAT32 partition and tried again. The resulting .img file will not attach to Vbox.

What am I doing wrong? Why are some .img files ok and others not? How do I create .img files that will attach to Vbox and be read by the vm?
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: Vbox won't attach some .img floppy files

Post by michaln »

Nova wrote:I read a little about the .img format and got the idea that the drive the source files are copied from needs to be a format compatible with DOS, ie FAT.
That's total nonsense, there is no such requirement. But now I'm wondering where you read that?

VirtualBox does not care about the contents of raw floppy images, only about their size.
What am I doing wrong? Why are some .img files ok and others not?
Why do you expect anyone to answer that question without seeing the actual files?
How do I create .img files that will attach to Vbox and be read by the vm?
As for the first question, for example rawwritewin or dd. As for the second question, it's up to you to ensure that the file system on the floppy (image) is understood by the guest OS.
dlharper
Posts: 291
Joined: 25. Aug 2011, 19:17
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: MS Windows (several versions); DOS

Re: Vbox won't attach some .img floppy files

Post by dlharper »

Nova wrote:I tried creating my own .img files but those would not attach or if they did attach they could not be read by the vm. I used ImgBurn to create them.
Are you sure the files you are creating are real floppy disk images? As far as I know, ImgBurn creates CD images rather floppies. Files with a .img extension can be images of CDs (which makes them the same as .iso images), or they can be Apple's disk image format (which is not a raw image format at all).

I do not know of any program currently available that will directly read or write files to or from floppy images. You need to be a bit more subtle, such as going via another virtual machine which can both access host files and use the disk images.
Nova
Posts: 3
Joined: 23. Jul 2014, 23:25

Re: Vbox won't attach some .img floppy files

Post by Nova »

dlharper wrote: Are you sure the files you are creating are real floppy disk images? As far as I know, ImgBurn creates CD images rather floppies. Files with a .img extension can be images of CDs (which makes them the same as .iso images), or they can be Apple's disk image format (which is not a raw image format at all).
You have got right to the heart of it. I did not realize an .img could be a cd image and equivalent to an .iso. I think this was the core of the problem.
dlharper wrote: I do not know of any program currently available that will directly read or write files to or from floppy images. You need to be a bit more subtle, such as going via another virtual machine which can both access host files and use the disk images.
I tried MagicISO to create a floppy .img from files and the resulting .img attached to Vbox and was read by DOS. Victory! Problem solved. Thanks for your input.
Last edited by Nova on 25. Jul 2014, 00:23, edited 1 time in total.
Nova
Posts: 3
Joined: 23. Jul 2014, 23:25

Re: Vbox won't attach some .img floppy files

Post by Nova »

michaln wrote:
Nova wrote:I read a little about the .img format and got the idea that the drive the source files are copied from needs to be a format compatible with DOS, ie FAT.
That's total nonsense, there is no such requirement. But now I'm wondering where you read that?

VirtualBox does not care about the contents of raw floppy images, only about their size.
What am I doing wrong? Why are some .img files ok and others not?
Why do you expect anyone to answer that question without seeing the actual files?
How do I create .img files that will attach to Vbox and be read by the vm?
As for the first question, for example rawwritewin or dd. As for the second question, it's up to you to ensure that the file system on the floppy (image) is understood by the guest OS.
First, you are correct that the file system on which the files reside when they are compiled into the .img is not relevant to getting a properly functioning .img. I tested this after finding that MagicISO works perfectly to create floppy images from files. I created two .img files, one from the files on NTFS and one from files on FAT. Both .img files worked flawlessly. I read about the .img on Wikipedia at http://en.wikipedia.org/wiki/IMG_%28file_format%29
In proposing this idea I was trying to explain what I otherwise could not given my lack of experience with Vbox, floppy images, and .img files.

Second, rawwritewin won't create a floppy image from files on a directory. It only creates floppy images from physical floppies. dd can only create floppy images from files if you are working within Linux, which I am not.

Third, your reply positively drips with disdain. I gave as much information as I could think of. I read the posting advice in advance. I did my best to organize my information, stick to the point, and not leave out anything which might be important. That my post did not live up to your standards was made very clear. I see that you have been a member for seven years. I think that you have forgotten what it is like to struggle with technology that is entirely new to you, with inadequate time and no one to teach you anything. If you don't like helping newbies, then don't reply to their requests. Stick to forums by experts and for experts. That way no one can bother you with silly questions to which they should already know the answer.

Truthfully, I was already feeling inadequate for not being able to solve what seemed to be a rudimentary problem. You made it worse. I am grateful for dlharper's reply, because without it, I'd probably have never asked for help in this forum again.
3r1k 5t3yn
Posts: 1
Joined: 3. May 2015, 16:20

Re: Vbox won't attach some .img floppy files

Post by 3r1k 5t3yn »

Hi ...

To the guy that is struggling with .img files ...

Today, I also had the same issues. I looked everywhere... Came across your thread, very helpful! Much appreciated. You helped me out with my issue with .img files and VBox.

Kindest Regards,
Erik.
Post Reply