I want to create a virtual partition inside a hard disk. This partition should be usable for booting purpose. Please help me out in this regard by providing me source code in C/c++.
But i need a source code for this any how where i can create a virtual partition.
> This partition should be usable for booting purpose.
If it's virtual, then it will only exist while part of your s/w is running.
At bootup, NONE of your code will be running, so how could you ever boot from it ?
By modifying MBR stuff, we can do it. We have to make this virtual partition as the active partition and reboot it...
So there's nothing virtual about it, it's just hidden ?
Er, yeah. It's one of those naming things.
A virtual partition is so called because it doesn't necessarily correspond to physical structures. It's not hidden though. [EDIT] but I think it can be... [/EDIT]
If anybody know how to do virtual partition programmatically, let me know.
Before this, i even want to know how to do partition programatically.
So goto http://sourceforge.net and type "partition" into the search box.
Plenty of open source examples to get your head around.
You'll need a machine you won't mind trashing several times, because in your stumbling around in the dark, you will completely trash your HD and make it unbootable and unrecoverable.
If you are talking about a virtual partition that is created like ghost does to restart your computer in DOS mode, then I would like to see the source code on how that is done as well.
Let me know if you find out how its done.
c program language code to display partition of hard disk