PBRVIEW.G4B: https://github.com/deomsh/PBRVIEW.G4B
PBRVIEW.G4B v0.1 (20231015), by deomsh
Function: display Partition Boot Record on FAT, NTFS or exFAT
PBRVIEW.G4B [--start=N|--skip=n|--force=N] DISK|DEVICE|FILE [/MS|/PQ]
Optional: --start=N|--skip=n|--force=N: N/n is starting sector/byte (0-N/n)
Use if no partition is given: image-file, disk or blocklist
Optional: /MS|/PQ for Microsoft or PowerQuest style
Remarks:
FILE can be a blocklist too
With --start/--force N sector number is in 512 byte units
With --start/--skip/--force filesystem derived from jump-code only
First 4MB is searched for EBxx90 (0x2000 512 byte sectors)
In case of exFAT switch /MS or /PQ changes colors only
Unlock line 26 to change default colors to blue
Example: PBRVIEW.G4B (hd0,0)
Example: PBRVIEW.G4B (fd0) /ms
Example: PBRVIEW.G4B (rd) /pq
Example: PBRVIEW.G4B --start=63 (hd0)
Example: PBRVIEW.G4B (hd0,0)/FATIMAGE.IMG
Example: PBRVIEW.G4B --start=1008 (hd1,0)/IMAGE.IMG
Example: PBRVIEW.G4B --force=1008 (hd1,0)/ISOFILE.ISO
Example: PBRVIEW.G4B --skip=0x3F0 (hd1,0)/FATIMAGE.IMG
Example: PBRVIEW.G4B --start=6 (hd0,0) /ms
Example: PBRVIEW.G4B --skip=0x7E00 (cd)0+0x800
Example: PBRVIEW.G4B (0xe0)0x567+1
History
Version 0.1
First published version
There are three styles: Default, Microsoft and PowerQuest. In case of exFAT colors are different only, no official sources from Microsoft found, and PowerQuest is too old for exFAT.
Some action print-screens:
If needed (first) Partition Boot Record is searched in the first 4MB, but only if starting with jump EBxx90. Useful on image-files:
With switch --start=N (sectors) or --skip=n (bytes) search starts from given offset. For instance to view backup of FAT32 bootsector:
Also a blocklist can be used. For instance to view Partition Boot Record on an El Torito Bootimage:
BTW ISOINFO.G4B is not published yet
Default color can be changed to blue by unlocking line 26 of the script:
Technical detail: no memory used, al non-textual values are directly read from disk with following sub-routine:
:read #-#+ Function: read 4 bytes in litte endian order from disk and return as hex #-# Use: call :read ADDRESS FILE setlocal && set LE= && set result= raw cat --hex --skip=%~1 --length=4 %~2 | set LE= set "LE=%LE:~10,11%" &; if not "%LE:~9,1%"==" " && set result=0x%LE:~9,2%%%LE:~6,2%%%LE:~3,2%%%LE:~0,2% ! if not "%LE:~6,1%"==" " && set result=0x%LE:~6,2%%%LE:~3,2%%%LE:~0,2% ! if not "%LE:~3,1%"==" " && set result=0x%LE:~3,2%%%LE:~0,2% ! if not "%LE:~0,1%"==" " && set result=0x%LE:~0,2% endlocal && set result=%result% goto :eof