Questions tagged [mbr]

Master Boot Record: the first sector on disk, containing partition info

A Master Boot Record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices. The MBR holds the information on how the logical partitions, containing file systems, are organized on that medium.

It identifies how and where an operating system is located, so that it can be bootstrapped.

Wikipedia with full partition table info

136 questions
0
votes
1 answer

direct access to HDD

I want to print out boot sector using code below, but there is mistake. #include #include #include #include using namespace std; short ReadSect (const char * _dsk, // disk to access char *&_buff,…
0
votes
1 answer

How to detect the availability of multiple HDD?

I am studying operating system development. I recently read that the Hard Disk is denoted by 80h and so on. But in an MBR, the MBR must detect multiple HDD to choose booting from. How is this done? How to detect the availability of multiple Hard…
Biju Rakhul
  • 115
  • 1
  • 8
0
votes
0 answers

How does the Boot Indicator field fit inside the MBR partition table?

Apparently the MBR is a 512 Byte data structure. 446 bytes for the BootCode. 64 bytes for The Partition Table 2 bytes for the signature a the very end. The Partition Table structure has four entries of 16 bytes each used to identify the type and…
0
votes
1 answer

Is it possible that small SD Cards are formatted without an MBR?

I'm trying to implement a read only FAT16/32 Filesystem library for embedded systems, to read SD Cards (reinventing the wheel for educational purpose). It seems like there are cards which are formatted without an MBR; just the FAT without any…
itsfarseen
  • 1,109
  • 10
  • 25
0
votes
1 answer

MOV absolute addressing after relocate

I'm writing an int 13h hook in MBR (16 bit). I save old int vector as: mov ax, word [0x13*4] mov bx, word [0x13*4+2] mov [oldint13-cpy_original+0x7e00], ax mov [oldint13-cpy_original+0x7e00+2], bx Because I relocated code in runtime, I had…
jbargu
  • 86
  • 4
0
votes
2 answers

USB programming as MBR Program

I was wondering if it's possible for the MBR to read data from the USB port? I'm wanting it to load windows or linux depending on the value it's read from the usb port
Ageis
  • 2,221
  • 4
  • 22
  • 34
0
votes
0 answers

NTFS - MBR Appears at the beginning of the Volume

I'm experiencing some issues while reading raw data from NTFS Volume. I've opened my C: drive using UNC path ("\.\C") using CreateFile in order to be able to read raw from it. As I read the first sector, I discovered that I'm reading the MBR…
CodeNinja
  • 291
  • 5
  • 19
0
votes
1 answer

How to detect if a virtual machine disk is a GPT or MBR in vmware Esx(i) server /Vcenter

I'm need of finding a way to programatically determine if the Guest virtual machine disk is a GPT or MBR partition .I'm not able to achieve this with vijava or Vddk api's . Is there any other c++ or java libraries that can help me to achieve this .…
Thiyagarajan
  • 1,271
  • 1
  • 14
  • 19
0
votes
1 answer

How to normalize Minimum bounded rectangles into a square [10000][10000]?

I have a spatial data set downloaded from http://www.rtreeportal.org/ MBR's are a rectangle with value like: 506364.3125 4583290.0 508388.09375 4584786.0 representing(x_low,y_low,x_high,y_high) of the rectangle. As you can see all the locations…
web2dev
  • 557
  • 10
  • 28
0
votes
1 answer

Write and Save MBR in nasm

I wanna write my own MBR on my os boot.Mbr in diffrent file Bootloader in diffrent file I want to load mbr in memory with int 13h but it loads only bootloader.i think that was because of org Sample Code: ;---------------------------- ;AFC OS…
user2590769
  • 75
  • 1
  • 10
0
votes
1 answer

VirtualBox: "A disk read error occurred" after migrating Win XP to Virtualbox

I attempted to migrate an old Win XP Compaq desktop to VirtualBox (4.2.12) under Ubuntu (12.04.1) by following https://www.virtualbox.org/wiki/Migrate_Windows After the createfromraw step, I created the virtual machine, and tried to boot. …
Peter B
  • 603
  • 1
  • 8
  • 18
0
votes
1 answer

exception after `call far TSS descriptor:offset`

I have a big problem that's got me stuck for a month! I'm writing assembly code to do a task switch by call far [es:esi + TCB.addr_tss] in bochs, like picture 1. Now I step into the new task, so I type 's' in bochs, like picture 2: For now,…
0
votes
1 answer

VHD not booting in hyper V

I am creating a dynamic vhd for a disk having multiple partitions. The steps involved are First i create a VHD by creating header and footer and calculating bat(Block Allocation Table) size. Then i get disk size and partition details using win32…
singh
  • 439
  • 1
  • 4
  • 20
0
votes
2 answers

Methodology to read a virtual disk's MBR

I am trying to build my own C program that basically works just like fdisk vdisk 'p' command. I just want to be able to read in the first 512 bytes of the disk, lseek to the start of the partitions at (0x1BE) and then read the partition type, name,…
Matt Hintzke
  • 7,744
  • 16
  • 55
  • 113
0
votes
2 answers

Createfile fails while reading mbr

Createfile fails while reading mbr on WinXP. Returns -1 i.e INVALID_DEVICE_HANDLE HANDLE hDisk = CreateFile((LPCWSTR)"\\\\.\\PhysicalDrive0", GENERIC_READ| GENERIC_WRITE, FILE_SHARE_READ| FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0,NULL ); Any idea…