views:

795

answers:

5

I'd like to disassemble the MBR (first 512 bytes) of a bootable x86 disk that I have. I have copied the MBR to a file using

dd if=/dev/my-device of=mbr bs=512 count=1

Any suggestions for a Linux utility that can disassemble the file mbr?

+2  A: 

You can use objdump. According to this article the syntax is:

objdump -D -b binary -mi386 -Maddr16,data16 mbr
hlovdal
+3  A: 

I like ndisasm for this purpose. It comes with the NASM assembler, which is free and open source and included in the package repositories of most linux distros.

asveikau
+8  A: 

The GNU tool is called objdump, for example:

objdump -D -b binary -m i8086 <file>
starblue
A: 

no but in windows use ida pro, it is even free

Arabcoder
+2  A: 

sudo dd if=/dev/sda bs=512 count=1 | ndisasm -b16 -o7c00h -

Jason