質問

Hope this doesn't sound crazy or something

I am trying to create a mini O.S. (who didn't?, it is like visiting Mecca for a muslim - any programmer must do it at least once in his life)

So, I created a simple boot-loader, that works fine when executed from a virtual boot-able ISO, in a virtual machine (Oracle VM Virtual Box). It just displays a message for now. At this point, I am supposed to give the control to another code, that would start being my O.S. All this will be executed from the virtual optical disk. I could burn it on a CD and run it on a i386.

No, to make this really something, I want to run the "O.S". from a hard disk, so I wonder if there's a way to "burn" the boot-able information (boot-loader and other files to be loaded) directly on a virtual disk (like .vmi, .vhd, .hdd)

When I install a conventional O.S., like Windows or Linux, from an ISO image, on the virtual machine, the boot-loader starts a new code section, that installs the O.S. on the virtual disk. That is how I should do it, too: create a installer for the O.S., that would write my booting section on the virtual disk. That means that everytime I make a change to my O.S. I must re-install it. I don't like that. I would like to be able to write the booting code directly inside the virtual disk file, start the machine in Virtual Box, and see it running. I opened the .vmi file with an HEX editor but I cannot figure out where should I place the code to be considered boot-able.

Now, tell me whether I don't know what am I talking about or is there a solution for this. Thanks to everybody!

役に立ちましたか?

解決

I found out how to do it. Create a vmdk disk, open in in a HEX editor and paste the bootable information starting from 0

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top