Page 1 of 1
Invalid partition entry number (another question)
Posted: Sat Aug 23, 2014 10:54 am
by lweb20
All right ..
Reformulating my question:
I have problem with the number of partition entry in a bootloader.
VMware return 0x0:0x7CE (ds:si) in a second partition.
VirtualBox return 0x0:0x7BE (ds:si) in a first partition.
As you can see the values are not expected or not I'm interpreting well.
I expected 0x1BE in first partition and 0x1CE in second partition.
Please help me.
References:
http://wiki.osdev.org/MBR_(x86)
http://wiki.osdev.org/Partition_Table
PD. Sorry for my very bad english. I'm not kidding..
Re: Invalid partition entry number (another question)
Posted: Sat Aug 23, 2014 11:29 am
by iansjack
What do you mean "return". What code returns these values?
Re: Invalid partition entry number (another question)
Posted: Sat Aug 23, 2014 1:39 pm
by Octocontrabass
lweb20 wrote:or not I'm interpreting well
This is your problem.
When
this article says "offset 0x1be, 0x1ce, 0x1de, and 0x1ee", it is referring to the offset relative to the start of the MBR.
Re: Invalid partition entry number (another question)
Posted: Sat Aug 23, 2014 6:23 pm
by lweb20
Thanks for the responses.
iansjack wrote:What do you mean "return". What code returns these values?
At booting VMWare and VirtualBox have these values in "ds:si".
Octocontrabass wrote:When
this article says "offset 0x1be, 0x1ce, 0x1de, and 0x1ee", it is referring to the offset relative to the start of the MBR.
MBR starting in 0x0 (sector zero) right? then relative offset are 0x1BE, ... right? if not, I don't understand.
Re: Invalid partition entry number (another question)
Posted: Sat Aug 23, 2014 6:45 pm
by Minoto
lweb20 wrote:
MBR starting in 0x0 (sector zero) right? then relative offset are 0x1BE, ... right? if not, I don't understand.
http://wiki.osdev.org/MBR_(x86) wrote:The MBR that FDISK uses is coded to:
- relocate itself to 0x0000:0x0600
- examine the byte at offset 0x1be, 0x1ce, 0x1de, and 0x1ee to determine the active partition
Yes, the MBR is located in sector 0 of the disk. However, the article is talking about the location of the MBR
in memory, after it's relocated itself to 0x0000:0x0600. 0x0600 + 0x01be = 0x07be, and so on.
Re: Invalid partition entry number (another question)
Posted: Sat Aug 23, 2014 7:04 pm
by lweb20
Minoto wrote:lweb20 wrote:
MBR starting in 0x0 (sector zero) right? then relative offset are 0x1BE, ... right? if not, I don't understand.
http://wiki.osdev.org/MBR_(x86) wrote:The MBR that FDISK uses is coded to:
- relocate itself to 0x0000:0x0600
- examine the byte at offset 0x1be, 0x1ce, 0x1de, and 0x1ee to determine the active partition
Yes, the MBR is located in sector 0 of the disk. However, the article is talking about the location of the MBR
in memory, after it's relocated itself to 0x0000:0x0600. 0x0600 + 0x01be = 0x07be, and so on.
Ahh how silly of me. I thought it was the offset on the disk, but it was in the memory. Thank you very much friend. Thank you so much.