How to create an empty floppy image with VirtualBox Windows guest?
Is there a way to create empty floppy disk images, which I can use with VirtualBox?
The client is Windows XP.
Linux:
fallocate -l 1474560 myimage.vfd
Linux & other Unix-like systems:
head -c 1474560 /dev/zero > myimage.vfd
Windows:
fsutil file createnew myimage.vfd 1474560
You'll have an empty "1.44 MB" image. Attach it to VirtualBox and format through "My Computer" in the guest.
If you want to format the image on the host system or to copy files into it, use mkfs.vfat
+ mount -o loop
on Linux, and VFD on Windows. Note that official build of VFD "works only on 32 bit systems" as of version 2.1, but there are alternative builds available.
Linux:
mkfs.vfat myimage.vfd
sudo mount -o loop myimage.vfd /mnt
...
sudo umount /mnt
Windows:
vfd open 0: myimage.vfd
vfd format 0:
...
vfd close 0:
Windows, create, format and mount in one command:
vfd open 0: myimage.vfd /new /1.44
With Linux it is very easy to create an empty floppy image with 'dd'.
The thread How to create a floppy image? in the VirtualBox forum contains a downloadable empty floppy image for you.
I used to use WinImage for creating empty floppy images on Windows. The program is shareware and runs on 32-bit and 64-bit Windows 2000, XP, Vista, 7. Since later Windows versions have a compatibility mode I highly assume it will run there too. http://www.winimage.com/download.htm As shareware it can be used for 30 days without restrictions. After 30 days you have to buy it and register if you want to continue using it. Since you only need one empty floppy image as a template, I would keep this image in a safe place, zip it, and unzip a copy every time I need another empty floppy image.
Just download the .zip and start the .exe directly, no installation required. Don't use the virtual floppy driver.
- Run
winimage.exe
and click Ok. - Select New from the File menu.
- Choose the format, normally you would select "Standard 1.44 MB".
- Select Save from the File menu. Choose
.ima
as save format and choose a filename.
You can rename filename.ima to filename.dsk or filename.img or whatever you choose for your new empty floppy image.
Another fully open source method is to use vfd, but you need to install the virtual floppy driver first, otherwise you cannot use vfd to format the virtual drive and then save it to a file. vfd only works on Windows 2000 and XP (reported to work also on Vista) 32-bit. http: // vfd.sourceforge.net/
Last but not least you could use Virtual PC to create an empty floppy image. Microsoft has an KB article describing the whole process: https: // support.microsoft.com/en-us/kb/825098.
While Emulators and virtual floppy drives certainly are a possibility, using WinImage is the easiest and fastest way to get what you want. And the big advantage is that with WinImage you don't need to install anything.