How to "insert" an empty floppy?

This is for discussing general topics about how to use VirtualBox.

How to "insert" an empty floppy?

Postby private_lock » 19. Aug 2008, 01:15

Hello!

My DOS program tries to access multiple floppies and to help me, it somehow knows a "Hardware-ID" or something. I tried to copy the *.ima file and I even formated it through the virtual guest system, but still there is some hidden ID, that does not change. When I'm asked to insert the second disk, it complains, I should take the first out.

Suggestions?

private_lock
private_lock
 
Posts: 5
Joined: 19. Aug 2008, 01:08

Postby Sasquatch » 19. Aug 2008, 11:46

It seems that VB does not update the floppy drive content, like it sometimes does with cdrom if you use the physical drive. You might want to unmount the whole floppy, let the Guest search on it and hopefully it will state that there is no floppy found, then mount it again.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Postby private_lock » 19. Aug 2008, 20:26

Hello Sasquatch

First: There is no physical floppy drive in my laptop. So this whole thread was intended to be about floppy image files.

Second: On another computer I did a diskcopy of three disks, created ima-files of each and compared them. All three pairs differ in exactly 4 Byte at offset 0x27 till 0x2A

Third: What is the recommended procedure to create empty ima floppy images? I think there should be a better way than to edit those ima's in a hex editor?!?

Forth: The "new"-Button for harddrive-images is visible in the floppy-management tab, but it's deactivated ... just a thought ...

private_lock
private_lock
 
Posts: 5
Joined: 19. Aug 2008, 01:08

Postby TerryE » 19. Aug 2008, 21:39

private_lock, what's with the hostile response. Sasquatch is offering a helpful suggestion, and doesn't deserve it.

When you talk about unmounting a virtual device this hasn't got anything to do with physical hardware, we mean using the Devices menu->Unmount Floppy. I could go on, but why not just take a moment to have a look through the Forum Posting Guide and reconsider your post.

You are seeking help, and we are not being paid to give it.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Postby Sasquatch » 19. Aug 2008, 23:13

First: There is no physical floppy drive in my laptop. So this whole thread was intended to be about floppy image files.

Does that matter? I referred to the issue there is with physical cdrom drives, you could at least try the fix for that. Physical drive or not, take it or leave it, but don't say it has nothing to do with your problem.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Postby private_lock » 20. Aug 2008, 00:28

Hostile? I'm sorry ... I didn't mean to offend anybody...

Meanwhile I scanned a whole stack of old floppies, so I have enough different "master IDs" to clone more ima files as needed

Anyway: If it wasn't for WinImage, where would you get the first image from? I still think, VirtualBox lacks the feature to create empty floppies.

In addition I think its annoying to manually delete floppy images twice (once in the filesystem and once in the virtual disk manager). A list of "recently used" or "favorites" would better suit the characteristics of switching and cloning back and forth with some 40 floppies (like the old M$ Office 6.0 package for Win3.11)

Thanks for your voluntary work and good night
private_lock
private_lock
 
Posts: 5
Joined: 19. Aug 2008, 01:08

Postby TerryE » 20. Aug 2008, 01:39

Maybe I am just being stupid but what is the problem here? I just created a blank file 1440Kb long and called it flopp1.img. (OK the easiest way to do this is a one liner in Linux dd if=/dev/zero of=floppy.img bs=1024 count=1440. I copied this to my XP host through a shared folder. It was just easier to do this than to write a 3 line Perl programme on XP. The point is it doesn't matter how you create this file as long as its 1440Kb long (or 2880Kb if you want to emulate high density floppies.

If you want to register 100 copies of this as floppy1.img - floppy100.img, it takes two line of code in a command box using a FOR /L loop to do the copy, then another to do the VboxManage registerimage floppy commands. If you want to give them meaningful names you can do but then the FOR loop get a little more tricky because you need to user the %~n modifier.

The only ball ache is having to format them but is you don't mind them being identically formatted then just format the one before copying it. You just leave them in your registered floppies list. No need to delete anything. I haven't used floppies for years, but this was easy to sort out.

What's the issue? Help me understand.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Postby private_lock » 20. Aug 2008, 18:29

Sorry, but I've used dd only a few times before. There must be a reason, why wikipedia translates dd to "destroy disk" or "delete data". Anyway, I simply don't like CLI that much, you know? I prefer to hack assembler opcodes directly into RAM with my telegraph-morsecode-1-key-keyboard. It feels more natural to talk to the computer in its native binary language 8)

For me the issue is worked around and I don't dare to ask for a feature request anymore ...
private_lock
 
Posts: 5
Joined: 19. Aug 2008, 01:08

Postby TerryE » 20. Aug 2008, 18:46

I fixed your URL. You need to %28 = ( etc.
private_lock wrote:Anyway, I simply don't like CLI that much, you know? I prefer to hack assembler opcodes directly into RAM with my telegraph-morsecode-1-key-keyboard. It feels more natural to talk to the computer in its native binary language 8)

OK, I accept the joke, but there is an underlying issue here really: you can't have your cake and eat it. There are some task where you need to use a scripting tool to automate some tasks. anyone that you feel competent in. Take your pick: CMD32, WBscript, monad, Perl, Python, ... However, if you are not comfortable using a scripting language then its a bit OTT complaining about the tedious consequences.

BTW I started in the days when computer didn't have boot loaders so you had to toggle an 18 word RIM bootstrap into the machine by hand! Gosh those were the days. If you'd had to do that then you'd realise that the MS batch command language is pretty user-friendly!
:lol:

PS I've just looked it up on the internet. It was 18 words and I even remember some of the sequence after 37 years. How sad is that !!!
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Postby ghr » 20. Aug 2008, 19:55

Never mind TerryE, we all know: 'old loves die hard'
ghr
Volunteer
 
Posts: 328
Joined: 25. May 2007, 22:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: DOS, Win3x, Win95, WinXP, Ubuntu, OS/2

Postby Technologov » 20. Aug 2008, 21:53

Unfortunately VirtualBox does not provides easy-to-use GUI, that can create floppy images.

How about submitting feature-request ?

-Technologov
Technologov
Volunteer
 
Posts: 3305
Joined: 10. May 2007, 16:59
Location: Israel

Postby private_lock » 21. Aug 2008, 02:26

@TerryE

> I fixed your URL. You need to %28 = ( etc.

A live example ... I generated the link to the wikipedia homepage and manually edited it later ... (my error, I admit, not on purpose, though it perfectly fits :oops: )

> OK, I accept the joke,

I appreciate! You're right: It's always easier to hack a low level commandline interface, than to set up a sophisticated GUI. I wasn't complaining about the CLI being more powerful. My point was, this:

Maintaining the list of image files AND maintaining a second list of mappings concerning those files is counterintuitive. Though there is an inherent logic between those lists, they are not maintained in ONE place. Actually the second list can be derived from the first. On the commandline you'd think of something like *.im?

Good night
private_lock
private_lock
 
Posts: 5
Joined: 19. Aug 2008, 01:08

Postby DaLaunge » 29. Aug 2008, 08:39

Hi @ all...

maybe too late :wink: . But I figured out, that the easiest way to create an empty floppy image is:

- Creating an empty file on your host system (really empty... create a for example a .txt - file...)
- Rename the file ending from .txt to .img
- mount it in your guest system by right-clicking the floppy-disk-symbol in the bottom of your VM-window
- There should appear the Manager for virtual media. There you have to browse to your really empty former .txt - file.
- double-click it
- click ok

so you have mounted an empty, unformatted virtual floppy disk to your guest system. It doesn't matter if it is a linux, windows, DOS, vista, or whateveryouinstalled-OS

The last step is to format the disk on your guest system. But this differs from each OS and hopefully it will work ;)

Btw: I don't think that it is a not-built-in-feature. You just creating disc-images as easy as mounting for example existing .ISO - images...

best wishes and greetings from vienna
DaLaunge
DaLaunge
 
Posts: 32
Joined: 4. Sep 2007, 15:59

Postby TerryE » 29. Aug 2008, 17:42

DaLaunge,

I tried this but the format died. AFAIK, you must have a file of exactly 1440Kb long. This is easy to do in a Linux host is:
Code: Select all   Expand viewCollapse view
dd if=/dev/zero of=floppy.img bs=1024 count=1440
but Windows being Windows doesn't have any equivalent useful command. I used a one line Perl program, but since most people don't have Perl installed, the simplest way that I could think of was this in something that any XP user could use was:
Code: Select all   Expand viewCollapse view
rem @echo off
if "%1" == "" echo "Usage: Makefloopy <imageName>"
if "%1" == "" goto exit
if exist $$tmp$$X* del $$tmp$$X*
for /l %i in (0,1,31) do echo 01234567890123456789012345678 >>$$tmp$$X1
for /l %i in (0,1,35) do type $$tmp$$X1 >>$$tmp$$X2
for /l %i in (0,1,39) do type $$tmp$$X2 >>$$tmp$$X3
ren $$tmp$$X3 %1
del $$tmp$$X*
:exit
The trick here is that the first echo works out at 32 bytes inc the CRLF so this gives 32*32*36*40 = 1440Kb exactly.

I also found that I could just do a copy NUL: floppy.img then do the dd command from inside a Linux guest. This increased the size to 1440Kb and then you could format it normally.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 13 guests