looking at your boot sector

Yes yes, I know, sometimes you just get curious about your boot sector. Your Sysadmin says you’ll go to hell if you play with it, and god knows what would happen if you tried to modify it. But sometimes, when you’ve been screwing with Lilo and Grub and you can’t really remember which one is installed, it’s nice to have a peek:

dd if=/dev/hda of=mbr.img bs=512 count=1
xxd -g 4 mbr.img

Where /dev/hda is the drive you want to look at.

Output should look something like this:

-snip-
0000150: 31fffcf3 a51f61ff 26427cbe 7f7de840 1.....a.&B|..}.@
0000160: 00eb0ebe 847de838 00eb06be 8e7de830 .....}.8.....}.0
0000170: 00be937d e82a00eb fe475255 42200047 ...}.*...GRUB .G
0000180: 656f6d00 48617264 20446973 6b005265 eom.Hard Disk.Re
0000190: 61640020 4572726f 7200bb01 00b40ecd ad. Error.......
00001a0: 10ac3c00 75f4c300 00000000 00000000 ..<.u...........
-snip-

Oh no, I’ve displayed all my most intimate parts for everybody to see. Oh well…hey, there’s Grub. Cool. :)

This entry was posted in uncategorized. Bookmark the permalink.

2 Responses to looking at your boot sector

  1. Mike says:

    hey,
    I just crached on your spot.
    I love it :)

    I have one question tough,
    in 2004 you posted an article about the keyboard-cleaning.
    It seems like mine doesn’t work. I’ll always get other results…
    I’ve been trying for weeks now…
    Sugestions?

    trackback url of the post:
    http://www.mybrainhurts.com/nerdblog/2004/04/keyboard-cleaning.html

  2. Sander van Zoest says:

    wow. apparently od(1) has been replaced by xxd(1)?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>