brock@montreat:~/bin$ ln /home/brock/sysadmin/notes/boot.img .
brock@montreat:~/bin$ ls -l *.img
-rw-r--r-- 3 brock users 62914560 Feb 19 14:48 boot.img
brock@montreat:~/bin$ rm boot.img
brock@montreat:~/bin$ cd ~/sysadmin/notes/tryit/
brock@montreat:~/sysadmin/notes/tryit$ ln -s /home/brock/sysadmin/notes/boot.img .
brock@montreat:~/sysadmin/notes/tryit$ ls -l
total 0
lrwxrwxrwx 1 brock users 35 Feb 28 13:27 boot.img -> /home/brock/sysadmin/notes/boot.img
brock@montreat:~/sysadmin/notes/tryit$ dd if=boot.img of=boot.BPB.img bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0211901 s, 24.2 kB/s
brock@montreat:~/sysadmin/notes/tryit$ od boot.BPB.img 
0000000 036353 066620 063153 027163 060546 000164 010002 000001
0000020 000002 000002 174000 000040 000077 000377 000000 000000
0000040 160000 000001 000600 164451 177121 061004 067557 020164
0000060 020040 020040 020040 040506 030524 020066 020040 017416
0000100 055676 126174 140042 005564 132126 135416 000007 010315
0000120 165536 031360 146744 146426 165431 052376 064550 020163
0000140 071551 067040 072157 060440 061040 067557 060564 066142
0000160 020145 064544 065563 020056 050040 062554 071541 020145
0000200 067151 062563 072162 060440 061040 067557 060564 066142
0000220 020145 066146 070157 074560 060440 062156 005015 071160
0000240 071545 020163 067141 020171 062553 020171 067564 072040
0000260 074562 060440 060547 067151 027040 027056 006440 000012
0000300 000000 000000 000000 000000 000000 000000 000000 000000
*
0000760 000000 000000 000000 000000 000000 000000 000000 125125
0001000
brock@montreat:~/sysadmin/notes/tryit$ od -c boot.BPB.img 
0000000 353   < 220   m   k   f   s   .   f   a   t  \0 002 020 001  \0
0000020 002  \0 002  \0  \0 370      \0   ?  \0 377  \0  \0  \0  \0  \0
0000040  \0 340 001  \0 200 001   ) 351   Q 376 004   b   o   o   t    
0000060                           F   A   T   1   6             016 037
0000100 276   [   | 254   " 300   t  \v   V 264 016 273  \a  \0 315 020
0000120   ^ 353 360   2 344 315 026 315 031 353 376   T   h   i   s    
0000140   i   s       n   o   t       a       b   o   o   t   a   b   l
0000160   e       d   i   s   k   .           P   l   e   a   s   e    
0000200   i   n   s   e   r   t       a       b   o   o   t   a   b   l
0000220   e       f   l   o   p   p   y       a   n   d  \r  \n   p   r
0000240   e   s   s       a   n   y       k   e   y       t   o       t
0000260   r   y       a   g   a   i   n       .   .   .      \r  \n  \0
0000300  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000760  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   U 252
0001000
brock@montreat:~/sysadmin/notes/tryit$ od -t a -N 100 -t d2 boot.BPB.img 
0000000   k   < dle   m   k   f   s   .   f   a   t nul stx dle soh nul
          15595   28048   26219   11891   24934     116    4098       1
0000020 stx nul stx nul nul   x  sp nul   ? nul del nul nul nul nul nul
              2       2   -2048      32      63     255       0       0
0000040 nul   ` soh nul nul soh   )   i   Q   ~ eot   b   o   o   t  sp
          -8192       1     384   -5847    -431   25092   28527    8308
0000060  sp  sp  sp  sp  sp  sp   F   A   T   1   6  sp  sp  sp  so  us
           8224    8224    8224   16710   12628    8246    8224    7950
0000100   >   [   |   ,   "   @   t  vt   V   4  so   ; bel nul   M dle
          23486  -21380  -16350    2932  -19370  -17650       7    4301
0000120   ^   k   p   2   d   M syn   M  em   k   ~   T   h   i   s  sp
          -5282   13040  -12828  -13034   -5351   21758   26984    8307
0000140   i   s  sp   n
          29545   28192
0000144
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 11 -N 2 -t d2 boot.BPB.img 
0000011    512
0000013
brock@montreat:~/sysadmin/notes/tryit$ BPB_BytsPerSec=512
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 13 -N 1 -t d1 boot.BPB.img 
0000013   16
0000014
brock@montreat:~/sysadmin/notes/tryit$ BPB_SecPerClus=16
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 14 -N 2 -t d2 boot.BPB.img 
0000014      1
0000016
brock@montreat:~/sysadmin/notes/tryit$ BPB_RsvdSecCnt=1
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 16 -N 1 -t d1 boot.BPB.img 
0000016    2
0000017
brock@montreat:~/sysadmin/notes/tryit$ BPB_NumFATs=2
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 17 -N 2 -t d2 boot.BPB.img 
0000017    512
0000019
brock@montreat:~/sysadmin/notes/tryit$ BPB_RootEntCnt=512
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 19 -N 2 -t d2 boot.BPB.img 
0000019      0
0000021
brock@montreat:~/sysadmin/notes/tryit$ BPB_TotSec16=0
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 32 -N 4 -t d4 boot.BPB.img 
0000032      122880
0000036
brock@montreat:~/sysadmin/notes/tryit$ BPB_TotSec32=122880
brock@montreat:~/sysadmin/notes/tryit$ TotSec=$BPB_TotSec32
brock@montreat:~/sysadmin/notes/tryit$ echo $TotSec
122880
brock@montreat:~/sysadmin/notes/tryit$ echo $(( $TotSec * $BPB_BytsPerSec ))
62914560
brock@montreat:~/sysadmin/notes/tryit$ ls -lL boot.img 
-rw-r--r-- 2 brock users 62914560 Feb 19 14:48 boot.img
brock@montreat:~/sysadmin/notes/tryit$ ls -l boot.img 
lrwxrwxrwx 1 brock users 35 Feb 28 13:27 boot.img -> /home/brock/sysadmin/notes/boot.img
brock@montreat:~/sysadmin/notes/tryit$ RootDirSectors=$(( ( ( $BPB_RootEntCnt * 32 ) + ( $BPB_BytsPerSec - 1 ) ) / $BPB_BytsPerSec ))
brock@montreat:~/sysadmin/notes/tryit$ echo $RootDirSectors
32
brock@montreat:~/sysadmin/notes/tryit$ od -A d -j 22 -N 2 -t d2 boot.BPB.img 
0000022     32
0000024
brock@montreat:~/sysadmin/notes/tryit$ brock@montreat:~/sysadmin/notes/tryit$ 
brock@montreat:~/sysadmin/notes/tryit$ BPB_FATSz16=32
brock@montreat:~/sysadmin/notes/tryit$ FATSz=$BPB_FATSz16
brock@montreat:~/sysadmin/notes/tryit$ FirstDataSector=$(( $BPB_RsvdSecCnt + ( $BPB_NumFATs * $FATSz ) + $RootDirSectors ))
brock@montreat:~/sysadmin/notes/tryit$ echo $FirstDataSector
97
brock@montreat:~/sysadmin/notes/tryit$ DataSec=$(( $TotSec - ( $BPB_RsvdSecCnt + ( $BPB_NumFATs * $FATSz ) + $RootDirSectors ) ))
brock@montreat:~/sysadmin/notes/tryit$ echo $DataSec
122783
brock@montreat:~/sysadmin/notes/tryit$ CountofClusters=$(( $DataSec / $BPB_SecPerClus ))
brock@montreat:~/sysadmin/notes/tryit$ echo $CountofClusters
7673
brock@montreat:~/sysadmin/notes/tryit$ rootDirStart=$(( $BPB_RsvdSecCnt + $BPB_NumFATs * $FATSz ))
brock@montreat:~/sysadmin/notes/tryit$ echo $rootDirStart
65
brock@montreat:~/sysadmin/notes/tryit$ echo $RootDirSectors
32
brock@montreat:~/sysadmin/notes/tryit$ dd if=boot.img of=boot.rootdir.img bs=512 count=$RootDirSectors skip=$rootDirStart
32+0 records in
32+0 records out
16384 bytes (16 kB) copied, 0.0197421 s, 830 kB/s
brock@montreat:~/sysadmin/notes/tryit$ od -A d -t a boot.rootdir.img | more
0000000   b   o   o   t  sp  sp  sp  sp  sp  sp  sp  bs nul nul   C   E
0000016   r   H   r   H nul nul   C   E   r   H nul nul nul nul nul nul
0000032   A   o nul   v nul   e nul   r nul   l nul  si nul   G   a nul
0000048   y nul   s nul nul nul del del del del nul nul del del del del
0000064   O   V   E   R   L   A   Y   S  sp  sp  sp dle nul nul   7 can
0000080   S   J   S   J nul nul   7 can   S   J  gs nul nul nul nul nul
0000096   e   t nul   m nul   p nul nul nul del del  si nul can del del
0000112 del del del del del del del del del del nul nul del del del del
0000128   e   . nul   d nul   p nul   k nul   g nul  si nul can   - nul
0000144   d nul   i nul   v nul   e nul   r nul nul nul   t nul   . nul
0000160   e   C nul   O nul   P nul   Y nul   I nul  si nul can   N nul
0000176   G nul   . nul   l nul   i nul   n nul nul nul   u nul   x nul
0000192   e   O   P   Y   I   N   ~   1   T   M   P  sp nul nul   & can
0000208   S   J   S   J nul nul   & can   S   J   [ dle enq   I nul nul
0000224   B   c nul   o nul   m nul nul nul del del  si nul   g del del
0000240 del del del del del del del del del del nul nul del del del del
0000256 soh   L nul   I nul   C nul   E nul   N nul  si nul   g   C nul
0000272   E nul   . nul   b nul   r nul   o nul nul nul   a nul   d nul
0000288   L   I   C   E   N   C   ~   1   B   R   O  sp nul   d   # can
0000304   S   J   S   J nul nul   # can   S   J   P  ff   V enq nul nul
