Hi,
I would like to change MBR of a virtual OS in VirtualBox. The problem is that I can't really find exactly what I need. What I do find is how to change MBR while running OS from physical disk, and i need to change it for OS in virtual disk. Am I missing something here?
I'm using Ubuntu 10.10, VirtualBox v4.0.4.
Thanks in advance.
-- Paul
Custom MBR
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Custom MBR
Whatever method you find for changing an MBR will, if it works, work in any similar PC whether it be physical or virtual - so just boot up the guest PC and do it.
I'm curious though: why would you want to change the MBR?
I'm curious though: why would you want to change the MBR?
-
guilty
- Posts: 3
- Joined: 24. Feb 2011, 20:37
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: none
Re: Custom MBR
I don't remember the command exactly, but according to it's manual, the '-mbr' switch can be used only when physical partition parameter's are present.
We're writing a basic OS as an assignment in my university, so we need a custom MBR
We're writing a basic OS as an assignment in my university, so we need a custom MBR
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Custom MBR
Well, any tool which can write to sector 0 of a drive can change an MBR. You would need to know your way around a short x86 assembly language program, and also understand the partition map structure. The consequences of messing up on a live disk is likely to be a disk that won't boot and/or the loss of all data on the drive. It goes without saying that you need to be an expert and a programmer to do any of this, and as such a programmer should have no difficulty finding out how to write to the MBR of a VDI file using a host app (which would certainly simplify some access problems).
-
guilty
- Posts: 3
- Joined: 24. Feb 2011, 20:37
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: none
Re: Custom MBR
I am fully aware of the consequences, that's why I am trying to use VirtualBox. I also do have knowledge of assembly, c and basic concepts of OS that I might need in this project.
What I do not have, however, is knowledge of this particular software, called VirtualBox. This is why I came to it's official forums, to thread "Using VirtualBox". IMO, this thread's purpose is talk about "Using VirtualBox", but that might be a crazy idea, I'm no pro on threads. So, I'm asking once again, and please don't respond if it is just to imply (or say directly) that I should use google. If you would tell that to everyone, who enters any forum, not just this one, all of the forums would be dead. Hell, face to face communication would be dead, because everyone could use google instead.
Back to topic: I have 512 MB virtual disk drive. How would I tell VirtualBox to use a custom MBR?
--Paul
What I do not have, however, is knowledge of this particular software, called VirtualBox. This is why I came to it's official forums, to thread "Using VirtualBox". IMO, this thread's purpose is talk about "Using VirtualBox", but that might be a crazy idea, I'm no pro on threads. So, I'm asking once again, and please don't respond if it is just to imply (or say directly) that I should use google. If you would tell that to everyone, who enters any forum, not just this one, all of the forums would be dead. Hell, face to face communication would be dead, because everyone could use google instead.
Back to topic: I have 512 MB virtual disk drive. How would I tell VirtualBox to use a custom MBR?
--Paul
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Custom MBR
So, you need information about the virtual disk formats which VirtualBox supports.
VDI is VirtualBox's native virtual hdd format, you can find introductory information on that in the FAQ section of the "Howtos and Tutorials" forum on this site (TerryE's "All About VDIs" tutorial). Other than that the information must be gained by downloading and studying the VirtualBox source code (OSE). The latter step is such an obvious one that I wondered why a programmer would not have done so already, which is why I asked.
VDI is VirtualBox's native virtual hdd format, you can find introductory information on that in the FAQ section of the "Howtos and Tutorials" forum on this site (TerryE's "All About VDIs" tutorial). Other than that the information must be gained by downloading and studying the VirtualBox source code (OSE). The latter step is such an obvious one that I wondered why a programmer would not have done so already, which is why I asked.