Page 1 of 1

Virtual Machine

Posted: Sun Jul 19, 2009 2:56 pm
by scrat
Ok, I compiled test real-adress code with fasm on win.
Now I need to test it on Virtual Machine.
I tried to make bootable floppy and use it with Sun Virtualbox, but it doesn't work.

Please advice smth to use.

Re: Virtual Machine

Posted: Sun Jul 19, 2009 2:59 pm
by f2
What's wrong? What is the error message? Is that your OS is buggy? Or maybe the floppy image is broken?
Trying to tell us more about what happens when you test your OS in a virtual machine.

Re: Virtual Machine

Posted: Sun Jul 19, 2009 3:06 pm
by scrat
I used Winimage for making floppy image.
1. selected my "os.bin" file in "image" -> "boot sector properties"
2. saved image file in format .imz
3. mounted it on my Virtual Machine
4. nothing happens(no output or smth else)

Re: Virtual Machine

Posted: Sun Jul 19, 2009 3:12 pm
by f2
scrat wrote: 2. saved image file in format .imz
IMZ files are compressed floppy images. I don't know if VirtualBox supports this format.
Try to save your image in uncompressed format IMA.

P.S.: you can use BFI for building FAT12 floppy images. And this tool is free!

Re: Virtual Machine

Posted: Sun Jul 19, 2009 3:31 pm
by scrat
1. Runned bfi.exe with -o="os.bin" and -b="load.bin", where load.bin is bootable 512bit binary made by Winimage.
2. Loaded img file to Virtualbox and got boot text from image and message, that vm cannot boot from harddisk.

:(

Re: Virtual Machine

Posted: Sun Jul 19, 2009 3:41 pm
by f2
scrat wrote:1. Runned bfi.exe with -o="os.bin" and -b="load.bin", where load.bin is bootable 512bit binary made by Winimage.
2. Loaded img file to Virtualbox and got boot text from image and message, that vm cannot boot from harddisk.

:(
Is that your boot sector supports the FAT12 file system? Otherwise, it is normal for BFI and WinImage does not work!
If yes, this is a little help on the use of BFI:

Code: Select all

bfi -f=<floppy image name> -b=<boot sector> <dir>
<dir> is the folder that contains all files to be included on the floppy image.

Re: Virtual Machine

Posted: Sun Jul 19, 2009 3:49 pm
by scrat
Tommy wrote:
scrat wrote:1. Runned bfi.exe with -o="os.bin" and -b="load.bin", where load.bin is bootable 512bit binary made by Winimage.
2. Loaded img file to Virtualbox and got boot text from image and message, that vm cannot boot from harddisk.

:(
Is that your boot sector supports the FAT12 file system? Otherwise, it is normal for BFI and WinImage does not work!
If yes, this is a little help on the use of BFI:

Code: Select all

bfi -f=<floppy image name> -b=<boot sector> <dir>
<dir> is the folder that contains all files to be included on the floppy image.
Ok, how can I create bootsector normally?

Re: Virtual Machine

Posted: Sun Jul 19, 2009 4:02 pm
by f2
scrat wrote: Ok, how can I create bootsector normally?
...
where load.bin is bootable 512bit binary made by Winimage.
#-o Understood! You use WinImage for generating FAT12 boot sector. I had forgotten he could do that!
You can use WinImage yet, it (normally) works.
But in the future, write your own boot sector!

Re: Virtual Machine

Posted: Mon Jul 20, 2009 1:34 am
by scrat
I didn't understood, I'm selecting file for bootsector in my filesystem, and then making image with it, how can it work?

Re: Virtual Machine

Posted: Mon Jul 20, 2009 3:17 am
by kop99
Instead of making floppy image, you can use your own boot loader directly.

Re: Virtual Machine

Posted: Mon Jul 20, 2009 3:35 am
by scrat
kop99 wrote:Instead of making floppy image, you can use your own boot loader directly.
how?