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
1
vote
1 answer

How to access the CHS information from the partition table of MBR?

I am creating a basic MBR that reads the Partition Table and loads the first sector of the Bootable Partition. I am confused by the CHS and LBA addressing modes. I read in a tutorial that CHS is more or less not used except for compatibility…
Panther Coder
  • 1,058
  • 1
  • 16
  • 43
1
vote
1 answer

Using BYTE PTR to determine the address size when using Data Segment

I am trying to figure out an MBR code (16-bit assembly code in real mode) and I have these lines : mov si,0x7cd8 lods al,BYTE PTR ds:[si] What happens in real time, is that the physical address is 'D8' - How do I know that ? Because this is…
sitoNz
  • 93
  • 2
  • 9
1
vote
2 answers

Partitioning the filesystem on Android

I'm trying to re-partition an SDCard on Android, with root access. I have the 512 byte MBR file, and it shows up as this: Pos MBRndx Type/Name Size Active Hide Start Sector Sectors --- ------ ---------- ---- ------ ---- ------------…
RyanZA
  • 11
  • 1
  • 3
1
vote
1 answer

stack initialization in mbr

Suppose I'm writing my own mbr section and I want to run some C code where. To do so I need firstly initialize stack and after that call C code. I did that in a way like this boot.S file: .code16 .section .bootstrap_stack #initializing stack…
PepeHands
  • 1,368
  • 5
  • 20
  • 36
1
vote
1 answer

Master boot record on flash drive doesn't work

I learn pure hardware (without OS) programming and have a problem with booting from flash-drive (using Kingston DT101 G2 8Gb). Initial code, which was not backed up and I can't reproduce it now exactly as it was :(, worked fine both in emulator…
Ruslan
  • 65
  • 6
1
vote
0 answers

Extended Boot Record - Unused 3rd and 4th entries

In order to create more than 4 partitions using the DOS/MBR partition layout, one typically uses extended partitions. Basically, this means that the last primary partition contains another partition table in its very first block (which has the same…
Dawodo
  • 433
  • 4
  • 15
1
vote
1 answer

assembly - How to boot kernel that is appended end of kernel?

I am trying to boot my assembly kernel on assembly bootloader/MBR. I am reading kernel from offset 0x7e00 to offset 0x8000 (sector 1) into memory; and jumping offset 0x7e00. Why it is not jumps into my kernel? ; Boot.asm [org 0x7c00] [bits…
1
vote
0 answers

Finding gaps between partitions

I've been doing some research on how to find gaps between the entries in a MBR partition table. There isn't much information on gap finding algorithms as it applies to disks using google, so it looks like that I will have to come up with my own. …
Daniel Rudy
  • 1,411
  • 12
  • 23
1
vote
1 answer

What environment can I use to write binary code of the operating system?

For learning bootstrapping of operating systems I do some simple tests this way: I install oracle viratualbox and create hdd disk I install hex-editor HxD and write code to this hdd disk, opening the file which presents this hdd In the end of…
jah
  • 157
  • 1
  • 4
  • 13
1
vote
1 answer

How to convert GPT volume to MBR on Windows 8

My problem is convert GPT volume not disk. I found some solutions but they are all about how to convert disk. On my windows 8, it has disk 0. disk 0 has 7 volumes. I just want to convert one volume in disk 0 . How can I do this?
aysegulP
  • 443
  • 3
  • 6
  • 18
1
vote
1 answer

how to differentiate between GPT dynamic and GPT basic disk in a virtual machine programatically

Recently I had to find out a way to differentiate what partition type the virtual machine used,Reading the raw data from the virtual disk I was able to find it by checking with offset 1C2 (EE in case of GPT), in case of MBR disk if the disk is…
Thiyagarajan
  • 1,271
  • 1
  • 14
  • 19
1
vote
1 answer

What are the requirements of an MBR so it'll be loaded?

I've been playing around modifying the MBR of an old USB stick, booting from it, testing the various BIOS functions, etc... But I don't seem to understand - What does the BIOS look for when deciding which device to boot from? The obvious 2…
Jong
  • 9,045
  • 3
  • 34
  • 66
1
vote
2 answers

MBR says Invalid partition table - But system works! WHY?

I have been given an end of term project to write an assembly code to read the MBR and save it to floppy. I think I managed to read it with INT 13h in DOS in a VirtualBox machine. The machine has only one hard disk with one partition with XP…
Auxiliary
  • 2,687
  • 5
  • 37
  • 59
1
vote
0 answers

Debugging a bootloader using Bochs

I am attempting to debug a 16 bit bootloader in Bochs, however when running the code i am met with the following error: jmp far ptr 0:61Dh => error: comma, colon or end of line expected Screenshot of errors Could someone advise how I could…
Unity
  • 23
  • 4
1
vote
1 answer

Understanding Assembly Code

Could anyone provide some insight into the following assembly code: More Information: The bootloader is in fact a small 16bit bootloader that decipher using Xor decryption, a bigger one, a linux bootloader located in sectors 3 to 34. ( 1 sector is…
Unity
  • 23
  • 4