Is there a way to read the contents of the master boot record?

0

1

Reading another question on here it made me curious if it's possible to actually read the contents of the mbr. As I understand it, there's a certain area at the very front of the partition that lists this information. I'm curious if it's sort of like an ini file or some sort of script that runs and tells the computer what it needs to know about where to boot from and other information like sectors, heads, cylinders that's important. I don't know much about what would be in it, but I thought it'd be interesting to learn more about the specifics.

Codezilla

Posted 2012-11-26T16:21:43.840

Reputation: 828

Which Windows version? – avirk – 2012-11-26T16:51:30.223

microsoft windows 7 – Codezilla – 2012-11-26T16:55:37.600

Answers

1

On a Unix-type system (Linux, MacOS, etc), you simply read from the hard drive's character device (/dev/sda perhaps), and access the MBR that way. On Windows you could get a windows version of the dd program and use that to look at the bytes you are interested in.

Now, as to what's in the MBR, you might want to look at the Wikipedia page for a beginning. Hint: No, it's not a script.

Michael Kohne

Posted 2012-11-26T16:21:43.840

Reputation: 3 808

Windows would be the preferred way but I have a suse vm I'm going to try your idea on. – Codezilla – 2012-11-26T16:29:46.057

@Codezilla - A virtual machine wouldn't be much use except to look at the virtual hdd's master boot record. – Ramhound – 2012-11-26T17:06:10.270

Ya, but it might actually be interesting to see what that looks like too compared to a normal install. – Codezilla – 2012-11-26T17:09:59.677