Created
August 14, 2013 00:21
-
-
Save zachwalton/6226970 to your computer and use it in GitHub Desktop.
reads the stage-1 MBR bootloader to discover the location of the stage-2 bootloader. dumps the first 512 bytes of the secondary bootloader to the screen (filtered through hexdump -C)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd if=/dev/sda \ | |
of=/dev/stdout \ | |
bs=512 \ | |
skip=$( \ | |
dc -e " 16i $( \ | |
dd if=/dev/sda \ | |
of=/dev/stdout \ | |
bs=512 \ | |
count=1 2> /dev/null \ | |
| hexdump -C \ | |
| awk '/^00000040/ {print $9,$8,$7,$6}' \ | |
| tr -d ' ' \ | |
| tr '[a-z]' '[A-Z]' \ | |
) \ | |
p") \ | |
count=1 \ | |
| hexdump -C |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment