Hi

@Madis, as i mentioned earlier.....

QUOTE
If your really interested in seeing the MBR on the USB flash and dont want to or cant get the test boot sector working, i used the following DD command to dump the entire memory space from my USB flash drive....

dd if=\\?\Device\Harddisk2\Partition0 of=c:\temp\usb2.img bs=1M

you may have to change the HarddiskX number to get the proper device from your pc. and the MBR will be the first 512 bytes of data in that dump.


i havnt seen a hex editor yet that will display the MBR when you choose the option "Open Drive". As your card is now, try to run that DD command above. when you do it will create an image file of the "ENTIRE" Memory space, and here you will see the MBR as the first sector. on the contrary, when you open the drive in a hex editior you will see the boot sector of the first partition in your hex editor... two totally different locations in memory.

I guess you gotta understand how windows displays a drive to fully understand what is going on here. I believe windows is reading the MBR and checking its partition table, then it creates a Drive letter(s) (C:,D:, E:, F:, etc) based on what it finds and how many logical partitions (drive letters) it finds in the MBR partition table then it maps "not" the mbr but the memory location for the first, second, etc partition that is locatated in the MBR.

Now after you read the entire memory space with that DD command, you can see the MBR, you can check one of those websites i gave earlier to find more info on MBR's, you can look at the MBR partition table and find the pointer to the first parirtion on the memory card. If you goto to that memory location pointed to by the partition table in the MBR, you will start to see what you see in your hex editior as the "so called" First Sector (which is accually the memory address pointed to by an entry in the partition table of the MBR).

SO when your device is booting right now, what is hapeneing is, the motherboard bios is accually first reading the MBR into memory, The MBR has its own bootloader of sorts and what it does is checks the MBR partition table (table of logical partitions, or "drive letters" in windows) and finds the first active partition, if the first active partition's first sector contains the boot signature 0X55AA at offset 0X510 then it procedes to load that secotr into memory and jumps into its code. That code the MBR jumps into is accually your bootsector (or in this case my test bootsector). it is then upto your boot sector to follow the proper rules for reading the device, based upon how your motherboard emulates the USB remapping and how your file system organizes your files.

One thing i am stummped on is how to read the Fat file system in Cylinder Head Sector format... it almost seems like my memory card is not returinging the proper CHS counts and hence the memory isnt organizing properly and i cannot find things like the root directory entry point, etc.

i hope that makes a better understanding....

Also, since my boot sector worked for you, and you verified it was accually reading the USB Drive by noting the LED on the memory card flashing each time you pressed enter, then that tells me your motherboard bios is emulating the USB booting using Hard Drive emulation Since i am using interrupt 0x13 with a drive letter of 0x80 (0x80 is normally primary master IDE device), reguardless of what the bios option is called.

check this website for more info on interrupt 0x13.... http://www.ctyme.com/intr/rb-0607.htm

Jason