Valhalla Legends Forums Archive | General Discussion | Configuring VMware Player....

AuthorMessageTime
BreW
Ahhh! it's a pain in the ass. I want to get it booting from the floppy drive..... but it gives me the error "Could not connect to floppy "A:". Please correct your configuration and then re-attempt to connect the virtual floppy drive. Failed to connect to virtual device floppy0." I'm nowhere near an expert on this, and I just got my instructions from here, using the near exact same configuration (just changed the paths, that's all). Also, are the last two bytes of the MBR supposed to be AA55h? or is it the other way around...
January 1, 2008, 6:08 AM
MrRaza
The instructions there seem to state that you only need those three files (.vmdk, .vmx and the ISO of your choice). I don't know why your trying to use a floppy drive, if all you need to do is point the Virtual CD-ROM to the ISO that they have on that site. Download VMware Server or Workstation and use that instead of Player.

I also have an old lab from my Advanced OS course that will give you a step by step process to install Red Hat on VMware Workstation/Server. If you'd like it, feel free to PM me.

If you really want to use the Floppy drive, ensure that you have the physical drive installed correctly and that it is selected to "Use physical drive" and that A: is selected in the drop down list or Auto is selected. As well, make sure that the "Connected" option is selected when you right click the floppy drive icon at the bottom on the VM. Another option is to use a floppy image (.flp), which VMware (on Workstation 6.0 atleast) can create for you with a wizard.
January 4, 2008, 10:41 PM
BreW
[quote author=MrRaza link=topic=17245.msg175610#msg175610 date=1199486472]
If you really want to use the Floppy drive, ensure that you have the physical drive installed correctly and that it is selected to "Use physical drive" and that A: is selected in the drop down list or Auto is selected. As well, make sure that the "Connected" option is selected when you right click the floppy drive icon at the bottom on the VM. Another option is to use a floppy image (.flp), which VMware (on Workstation 6.0 atleast) can create for you with a wizard.
[/quote]
Only one problem: I don't have a physical floppy drive on my computer. That in no way prevents VMware from using a virtual one though, I'm pretty sure it's a problem with my configuration. If i can find a configurator for vmware..... this'd be so much easier.
I do need to use it because VMWare says that it can't find my os , i'm assuming it's because bootable cds have a little more overhead, bringing the total image to more then what i have (literally, the output file from nasm renamed to have an .iso extention). Right now it's not much-- only 10 bytes of code, padded with 500 bytes and the last two containing the required MBR signature. I think I heard somewhere about using Bochs, not too sure about it though.

EDIT*** woohoo! got it working with bochs!

Allright, i found a nice list of bios interrupts here but it's quite confusing and I can't find half of what I'm looking for (i need to get the disk metrics now). Bah, i might as well skip the bootloader and just use GRUB.
January 5, 2008, 12:33 AM
Explicit[nK]
Why are you making things more complicated than they need to be?
January 5, 2008, 11:16 PM
Quarantine
[quote author=brew link=topic=17245.msg175613#msg175613 date=1199493219]
Allright, i found a nice list of bios interrupts here but it's quite confusing and I can't find half of what I'm looking for (i need to get the disk metrics now). Bah, i might as well skip the bootloader and just use GRUB.
[/quote]

You'll want to use Int 13 to read what's referred to as the "Second stage" from the floppy, then there you switch to protected mode (After setting up interrupt tables, descriptor gates) and call your "main()"

But yes, I suggest you use GRUB. Make a Multiboot Compliant kernel and use a ramdisk to load rudimentary drivers (Filesystem usually, maybe Screen Driver) and work from there.
January 6, 2008, 9:25 PM
BreW
[quote author=Warrior link=topic=17245.msg175665#msg175665 date=1199654744]
You'll want to use Int 13 to read what's referred to as the "Second stage" from the floppy, then there you switch to protected mode (After setting up interrupt tables, descriptor gates) and call your "main()"

But yes, I suggest you use GRUB. Make a Multiboot Compliant kernel and use a ramdisk to load rudimentary drivers (Filesystem usually, maybe Screen Driver) and work from there.
[/quote]

How do you suggest I debug this? What I'd really like is some way to have bochs dump the registers after each instruction, but I am clueless as to how that would happen. And as for the disk reading, how would I read from a floppy? that documentation specifies bit 7 to be set for the hard disk, but what about the other storage devices?
EDIT** A few more questions:
How many bytes are in the average hard drive's sector? A floppy? It asks me to specify the number of sectors to read in al.
And how about the "low eight bits of cylinder number"? That's supposed to be the value of ch.
But before I do any of that... I need to get displaying strings straight:
[code]
CallInt10h:
mov bh, 0Fh
mov bl, 0
mov ah, 0Eh
int 10h
DisplayString:
mov al, byte [loadname + cx]
inc cx
cmp al, 0
;je top
jne CallInt10h
ret
loadname: db      0Dh, 0Ah, 'asdfnix', 0
times 510-($-$$) db 0
dw 0AA55h
[/code]
doesn't seem to want to compile. for the mov al, byte [loadname + cx] line i get "error: invalid effective address". Any reason why?
January 6, 2008, 9:35 PM
Quarantine
Honestly, I don't remember much of this stuff anymore. Especially dealing with real-mode interrupts. You can probably find tutorials on how to do that early stage crap, but really I didn't find it worth my time.

GRUB allows you much more flexibility, supports a range of formats (including ELF), and lets you load modules from a ramdisk (Provided you design your own simplistic FS especially for it). The flexibility is just too much to pass up, I believe you can even tell it to set the VESA Mode in the multiboot header.

For debugging I found it sufficient to just dump the stack contents upon encountering an exception (This is assuming Protected Mode and ISRs are setup) and using the LD dump to find more-or-less where the exception occurred.
January 6, 2008, 11:46 PM
BreW
[quote author=brew link=topic=17245.msg175666#msg175666 date=1199655350]
doesn't seem to want to compile. for the mov al, byte [loadname + cx] line i get "error: invalid effective address". Any reason why?
[/quote]

Found out the reason for that just now. apparently i can't use cx in an expression to calculate the address. I was thinking of using grub but i decided that i should make my own bootloader, now that i see what i have to do it seems pretty easy.
January 7, 2008, 1:30 AM
Quarantine
[quote author=brew link=topic=17245.msg175675#msg175675 date=1199669416]
[quote author=brew link=topic=17245.msg175666#msg175666 date=1199655350]
doesn't seem to want to compile. for the mov al, byte [loadname + cx] line i get "error: invalid effective address". Any reason why?
[/quote]

Found out the reason for that just now. apparently i can't use cx in an expression to calculate the address. I was thinking of using grub but i decided that i should make my own bootloader, now that i see what i have to do it seems pretty easy.
[/quote]

I think it's a waste of time tbh, at the very least it'd be suggested it be Multiboot Compliant. Then again, is there really an advantage by rolling your own? It's not like Real Mode programming is valuable knowledge, or assembly at such a low level is valuable. It's just reinventing the wheel,  potentially much..much worse.

I tinkered around with a Bootloader, and after a few months of going at it I realized I had a barely functional piece of crap while GRUB was sitting there waiting to be used. Once I used it, it made me much more productive and in about the same time it took me to write a Bootloader I had a pretty functional kernel which was executing programs and multitasking.
January 7, 2008, 1:50 AM

Search