The  GRUB  BPB
(BIOS Parameter Block)



GRUB's _ BIOS Parameter Block _ (or BPB); some of which dates back to the
release of IBM/MS DOS 2.0, begins at offset 7C0Bh and ends at offset 7C3Dh.

                                     BPB  
                                      |                OEM System Name
       0  1  2  3  4  5  6  7  8  9  A| B  C  D  E  F         |
7C00  EB 48 90 4D 53 44 4F 53 35 2E 30 00 02 01 01 00   ëH.MSDOS5.0.....
7C10  02 E0 00 40 0B F0 09 00 12 00 02 00 00 00 00 00   .à.@.ð..........
7C20  00 00 00 00 00 00 29 77 2F 49 44 47 52 55 42 2D   ......)w/IDGRUB-
7C30  30 2E 39 33 54 53 46 41 54 31 32 20 20 20 03 02   0.93TSFAT12   ..
7C40  FF 00 00 80 24 00 00 00 00 08 FA EA 50 7C 00 00    ..€$.....úêP|..

The BPB data on this diskette is interpreted as follows:

B P B
  Hex     As seen     HEX
 OFFSET   on Disk    value                   Meaning / Description
=======   =======   =======      ==============================================
0B - 0C    00 02     0200h   =   512 Bytes per Sector,
0D            01       01h   =   1 Sector(s) per Cluster,
0E - 0F    01 00     0001h   =   1 Reserved sector (starting at Sector 0),
10            02       02h   =   2 FATs on the diskette,
11 - 12    E0 00     00E0h   =   224 possible Root Directory entries,
13 - 14    40 0B     0B40h   =   2880 Total Sectors on the diskette,
                                 ( 2880 x 512 = 1,474,560 bytes total ),
15            F0       F0h   ->  Media Descriptor Byte: F0 usually means
                                 the most recent 3.5-inch, 1440 KiB disk[*].
16 - 17    09 00     0009h   =   9 Sectors per FAT,
18 - 19    12 00     0012h   =   18 Sectors per Track,
1A - 1B    02 00     0002h   =   2 Sides (or Heads).
1C - 25                      ->  Should be all zeros (see text below).
26            29             ->  Extended BPB Signature Byte (if present, then
                                 the following strings will also have meaning):
27 - 2A   xx xx xx xx        =   Volume Serial Number ("4449-2F77" here).
2B - 35   (11 bytes)         =   Volume Label ("GRUB-0.93TS" in this case).
36 - 3B   ( 8 bytes)         =   File System ID ("FAT12   " in this case).

 ______________
 * FF = Double-Sided, 8 Sectors/Track (320 KiB), 5.25-inch;
   FE = Single-Sided, 8 Sectors/Track (160 KiB), 5.25-inch;
   FD = Double-Sided, 9 Sectors/Track (360 KiB), 5.25-inch;
   FC = Single-Sided, 9 Sectors/Track (180 KiB), 5.25-inch;

   F9 = Double-Sided,  9 Sectors/Track ( 720 KiB),  3.5-inch,
        or:
   F9 = Double-Sided, 15 Sectors/Track (1220 KiB), 5.25-inch;
        And since F9 could mean either of these two disk
        types, it was not very useful!

   F8 = All hard disks.
   
   F0 = Double-Sided, 18 Sectors/Track (1440 KiB), 3.5-inch;
        or:
      = Double-Sided, 36 Sectors/Track (2880 KiB), 3.5-inch;
        (A special floppy drive was necessary to use these.)

   (The are also some very old 8-inch diskette type numbers,
    but we did not list them here.)

=================================================================
NOTE: The rest of this particular disk's contents are as follows:

 Volume in drive A has no label
 Volume Serial Number is 4449-2F77
 Directory of A:\boot\grub

.              <DIR>        07-04-03  8:55a .
..             <DIR>        07-04-03  8:55a ..
STAGE1                 512  01-24-03  7:00p stage1
STAGE2             106,364  01-24-03  7:00p stage2
TSR-SP~1 GZ          3,656  07-04-03  5:56p tsr-splash.xpm.gz
FAT_ST~1             7,536  01-24-03  7:00p fat_stage1_5
E2FS_S~1             7,840  01-24-03  7:00p e2fs_stage1_5
REISER~1             9,408  01-24-03  7:00p reiserfs_stage1_5
JFS_ST~1             8,448  01-24-03  7:00p jfs_stage1_5
VSTAFS~1             6,528  01-24-03  7:00p vstafs_stage1_5
MINIX_~1             7,040  01-24-03  7:00p minix_stage1_5
XFS_ST~1             9,320  01-24-03  7:00p xfs_stage1_5
FFS_ST~1             6,880  01-24-03  7:00p ffs_stage1_5
GRUB~1   CON         3,045  07-04-03  5:56p grub.conf
        12 file(s)        176,577 bytes
         2 dir(s)       1,276,928 bytes free


Checking the data above, we see our diskette has a capacity of 1440 Kbytes, since the Word at offsets 13-14h (0B40h) gives us a total of 2,880 sectors (or 1,474,560 bytes). It also has two sides and 18 Sectors per Track which means we have a standard 3.5-inch 'DSHD' Double-Sided High Density diskette of 80 Tracks on each side (18 sectors/track x 80 tracks = 1440 sectors on each side; for a total of 2880 sectors).

On hard disks, offsets 1Ch through 1Fh are a Double-Word containing the Number of Hidden Sectors. But floppy disks should have only zeros here, since there are no sectors before the Boot Sector on a normal floppy diskette. The next four bytes (offsets 20h through 23h), another Double-Word, are used for disk partitions having more than 65,535 sectors! That's far beyond the size of any diskette, so this field should be all zeros as well; remember offsets 13-14h are where a diskette's “Total Number of Sectors” are located.
[Some documents state offset 24h is for a drive number under DOS 4.0 or above, so a zero-byte would mean the first floppy drive. But it seems to us the only logical way it could be used for floppy diskettes would be if the whole BPB was first copied into memory then altered there, since you couldn't possibly change this byte if it were on a write-protected floppy disk!]
The byte at offset 25h is “Reserved” and always set to zero.

Beginning with DOS version 4.0, if the byte at offset 26h is a 29, then the next four bytes (offsets 27h through 2Ah) will contain a Serial Number based on the date and time the diskette was formatted; these bytes (along with the OEM ID and the Volume Label) can, of course, be changed by a disk editor. If the 29 Extended BPB Signature Byte is present, then the bytes at offsets 2Bh through 35h may contain an 11-byte Volume Label and the bytes at offsets 36h through 3Dh should contain the File System ID of: "FAT12   "; with three trailing space bytes (20h).

Why place GRUB (primarily designed for booting linux) on a diskette formatted with a FAT12 file system? Well, this allows PC users to edit its configuration file under Windows™ if need be, and a GRUB diskette can be handy for booting a Windows™ OS on a hard disk with a corrupt Master Boot Record (MBR) sector. A savy PC tech will learn how to use linux, since it's often quite useful in handling problems with other operating systems!

If you require more information on the BPB, see the TABLE on this page: The MSWIN4.1 Hard Disk Boot Record.

 


Last Update: 12 December 2009 (12.12.2009).


You can write to me using this: online reply form. (It opens in a new window.)

MBR and Boot Records Index

The Starman's Realm Index Page

 

 

Hosted by uCoz