looking at your boot sector

published on 2007-07-24 in computing

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.....}.00000170: 00be937d e82a00eb fe475255 42200047 ...}.*...GRUB .G0000180: 656f6d00 48617264 20446973 6b005265 eom.Hard Disk.Re0000190: 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. :)