Problems with "Virtual Floppy Disk"-driver. Any alternative?
Problems with "Virtual Floppy Disk"-driver. Any alternative?
Hi community! I want to create my own OS! At first i want to thank you for the very good wiki!
I started with the bare bone tutorial "Real mode assembly bare bones" from the wiki: http://wiki.osdev.org/Real_mode_assembly_bare_bones
But there was a problem: My laptop has no floppy drive!
I searched for a solution in the wiki and in google and i found the "Virtual Floppy Disk (VFD) Driver". The hyperlink to the homepage from the wiki shows you a non english website, so i dont understand anything. But i found extended information about vfd here: http://vfd.sourceforge.net/#w64bit
But the main release was only for x86, so i couldn't start the driver with "vfd.exe -start" after installing with "vfd.exe -install", because i have an x64 windows 7. I downloaded the inofficial x64 version by critical0, but this includes only the *.sys - file. I tried to replace the x86-sys-file with this new x64-sys-file by critical0 and then exec "vfd -install", but this didn't work too.
So, what shell i do? Can i write the binary file from the nasm to an USB-Storage?
Thank you for answering in advance!
Additional information: My English is very bad because english is not my mother tongue. So dont be angry if you can see mistakes, please.
I started with the bare bone tutorial "Real mode assembly bare bones" from the wiki: http://wiki.osdev.org/Real_mode_assembly_bare_bones
But there was a problem: My laptop has no floppy drive!
I searched for a solution in the wiki and in google and i found the "Virtual Floppy Disk (VFD) Driver". The hyperlink to the homepage from the wiki shows you a non english website, so i dont understand anything. But i found extended information about vfd here: http://vfd.sourceforge.net/#w64bit
But the main release was only for x86, so i couldn't start the driver with "vfd.exe -start" after installing with "vfd.exe -install", because i have an x64 windows 7. I downloaded the inofficial x64 version by critical0, but this includes only the *.sys - file. I tried to replace the x86-sys-file with this new x64-sys-file by critical0 and then exec "vfd -install", but this didn't work too.
So, what shell i do? Can i write the binary file from the nasm to an USB-Storage?
Thank you for answering in advance!
Additional information: My English is very bad because english is not my mother tongue. So dont be angry if you can see mistakes, please.
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
You can use floppy image directly to boot in emulator. You can use CD/DVD or USB flash with floppy image to boot on real hardware. Or buy USB floppy drive )))
Maybe hex editor?sandro wrote:So, what shell i do? Can i write the binary file from the nasm to an USB-Storage?
If you have seen bad English in my words, tell me what's wrong, please.
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
Hi Sandro,
I was having a similar problem and this fix it for me.
I hope this works for you.
you should start instead.so i couldn't start the driver with "vfd.exe -start"
You could see an example at BrokenThorn Entertainment. Scroll down till you see How to use VFD (Virtual Floppy Drive)."vfdwin.exe"
I was having a similar problem and this fix it for me.
I hope this works for you.
Last edited by Jvac on Wed Mar 23, 2011 7:40 am, edited 1 time in total.
"The best way to prepare for programming is to write programs, and
to study great programs that other people have written." - Bill Gates
Think beyond Windows ReactOS®
to study great programs that other people have written." - Bill Gates
Think beyond Windows ReactOS®
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
If you take an advice, forget floppy drive, and use usb stick. It's most likely that the time you finish your os there'll be less floppy drives than today, and they're quite rare now as you noticed.
I use usb stick without any fuzz, as a matter of fact it's much simpler. You can use rawrite.exe or any similar tool to write a file on stick sector by sector. On unixes you can use the old good tool dd.
I use usb stick without any fuzz, as a matter of fact it's much simpler. You can use rawrite.exe or any similar tool to write a file on stick sector by sector. On unixes you can use the old good tool dd.
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
@Floppy
Thank you for answering!
I have questions about your post:
1) Create Floppy-Image from a binary file
After i execed "nasm kernel.asm -f bin -o kernel.bin" the NASM gave me a binary file with the file extension .bin of course. A floppy-image has an file extension .img . Can i simply rename kernel.bin to kernel.img or is floppy-image a completly other file type?
2) Booting from an image in emulator
I have installed Bochs. How must i configure Bochs so it boots from my Floppy-Image?
@USB
Yes, i think floppy is very old. But i cant find a tool to write images to an USB-Storage. RaWrite for windows can't write to USB-Storage, only to floppy. I cant use dd, because my OS isn't linux. And the idea with the HexEditor: My HexEditor can only open files, but not full partitions or storage devices. Are there HexEditors which can do this?
Thank you for answering!
I have questions about your post:
1) Create Floppy-Image from a binary file
After i execed "nasm kernel.asm -f bin -o kernel.bin" the NASM gave me a binary file with the file extension .bin of course. A floppy-image has an file extension .img . Can i simply rename kernel.bin to kernel.img or is floppy-image a completly other file type?
2) Booting from an image in emulator
I have installed Bochs. How must i configure Bochs so it boots from my Floppy-Image?
@USB
Yes, i think floppy is very old. But i cant find a tool to write images to an USB-Storage. RaWrite for windows can't write to USB-Storage, only to floppy. I cant use dd, because my OS isn't linux. And the idea with the HexEditor: My HexEditor can only open files, but not full partitions or storage devices. Are there HexEditors which can do this?
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
Kernel?"nasm kernel.asm -f bin -o kernel.bin"
should be instead
then you should get BootLoader.binnasm -f bin BootLoader.asm -o BootLoader.bin
Then you need PartCopy see the tutorial or use debug from the command line to get image to your vfd. See full tutorial home page click on Introduction for debug introductions. Please be very careful as you could do damage to your system disk pay close attention to the warning signs .
Yes. Please follow through the tutorial also see the OSdev wiki2) Booting from an image in emulator
I have installed Bochs. How must i configure Bochs so it boots from my Floppy-Image?
"The best way to prepare for programming is to write programs, and
to study great programs that other people have written." - Bill Gates
Think beyond Windows ReactOS®
to study great programs that other people have written." - Bill Gates
Think beyond Windows ReactOS®
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
It took about 10 sec to find one.
https://launchpad.net/win32-image-writer/+download
Anyway you are confused about some basics: rawrite can write to any block media, and it's not the hexeditor that can read disks, it's the OS's duty to represent a file that can be used by the editor. On unixes it's usually /dev/hda or /dev/sda or similar, on win it's \\.\PhysicalDrive(something). I suggest to google virtualbox's vboxmanage command, there are many examples that references physical disks under win as files (vboxmanage is used to create a "virtual link" disk that corresponds to a physical disk, so that the guest can access host's disk directly).
And about nasm, yes, it can produce a directly bootable binary (that can be renamed to img) if you write your source that way. To make things simple I use this method, and after assembly I have a binary that contains PMBR code, a PMBR table and a GPT, so this file can be written to a stick without any problem (of course it's not enough to boot, you have to create a filesystem and put at least your kernel there).
https://launchpad.net/win32-image-writer/+download
Anyway you are confused about some basics: rawrite can write to any block media, and it's not the hexeditor that can read disks, it's the OS's duty to represent a file that can be used by the editor. On unixes it's usually /dev/hda or /dev/sda or similar, on win it's \\.\PhysicalDrive(something). I suggest to google virtualbox's vboxmanage command, there are many examples that references physical disks under win as files (vboxmanage is used to create a "virtual link" disk that corresponds to a physical disk, so that the guest can access host's disk directly).
And about nasm, yes, it can produce a directly bootable binary (that can be renamed to img) if you write your source that way. To make things simple I use this method, and after assembly I have a binary that contains PMBR code, a PMBR table and a GPT, so this file can be written to a stick without any problem (of course it's not enough to boot, you have to create a filesystem and put at least your kernel there).
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
Extentsion is not important. Format is important. In your tutorial boot sector image is named "kernel.bin" therefore you can use "kernel.bin" as floppy image (renaming is not required).sandro wrote:1) Create Floppy-Image from a binary file
After i execed "nasm kernel.asm -f bin -o kernel.bin" the NASM gave me a binary file with the file extension .bin of course. A floppy-image has an file extension .img . Can i simply rename kernel.bin to kernel.img or is floppy-image a completly other file type?
2) Booting from an image in emulator
I have installed Bochs. How must i configure Bochs so it boots from my Floppy-Image?
Code: Select all
floppya: 1_44="kernel.bin", status=inserted
boot: floppy
I use HxD.My HexEditor can only open files, but not full partitions or storage devices. Are there HexEditors which can do this?
If you have seen bad English in my words, tell me what's wrong, please.
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
Thank you for your answers.
Now i know, how i can boot from my image in Bochs and how i can boot from usb storage by PC.
My questions are answered now!
Now i know, how i can boot from my image in Bochs and how i can boot from usb storage by PC.
My questions are answered now!
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
Huh?Anyway you are confused about some basics: rawrite can write to any block media
What's this? This snapshot was from Rawrite2 (distributed under Mepis Linux Live DVD).
This suggests, rawrite obviously can't write to any other media, other than Floppy.
Or am I getting things wrong here?
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
Never heard of v2, never tried. If it does not support other media than floppy, do not use it for usb sticks. Use another app.Chandra wrote:Huh?Anyway you are confused about some basics: rawrite can write to any block media
What's this? This snapshot was from Rawrite2 (distributed under Mepis Linux Live DVD).
This suggests, rawrite obviously can't write to any other media, other than Floppy.
Or am I getting things wrong here?
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
If you never tried rawrite, why did you suggested to use it at first place?turdus wrote: Never heard of v2, never tried. If it does not support other media than floppy, do not use it for usb sticks. Use another app.
Moreover, you confirmed that it was able to write to usb disk, didn't you?
Ah, does this really matter? No. So, let's end it here. Afterall, the problem was already solved.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
I've used rawrite many years ago, it's the 2.0 that I haven't tried.Chandra wrote: If you never tried rawrite, why did you suggested to use it at first place?
Yes, because I used it for hard drives too. I should have mentioned that my information is not necessary up to date, but I never thought it can do less than it used to. Sorry.Moreover, you confirmed that it was able to write to usb disk, didn't you?
Agree. I hope I made up my mistake by linking a tool that worksAh, does this really matter? No. So, let's end it here. Afterall, the problem was already solved.
Re: Problems with "Virtual Floppy Disk"-driver. Any alternat
To answer the OP's question: there is a neat little program called ImDisk Virtual Disk Driver which works on x64 as well as x86 Windows. You can use it to mount all kind of images (floppies, hard drives, CD-Roms, etc.). The download is about in the middle of the site, under the huge changelog.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.