168349Sobrien#------------------------------------------------------------------------------
2362844Sdelphij# $File: filesystems,v 1.133 2020/05/17 19:32:00 christos Exp $
368349Sobrien# filesystems:  file(1) magic for different filesystems
468349Sobrien#
5328874Seadler0	name	partid
6267843Sdelphij>0	ubyte	0x00	Unused
7267843Sdelphij>0	ubyte	0x01	12-bit FAT
8267843Sdelphij>0	ubyte	0x02	XENIX /
9267843Sdelphij>0	ubyte	0x03	XENIX /usr
10267843Sdelphij>0	ubyte	0x04	16-bit FAT, less than 32M
11267843Sdelphij>0	ubyte	0x05	extended partition
12267843Sdelphij>0	ubyte	0x06	16-bit FAT, more than 32M
13267843Sdelphij>0	ubyte	0x07	OS/2 HPFS, NTFS, QNX2, Adv. UNIX
14267843Sdelphij>0	ubyte	0x08	AIX or os, or etc.
15267843Sdelphij>0	ubyte	0x09	AIX boot partition or Coherent
16267843Sdelphij>0	ubyte	0x0a	O/2 boot manager or Coherent swap
17267843Sdelphij>0	ubyte	0x0b	32-bit FAT
18267843Sdelphij>0	ubyte	0x0c	32-bit FAT, LBA-mapped
19267843Sdelphij>0	ubyte	0x0d	7XXX, LBA-mapped
20267843Sdelphij>0	ubyte	0x0e	16-bit FAT, LBA-mapped
21267843Sdelphij>0	ubyte	0x0f	extended partition, LBA-mapped
22267843Sdelphij>0	ubyte	0x10	OPUS
23267843Sdelphij>0	ubyte	0x11 	OS/2 DOS 12-bit FAT
24267843Sdelphij>0	ubyte	0x12 	Compaq diagnostics
25267843Sdelphij>0	ubyte	0x14 	OS/2 DOS 16-bit FAT <32M
26267843Sdelphij>0	ubyte	0x16 	OS/2 DOS 16-bit FAT >=32M
27267843Sdelphij>0	ubyte	0x17 	OS/2 hidden IFS
28267843Sdelphij>0	ubyte	0x18 	AST Windows swapfile
29267843Sdelphij>0	ubyte	0x19 	Willowtech Photon coS
30267843Sdelphij>0	ubyte	0x1b 	hidden win95 fat 32
31267843Sdelphij>0	ubyte	0x1c 	hidden win95 fat 32 lba
32267843Sdelphij>0	ubyte	0x1d	hidden win95 fat 16 lba
33267843Sdelphij>0	ubyte	0x20 	Willowsoft OFS1
34267843Sdelphij>0	ubyte	0x21 	reserved
35267843Sdelphij>0	ubyte	0x23 	reserved
36267843Sdelphij>0	ubyte	0x24	NEC DOS
37267843Sdelphij>0	ubyte	0x26 	reserved
38267843Sdelphij>0	ubyte	0x31 	reserved
39267843Sdelphij>0	ubyte	0x32	Alien Internet Services NOS
40267843Sdelphij>0	ubyte	0x33 	reserved
41267843Sdelphij>0	ubyte	0x34 	reserved
42267843Sdelphij>0	ubyte	0x35 	JFS on OS2
43267843Sdelphij>0	ubyte	0x36 	reserved
44267843Sdelphij>0	ubyte	0x38 	Theos
45267843Sdelphij>0	ubyte	0x39 	Plan 9, or Theos spanned
46267843Sdelphij>0	ubyte	0x3a 	Theos ver 4 4gb partition
47267843Sdelphij>0	ubyte	0x3b 	Theos ve 4 extended partition
48267843Sdelphij>0	ubyte	0x3c 	PartitionMagic recovery
49267843Sdelphij>0	ubyte	0x3d 	Hidden Netware
50267843Sdelphij>0	ubyte	0x40 	VENIX 286 or LynxOS
51267843Sdelphij>0	ubyte	0x41	PReP
52267843Sdelphij>0	ubyte	0x42	linux swap sharing DRDOS disk
53267843Sdelphij>0	ubyte	0x43	linux sharing DRDOS disk
54267843Sdelphij>0	ubyte	0x44	GoBack change utility
55267843Sdelphij>0	ubyte	0x45	Boot US Boot manager
56267843Sdelphij>0	ubyte	0x46	EUMEL/Elan or Ergos 3
57267843Sdelphij>0	ubyte	0x47	EUMEL/Elan or Ergos 3
58267843Sdelphij>0	ubyte	0x48	EUMEL/Elan or Ergos 3
59267843Sdelphij>0	ubyte	0x4a	ALFX/THIN filesystem for DOS
60267843Sdelphij>0	ubyte	0x4c	Oberon partition
61267843Sdelphij>0	ubyte	0x4d 	QNX4.x
62267843Sdelphij>0	ubyte	0x4e 	QNX4.x 2nd part
63267843Sdelphij>0	ubyte	0x4f 	QNX4.x 3rd part
64267843Sdelphij>0	ubyte	0x50 	DM (disk manager)
65267843Sdelphij>0	ubyte	0x51 	DM6 Aux1 (or Novell)
66267843Sdelphij>0	ubyte	0x52 	CP/M or Microport SysV/AT
67267843Sdelphij>0	ubyte	0x53 	DM6 Aux3
68267843Sdelphij>0	ubyte	0x54	DM6 DDO
69267843Sdelphij>0	ubyte	0x55	EZ-Drive (disk manager)
70267843Sdelphij>0	ubyte	0x56	Golden Bow (disk manager)
71267843Sdelphij>0	ubyte	0x57	Drive PRO
72267843Sdelphij>0	ubyte	0x5c	Priam Edisk (disk manager)
73267843Sdelphij>0	ubyte	0x61	SpeedStor
74267843Sdelphij>0	ubyte	0x63	GNU HURD or Mach or Sys V/386
75267843Sdelphij>0	ubyte	0x64	Novell Netware 2.xx or Speedstore
76267843Sdelphij>0	ubyte	0x65	Novell Netware 3.xx
77267843Sdelphij>0	ubyte	0x66	Novell 386 Netware
78267843Sdelphij>0	ubyte	0x67	Novell
79267843Sdelphij>0	ubyte	0x68	Novell
80267843Sdelphij>0	ubyte	0x69	Novell
81267843Sdelphij>0	ubyte	0x70	DiskSecure Multi-Boot
82267843Sdelphij>0	ubyte	0x71	reserved
83267843Sdelphij>0	ubyte	0x73	reserved
84267843Sdelphij>0	ubyte	0x74	reserved
85267843Sdelphij>0	ubyte	0x75	PC/IX
86267843Sdelphij>0	ubyte	0x76	reserved
87267843Sdelphij>0	ubyte	0x77	M2FS/M2CS partition
88267843Sdelphij>0	ubyte	0x78	XOSL boot loader filesystem
89267843Sdelphij>0	ubyte	0x80	MINIX until 1.4a
90267843Sdelphij>0	ubyte	0x81	MINIX since 1.4b
91267843Sdelphij>0	ubyte	0x82	Linux swap or Solaris
92267843Sdelphij>0	ubyte	0x83	Linux native
93267843Sdelphij>0	ubyte	0x84	OS/2 hidden C: drive
94267843Sdelphij>0	ubyte	0x85	Linux extended partition
95267843Sdelphij>0	ubyte	0x86	NT FAT volume set
96267843Sdelphij>0	ubyte	0x87	NTFS volume set or HPFS mirrored
97267843Sdelphij>0	ubyte	0x8a	Linux Kernel AiR-BOOT partition
98267843Sdelphij>0	ubyte	0x8b	Legacy Fault tolerant FAT32
99267843Sdelphij>0	ubyte	0x8c	Legacy Fault tolerant FAT32 ext
100267843Sdelphij>0	ubyte	0x8d	Hidden free FDISK FAT12
101267843Sdelphij>0	ubyte	0x8e	Linux Logical Volume Manager
102267843Sdelphij>0	ubyte	0x90	Hidden free FDISK FAT16
103267843Sdelphij>0	ubyte	0x91	Hidden free FDISK DOS EXT
104267843Sdelphij>0	ubyte	0x92	Hidden free FDISK FAT16 Big
105267843Sdelphij>0	ubyte	0x93	Amoeba filesystem
106267843Sdelphij>0	ubyte	0x94	Amoeba bad block table
107267843Sdelphij>0	ubyte	0x95	MIT EXOPC native partitions
108267843Sdelphij>0	ubyte	0x97	Hidden free FDISK FAT32
109267843Sdelphij>0	ubyte	0x98	Datalight ROM-DOS Super-Boot
110267843Sdelphij>0	ubyte	0x99	Mylex EISA SCSI
111267843Sdelphij>0	ubyte	0x9a	Hidden free FDISK FAT16 LBA
112267843Sdelphij>0	ubyte	0x9b	Hidden free FDISK EXT LBA
113267843Sdelphij>0	ubyte	0x9f	BSDI?
114267843Sdelphij>0	ubyte	0xa0	IBM Thinkpad hibernation
115267843Sdelphij>0	ubyte	0xa1	HP Volume expansion (SpeedStor)
116267843Sdelphij>0	ubyte	0xa3	HP Volume expansion (SpeedStor)
117267843Sdelphij>0	ubyte	0xa4	HP Volume expansion (SpeedStor)
118267843Sdelphij>0	ubyte	0xa5	386BSD partition type
119267843Sdelphij>0	ubyte	0xa6	OpenBSD partition type
120267843Sdelphij>0	ubyte	0xa7	NeXTSTEP 486
121267843Sdelphij>0	ubyte	0xa8	Apple UFS
122267843Sdelphij>0	ubyte	0xa9	NetBSD partition type
123267843Sdelphij>0	ubyte	0xaa	Olivetty Fat12 1.44MB Service part
124267843Sdelphij>0	ubyte	0xab	Apple Boot
125267843Sdelphij>0	ubyte	0xae	SHAG OS filesystem
126267843Sdelphij>0	ubyte	0xaf	Apple HFS
127267843Sdelphij>0	ubyte	0xb0	BootStar Dummy
128267843Sdelphij>0	ubyte	0xb1	reserved
129267843Sdelphij>0	ubyte	0xb3	reserved
130267843Sdelphij>0	ubyte	0xb4	reserved
131267843Sdelphij>0	ubyte	0xb6	reserved
132267843Sdelphij>0	ubyte	0xb7	BSDI BSD/386 filesystem
133267843Sdelphij>0	ubyte	0xb8	BSDI BSD/386 swap
134267843Sdelphij>0	ubyte	0xbb	Boot Wizard Hidden
135267843Sdelphij>0	ubyte	0xbe	Solaris 8 partition type
136267843Sdelphij>0	ubyte	0xbf	Solaris partition type
137267843Sdelphij>0	ubyte	0xc0 	CTOS
138267843Sdelphij>0	ubyte	0xc1 	DRDOS/sec (FAT-12)
139267843Sdelphij>0	ubyte	0xc2 	Hidden Linux
140267843Sdelphij>0	ubyte	0xc3 	Hidden Linux swap
141267843Sdelphij>0	ubyte	0xc4 	DRDOS/sec (FAT-16, < 32M)
142267843Sdelphij>0	ubyte	0xc5 	DRDOS/sec (EXT)
143267843Sdelphij>0	ubyte	0xc6 	DRDOS/sec (FAT-16, >= 32M)
144267843Sdelphij>0	ubyte	0xc7 	Syrinx (Cyrnix?) or HPFS disabled
145267843Sdelphij>0	ubyte	0xc8 	Reserved for DR-DOS 8.0+
146267843Sdelphij>0	ubyte	0xc9 	Reserved for DR-DOS 8.0+
147267843Sdelphij>0	ubyte	0xca 	Reserved for DR-DOS 8.0+
148267843Sdelphij>0	ubyte	0xcb 	DR-DOS 7.04+ Secured FAT32 CHS
149267843Sdelphij>0	ubyte	0xcc 	DR-DOS 7.04+ Secured FAT32 LBA
150267843Sdelphij>0	ubyte	0xcd	CTOS Memdump
151267843Sdelphij>0	ubyte	0xce 	DR-DOS 7.04+ FAT16X LBA
152267843Sdelphij>0	ubyte	0xcf 	DR-DOS 7.04+ EXT LBA
153267843Sdelphij>0	ubyte	0xd0 	REAL/32 secure big partition
154267843Sdelphij>0	ubyte	0xd1 	Old Multiuser DOS FAT12
155267843Sdelphij>0	ubyte	0xd4 	Old Multiuser DOS FAT16 Small
156267843Sdelphij>0	ubyte	0xd5 	Old Multiuser DOS Extended
157267843Sdelphij>0	ubyte	0xd6 	Old Multiuser DOS FAT16 Big
158267843Sdelphij>0	ubyte	0xd8 	CP/M 86
159267843Sdelphij>0	ubyte	0xdb 	CP/M or Concurrent CP/M
160267843Sdelphij>0	ubyte	0xdd 	Hidden CTOS Memdump
161267843Sdelphij>0	ubyte	0xde 	Dell PowerEdge Server utilities
162267843Sdelphij>0	ubyte	0xdf 	DG/UX virtual disk manager
163267843Sdelphij>0	ubyte	0xe0 	STMicroelectronics ST AVFS
164267843Sdelphij>0	ubyte	0xe1 	DOS access or SpeedStor 12-bit
165267843Sdelphij>0	ubyte	0xe3 	DOS R/O or Storage Dimensions
166267843Sdelphij>0	ubyte	0xe4 	SpeedStor 16-bit FAT < 1024 cyl.
167267843Sdelphij>0	ubyte	0xe5	reserved
168267843Sdelphij>0	ubyte	0xe6	reserved
169267843Sdelphij>0	ubyte	0xeb 	BeOS
170267843Sdelphij>0	ubyte	0xee	GPT Protective MBR
171267843Sdelphij>0	ubyte	0xef	EFI system partition
172267843Sdelphij>0	ubyte	0xf0 	Linux PA-RISC boot loader
173267843Sdelphij>0	ubyte	0xf1 	SpeedStor or Storage Dimensions
174267843Sdelphij>0	ubyte	0xf2 	DOS 3.3+ Secondary
175267843Sdelphij>0	ubyte	0xf3	reserved
176267843Sdelphij>0	ubyte	0xf4	SpeedStor large partition
177267843Sdelphij>0	ubyte	0xf5	Prologue multi-volumen partition
178267843Sdelphij>0	ubyte	0xf6 	reserved
179267843Sdelphij>0	ubyte	0xf9 	pCache: ext2/ext3 persistent cache
180267843Sdelphij>0	ubyte	0xfa 	Bochs x86 emulator
181267843Sdelphij>0	ubyte	0xfb 	VMware File System
182267843Sdelphij>0	ubyte	0xfc 	VMware Swap
183267843Sdelphij>0	ubyte	0xfd 	Linux RAID partition persistent sb
184267843Sdelphij>0	ubyte	0xfe	LANstep or IBM PS/2 IML
185267843Sdelphij>0	ubyte	0xff 	Xenix Bad Block Table
186267843Sdelphij
18768349Sobrien0	string	\366\366\366\366	PC formatted floppy with no filesystem
18868349Sobrien# Sun disk labels
18968349Sobrien# From /usr/include/sun/dklabel.h:
190328874Seadler0774	beshort		0xdabe
191169962Sobrien# modified by Joerg Jenderek, because original test
192169962Sobrien# succeeds for Cabinet archive dao360.dl_ with negative blocks
193169962Sobrien>0770	long		>0		Sun disk label
194169962Sobrien>>0	string		x		'%s
195169962Sobrien>>>31	string		>\0		\b%s
196169962Sobrien>>>>63	string		>\0		\b%s
197169962Sobrien>>>>>95	string		>\0		\b%s
198169962Sobrien>>0	string		x		\b'
199169962Sobrien>>0734	short		>0		%d rpm,
200169962Sobrien>>0736	short		>0		%d phys cys,
201169962Sobrien>>0740	short		>0		%d alts/cyl,
202169962Sobrien>>0746	short		>0		%d interleave,
203169962Sobrien>>0750	short		>0		%d data cyls,
204169962Sobrien>>0752	short		>0		%d alt cyls,
205169962Sobrien>>0754	short		>0		%d heads/partition,
206169962Sobrien>>0756	short		>0		%d sectors/track,
207267843Sdelphij>>0764	long		>0		start cyl %d,
208267843Sdelphij>>0770	long		x		%d blocks
20968349Sobrien# Is there a boot block written 1 sector in?
21068349Sobrien>512    belong&077777777	0600407	\b, boot block present
211267843Sdelphij
212267843Sdelphij# Joerg Jenderek: Smart Boot Manager backup file is 25 (MSDOS) or 41 (LINUX) byte header + first sectors of disk
213159764Sobrien# (http://btmgr.sourceforge.net/docs/user-guide-3.html)
214159764Sobrien0		string	SBMBAKUP_	Smart Boot Manager backup file
215159764Sobrien>9		string	x		\b, version %-5.5s
216328874Seadler>>14		string	=_
217159764Sobrien>>>15		string	x		%-.1s
218159764Sobrien>>>>16		string	=_		\b.
219159764Sobrien>>>>>17		string	x		\b%-.1s
220159764Sobrien>>>>>>18	string	=_		\b.
221159764Sobrien>>>>>>>19	string	x		\b%-.1s
222328874Seadler>>>22		ubyte	0
223159764Sobrien>>>>21		ubyte	x		\b, from drive 0x%x
224328874Seadler>>>22		ubyte	>0
225159764Sobrien>>>>21		string	x		\b, from drive %s
226328874Seadler>>>535		search/17	\x55\xAA
227328874Seadler>>>>&-512	indirect	x	\b; contains
228159764Sobrien
229267843Sdelphij# updated by Joerg Jenderek at Nov 2012
230159764Sobrien# DOS Emulator image is 128 byte, null right padded header + harddisc image
231328874Seadler0	string	DOSEMU\0
232328874Seadler>0x27E	leshort	0xAA55
233159764Sobrien#offset is 128
234328874Seadler>>19	ubyte	128
235159764Sobrien>>>(19.b-1)	ubyte	0x0	DOS Emulator image
236159764Sobrien>>>>7	ulelong	>0		\b, %u heads
237159764Sobrien>>>>11	ulelong	>0		\b, %d sectors/track
238159764Sobrien>>>>15	ulelong	>0		\b, %d cylinders
239328874Seadler>>>>128	indirect	x	\b; contains
240159764Sobrien
241267843Sdelphij# added by Joerg Jenderek at Nov 2012
242267843Sdelphij# http://www.thenakedpc.com/articles/v04/08/0408-05.html
243267843Sdelphij# Symantec (Peter Norton) Image.dat file consists of variable header, bootrecord, part of FAT and root directory data
244267843Sdelphij0	string	PNCIHISK\0		Norton Utilities disc image data
245267843Sdelphij# real x86 boot sector with jump instruction
246328874Seadler>509	search/1026	\x55\xAA\xeb
247328874Seadler>>&-1	indirect	x		\b; contains
248267843Sdelphij# http://file-extension.net/seeker/file_extension_dat
249267843Sdelphij0	string	PNCIUNDO		Norton Disk Doctor UnDo file
250267843Sdelphij#
251267843Sdelphij
252267843Sdelphij# DOS/MBR boot sector updated by Joerg Jenderek at Sep 2007,May 2011,2013
253267843Sdelphij# for any allowed sector sizes
254328874Seadler30		search/481	\x55\xAA
255267843Sdelphij# to display DOS/MBR boot sector (40) before old one (strength=50+21),Syslinux bootloader (71),SYSLINUX MBR (37+36),NetBSD mbr (110),AdvanceMAME mbr (111)
256267843Sdelphij# DOS BPB information (70) and after DOS floppy (120) like in previous file version
257273689Sdelphij!:strength +65
258267843Sdelphij# for sector sizes < 512 Bytes
259328874Seadler>11		uleshort	<512
260267843Sdelphij>>(11.s-2)	uleshort	0xAA55		DOS/MBR boot sector
261267843Sdelphij# for sector sizes with 512 or more Bytes
262267843Sdelphij>0x1FE		leshort		0xAA55		DOS/MBR boot sector
263276577Sdelphij
264276577Sdelphij# keep old DOS/MBR boot sector as dummy for mbr and bootloader displaying
265276577Sdelphij# only for sector sizes with 512 or more Bytes
266276577Sdelphij0x1FE          leshort         0xAA55         	DOS/MBR boot sector
267276577Sdelphij#
268276577Sdelphij# to display information (50) before DOS BPB (strength=70) and after DOS floppy (120) like in old file version
269276577Sdelphij!:strength +65
270273689Sdelphij>2		string		OSBS		OS/BS MBR
271354939Sdelphij# added by Joerg Jenderek at Feb 2013 according to https://thestarman.pcministry.com/asm/mbr/
272354939Sdelphij# and https://en.wikipedia.org/wiki/Master_Boot_Record
273328874Seadler# test for nearly all MS-DOS Master Boot Record initial program loader (IPL) is now done by
274267843Sdelphij# characteristic assembler instructions: xor ax,ax;mov ss,ax;mov sp,7c00
275267843Sdelphij>0	search/2	\x33\xc0\x8e\xd0\xbc\x00\x7c	MS-MBR
276354939Sdelphij# Microsoft Windows 95A and early ( https://thestarman.pcministry.com/asm/mbr/STDMBR.htm )
277267843Sdelphij# assembler instructions: mov si,sp;push ax;pop es;push ax;pop ds;sti;cld
278328874Seadler>>8	ubequad		0x8bf45007501ffbfc
279354939Sdelphij# https://thestarman.pcministry.com/asm/mbr/200MBR.htm
280267843Sdelphij>>>0x16	ubyte		0xF3				\b,DOS 2
281267843Sdelphij>>>>219	regex		Author\ -\ 			Author:
282267843Sdelphij# found "David Litton" , "A Pehrsson  "
283267843Sdelphij>>>>>&0	string		x				"%s"
284328874Seadler>>>0x16	ubyte		0xF2
285354939Sdelphij# NEC MS-DOS 3.30 Rev. 3 . See https://thestarman.pcministry.com/asm/mbr/DOS33MBR.htm
286267843Sdelphij# assembler instructions: mov di,077c;cmp word ptrl[di],a55a;jnz
287267843Sdelphij>>>>0x22	ubequad	0xbf7c07813d5aa575		\b,NEC 3.3
288267843Sdelphij# version MS-DOS 3.30 til MS-Windows 95A (WinVer=4.00.1111)
289267843Sdelphij>>>>0x22	default	x				\b,D0S version 3.3-7.0
290267843Sdelphij# error messages are printed by assembler instructions: mov si,06nn;...;int 10 (0xBEnn06;...)
291267843Sdelphij# where nn is string offset varying for different languages
292267843Sdelphij# "Invalid partition table"				nn=0x8b for english version
293267843Sdelphij>>>>>(0x49.b)	string		Invalid\ partition\ table		english
294267843Sdelphij>>>>>(0x49.b)	string		Ung\201ltige\ Partitionstabelle		german
295267843Sdelphij>>>>>(0x49.b)	string		Table\ de\ partition\ invalide		french
296267843Sdelphij>>>>>(0x49.b)	string		Tabela\ de\ parti\207ao\ inv\240lida	portuguese
297267843Sdelphij>>>>>(0x49.b)	string		Tabla\ de\ partici\242n\ no\ v\240lida	spanish
298267843Sdelphij>>>>>(0x49.b)	string		Tavola\ delle\ partizioni\ non\ valida	italian
299267843Sdelphij>>>>>0x49	ubyte		>0			at offset 0x%x
300267843Sdelphij>>>>>>(0x49.b)	string		>\0			"%s"
301267843Sdelphij# "Error loading operating system"			nn=0xa3 for english version
302267843Sdelphij# "Fehler beim Laden des Betriebssystems"		nn=0xa7 for german version
303267843Sdelphij# "Erreur en chargeant syst\212me d'exploitation"	nn=0xa7 for french version
304267843Sdelphij# "Erro na inicializa\207ao do sistema operacional"	nn=0xa7 for portuguese Brazilian version
305267843Sdelphij# "Error al cargar sistema operativo"			nn=0xa8 for spanish version
306267843Sdelphij# "Errore durante il caricamento del sistema operativo"	nn=0xae for italian version
307267843Sdelphij>>>>>0x74	ubyte		>0			at offset 0x%x
308267843Sdelphij>>>>>>(0x74.b)	string		>\0			"%s"
309267843Sdelphij# "Missing operating system"				nn=0xc2 for english version
310267843Sdelphij# "Betriebssystem fehlt"				nn=0xcd for german version
311267843Sdelphij# "Syst\212me d'exploitation absent"			nn=0xd2 for french version
312267843Sdelphij# "Sistema operacional nao encontrado"			nn=0xd4 for portuguese Brazilian version
313267843Sdelphij# "Falta sistema operativo"				nn=0xca for spanish version
314267843Sdelphij# "Sistema operativo mancante"				nn=0xe2 for italian version
315267843Sdelphij>>>>>0x79	ubyte		>0			at offset 0x%x
316267843Sdelphij>>>>>>(0x79.b)	string		>\0			"%s"
317354939Sdelphij# Microsoft Windows 95B to XP (https://thestarman.pcministry.com/asm/mbr/95BMEMBR.htm)
318267843Sdelphij# assembler instructions: push ax;pop es;push  ax;pop ds;cld;mov si,7c1b
319328874Seadler>>8	ubequad		0x5007501ffcbe1b7c
320267843Sdelphij# assembler instructions: rep;movsb;retf;mov si,07be;mov cl,04
321267843Sdelphij>>>24		ubequad	0xf3a4cbbebe07b104		9M
322267843Sdelphij# "Invalid partition table"				nn=0x10F for english version
323267843Sdelphij# "Ung\201ltige Partitionstabelle"				nn=0x10F for german version
324267843Sdelphij# "Table de partition erron\202e"				nn=0x10F for french version
325267843Sdelphij# "\216\257\245\340\240\346\250\256\255\255\240\357 \341\250\341\342\245\254\240 \255\245 \255\240\251\244\245\255\240"	nn=0x10F for russian version
326267843Sdelphij>>>>(0x3C.b+0x0FF)	string	Invalid\ partition\ table		english
327267843Sdelphij>>>>(0x3C.b+0x0FF)	string	Ung\201ltige\ Partitionstabelle		german
328267843Sdelphij>>>>(0x3C.b+0x0FF)	string	Table\ de\ partition\ erron\202e	french
329267843Sdelphij>>>>(0x3C.b+0x0FF)	string	\215\245\257\340\240\242\250\253\354\255\240\357\ \342\240\241\253\250\346\240	russian
330267843Sdelphij>>>>0x3C		ubyte	x			at offset 0x%x+0xFF
331267843Sdelphij>>>>(0x3C.b+0x0FF)	string	>\0			"%s"
332267843Sdelphij# "Error loading operating system"			nn=0x127 for english version
333267843Sdelphij# "Fehler beim Laden des Betriebssystems"		nn=0x12b for german version
334267843Sdelphij# "Erreur lors du chargement du syst\212me d'exploitation"	nn=0x12a for french version
335267843Sdelphij# "\216\350\250\241\252\240 \257\340\250 \247\240\243\340\343\247\252\245 \256\257\245\340\240\346\250\256\255\255\256\251 \341\250\341\342\245\254\353"	nn=0x12d for russian version
336267843Sdelphij>>>>0xBD		ubyte	x			at offset 0x1%x
337267843Sdelphij>>>>(0xBD.b+0x100)	string	>\0			"%s"
338267843Sdelphij# "Missing operating system"				nn=0x146 for english version
339267843Sdelphij# "Betriebssystem fehlt"				nn=0x151 for german version
340267843Sdelphij# "Syst\212me d'exploitation manquant"			nn=0x15e for french version
341267843Sdelphij# "\216\257\245\340\240\346\250\256\255\255\240\357 \341\250\341\342\245\254\240 \255\245 \255\240\251\244\245\255\240"	nn=0x156 for russian version
342267843Sdelphij>>>>0xA9		ubyte	x			at offset 0x1%x
343267843Sdelphij>>>>(0xA9.b+0x100)	string	>\0			"%s"
344354939Sdelphij# https://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm
345267843Sdelphij# assembler instructions: rep;movsb;retf;mov BP,07be;mov cl,04
346267843Sdelphij>>>24		ubequad	0xf3a4cbbdbe07b104		XP
347267843Sdelphij# where xxyyzz are lower bits from offsets of error messages varying for different languages
348267843Sdelphij>>>>0x1B4	ubelong&0x00FFFFFF	0x002c4463	english
349267843Sdelphij>>>>0x1B4	ubelong&0x00FFFFFF	0x002c486e	german
350267843Sdelphij# "Invalid partition table"				xx=0x12C for english version
351267843Sdelphij# "Ung\201ltige Partitionstabelle"				xx=0x12C for german version
352267843Sdelphij>>>>0x1b5	ubyte		>0			at offset 0x1%x
353267843Sdelphij>>>>(0x1b5.b+0x100)	string	>\0			"%s"
354267843Sdelphij# "Error loading operating system"			yy=0x144 for english version
355267843Sdelphij# "Fehler beim Laden des Betriebssystems"		yy=0x148 for german version
356267843Sdelphij>>>>0x1b6	ubyte		>0			at offset 0x1%x
357267843Sdelphij>>>>(0x1b6.b+0x100)	string	>\0			"%s"
358267843Sdelphij# "Missing operating system"				zz=0x163 for english version
359267843Sdelphij# "Betriebssystem nicht vorhanden"			zz=0x16e for german version
360267843Sdelphij>>>>0x1b7	ubyte		>0			at offset 0x1%x
361267843Sdelphij>>>>(0x1b7.b+0x100)	string	>\0			"%s"
362267843Sdelphij# Microsoft Windows Vista or 7
363267843Sdelphij# assembler instructions: ..;mov ds,ax;mov si,7c00;mov di,..00
364328874Seadler>>8	ubequad		0xc08ed8be007cbf00
365354939Sdelphij# Microsoft Windows Vista (https://thestarman.pcministry.com/asm/mbr/VistaMBR.htm)
366267843Sdelphij# assembler instructions: jnz 0729;cmp ebx,"TCPA"
367267843Sdelphij>>>0xEC		ubequad	0x753b6681fb544350		Vista
368267843Sdelphij# where xxyyzz are lower bits from offsets of error messages varying for different languages
369267843Sdelphij>>>>0x1B4	ubelong&0x00FFFFFF	0x00627a99	english
370267843Sdelphij#>>>>0x1B4	ubelong&0x00FFFFFF	?		german
371267843Sdelphij# "Invalid partition table"				xx=0x162 for english version
372267843Sdelphij# "Ung\201ltige Partitionstabelle"				xx=0x1?? for german version
373267843Sdelphij>>>>0x1b5	ubyte		>0			at offset 0x1%x
374267843Sdelphij>>>>(0x1b5.b+0x100)	string	>\0			"%s"
375267843Sdelphij# "Error loading operating system"			yy=0x17a for english version
376267843Sdelphij# "Fehler beim Laden des Betriebssystems"		yy= 0x1?? for german version
377267843Sdelphij>>>>0x1b6	ubyte		>0			at offset 0x1%x
378267843Sdelphij>>>>(0x1b6.b+0x100)	string	>\0			"%s"
379267843Sdelphij# "Missing operating system"				zz=0x199 for english version
380267843Sdelphij# "Betriebssystem nicht vorhanden"			zz=0x1?? for german version
381267843Sdelphij>>>>0x1b7	ubyte		>0			at offset 0x1%x
382267843Sdelphij>>>>(0x1b7.b+0x100)	string	>\0			"%s"
383354939Sdelphij# Microsoft Windows 7 (https://thestarman.pcministry.com/asm/mbr/W7MBR.htm)
384267843Sdelphij# assembler instructions: cmp ebx,"TCPA";cmp
385267843Sdelphij>>>0xEC		ubequad	0x6681fb5443504175		Windows 7
386267843Sdelphij# where xxyyzz are lower bits from offsets of error messages varying for different languages
387267843Sdelphij>>>>0x1B4	ubelong&0x00FFFFFF	0x00637b9a	english
388267843Sdelphij#>>>>0x1B4	ubelong&0x00FFFFFF	?		german
389267843Sdelphij# "Invalid partition table"				xx=0x163 for english version
390267843Sdelphij# "Ung\201ltige Partitionstabelle"				xx=0x1?? for german version
391267843Sdelphij>>>>0x1b5	ubyte		>0			at offset 0x1%x
392267843Sdelphij>>>>(0x1b5.b+0x100)	string	>\0			"%s"
393267843Sdelphij# "Error loading operating system"			yy=0x17b for english version
394267843Sdelphij# "Fehler beim Laden des Betriebssystems"		yy=0x1?? for german version
395267843Sdelphij>>>>0x1b6	ubyte		>0			at offset 0x1%x
396267843Sdelphij>>>>(0x1b6.b+0x100)	string	>\0			"%s"
397267843Sdelphij# "Missing operating system"				zz=0x19a for english version
398267843Sdelphij# "Betriebssystem nicht vorhanden"			zz=0x1?? for german version
399267843Sdelphij>>>>0x1b7	ubyte		>0			at offset 0x1%x
400267843Sdelphij>>>>(0x1b7.b+0x100)	string	>\0			"%s"
401354939Sdelphij# https://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm#DiskSigs
402354939Sdelphij# https://en.wikipedia.org/wiki/MBR_disk_signature#ID
403267843Sdelphij>>0x1b8	ulelong		>0				\b, disk signature 0x%-.4x
404354939Sdelphij# driveID/timestamp for Win 95B,98,98SE and ME. See https://thestarman.pcministry.com/asm/mbr/mystery.htm
405328874Seadler>>0xDA	uleshort		0
406267843Sdelphij>>>0xDC 	ulelong		>0			\b, created
407267843Sdelphij# physical drive number (0x80-0xFF) when the Windows wrote that byte to the drive
408267843Sdelphij>>>>0xDC	ubyte		x			with driveID 0x%x
409328874Seadler# hours, minutes and seconds
410267843Sdelphij>>>>0xDf	ubyte		x			at %x
411267843Sdelphij>>>>0xDe	ubyte		x			\b:%x
412267843Sdelphij>>>>0xDd	ubyte		x			\b:%x
413267843Sdelphij# special case for Microsoft MS-DOS 3.21 spanish
414328874Seadler# assembler instructions: cli;mov $0x30,%ax;mov %ax,%ss;mov
415328874Seadler>0	ubequad		0xfab830008ed0bc00
416328874Seadler# assembler instructions: $0x1f00,%sp;mov $0x80cb,%di;add %cl,(%bx,%si);in (%dx),%ax;mov
417267843Sdelphij>>8	ubequad		0x1fbfcb800008ed8		MS-MBR,D0S version 3.21 spanish
418267843Sdelphij# Microsoft MBR IPL end
419267843Sdelphij
420159764Sobrien# dr-dos with some upper-, lowercase variants
421328874Seadler>0x9D	string	Invalid\ partition\ table$
422328874Seadler>>181	string	No\ Operating\ System$
423159764Sobrien>>>201	string	Operating\ System\ load\ error$	\b, DR-DOS MBR, Version 7.01 to 7.03
424328874Seadler>0x9D	string	Invalid\ partition\ table$
425328874Seadler>>181	string	No\ operating\ system$
426159764Sobrien>>>201	string	Operating\ system\ load\ error$	\b, DR-DOS MBR, Version 7.01 to 7.03
427328874Seadler>342	string	Invalid\ partition\ table$
428328874Seadler>>366	string	No\ operating\ system$
429159764Sobrien>>>386	string	Operating\ system\ load\ error$	\b, DR-DOS MBR, version 7.01 to 7.03
430328874Seadler>295	string	NEWLDR\0
431328874Seadler>>302	string	Bad\ PT\ $
432328874Seadler>>>310	string	No\ OS\ $
433328874Seadler>>>>317	string	OS\ load\ err$
434328874Seadler>>>>>329	string	Moved\ or\ missing\ IBMBIO.LDR\n\r
435328874Seadler>>>>>>358	string	Press\ any\ key\ to\ continue.\n\r$
436328874Seadler>>>>>>>387	string	Copyright\ (c)\ 1984,1998
437159764Sobrien>>>>>>>>411	string	Caldera\ Inc.\0		\b, DR-DOS MBR (IBMBIO.LDR)
438159764Sobrien#
439267843Sdelphij# tests for different MS-DOS Master Boot Records (MBR) moved and merged
440267843Sdelphij#
441191736Sobrien#>0x145	string	Default:\ F				\b, FREE-DOS MBR
442191736Sobrien#>0x14B	string	Default:\ F				\b, FREE-DOS 1.0 MBR
443191736Sobrien>0x145	search/7	Default:\ F			\b, FREE-DOS MBR
444328874Seadler#>>313		string	F0\ .\ .\ .
445328874Seadler#>>>322		string	disk\ 1
446328874Seadler#>>>>382	string	FAT3
447328874Seadler>64	string	no\ active\ partition\ found
448159764Sobrien>>96	string	read\ error\ while\ reading\ drive	\b, FREE-DOS Beta 0.9 MBR
449191736Sobrien# Ranish Partition Manager http://www.ranish.com/part/
450328874Seadler>387	search/4	\0\ Error!\r
451328874Seadler>>378	search/7	Virus!
452328874Seadler>>>397	search/4	Booting\040
453191736Sobrien>>>>408	search/4	HD1/\0	 			\b, Ranish MBR (
454191736Sobrien>>>>>416	string	Writing\ changes...		\b2.37
455191736Sobrien>>>>>>438	ubyte		x			\b,0x%x dots
456191736Sobrien>>>>>>440	ubyte		>0			\b,virus check
457191736Sobrien>>>>>>441	ubyte		>0			\b,partition %c
458191736Sobrien#2.38,2.42,2.44
459191736Sobrien>>>>>416	string	!Writing\ changes...		\b
460191736Sobrien>>>>>>418	ubyte	1				\bvirus check,
461191736Sobrien>>>>>>419	ubyte	x				\b0x%x seconds
462191736Sobrien>>>>>>420	ubyte&0x0F	>0			\b,partition
463191736Sobrien>>>>>>>420	ubyte&0x0F	<5			\b %x
464191736Sobrien>>>>>>>420	ubyte&0x0F	0Xf			\b ask
465191736Sobrien>>>>>420	ubyte		x			\b)
466191736Sobrien#
467267843Sdelphij# SYSLINUX MBR moved
468354939Sdelphij# https://www.acronis.de/
469328874Seadler>362	string	MBR\ Error\ \0\r
470328874Seadler>>376	string	ress\ any\ key\ to\040
471169962Sobrien>>>392	string	boot\ from\ floppy...\0			\b, Acronis MBR
472169962Sobrien# added by Joerg Jenderek
473354939Sdelphij# https://www.visopsys.org/
474354939Sdelphij# https://partitionlogic.org.uk/
475328874Seadler>309	string	No\ bootable\ partition\ found\r
476169962Sobrien>>339	string	I/O\ Error\ reading\ boot\ sector\r	\b, Visopsys MBR
477328874Seadler>349	string	No\ bootable\ partition\ found\r
478169962Sobrien>>379	string	I/O\ Error\ reading\ boot\ sector\r	\b, simple Visopsys MBR
479159764Sobrien# bootloader, bootmanager
480328874Seadler>0x40	string	SBML
481169962Sobrien# label with 11 characters of FAT 12 bit filesystem
482328874Seadler>>43	string	SMART\ BTMGR
483191736Sobrien>>>430	string	SBMK\ Bad!\r			\b, Smart Boot Manager
484191736Sobrien# OEM-ID not always "SBM"
485328874Seadler#>>>>3	strings	SBM
486191736Sobrien>>>>6	string	>\0                             \b, version %s
487159764Sobrien>382	string	XOSLLOADXCF			\b, eXtended Operating System Loader
488159764Sobrien>6	string	LILO				\b, LInux i386 boot LOader
489159764Sobrien>>120	string	LILO				\b, version 22.3.4 SuSe
490159764Sobrien>>172	string	LILO				\b, version 22.5.8 Debian
491191736Sobrien# updated by Joerg Jenderek at Oct 2008
492169962Sobrien# variables according to grub-0.97/stage1/stage1.S or
493354939Sdelphij# https://www.gnu.org/software/grub/manual/grub.html#Embedded-data
494169962Sobrien# usual values are marked with comments to get only informations of strange GRUB loaders
495328874Seadler>342		search/60	\0Geom\0
496191736Sobrien#>0		ulelong		x		%x=0x009048EB ,	0x2a9048EB  0
497328874Seadler>>0x41		ubyte		<2
498169962Sobrien>>>0x3E		ubyte		>2		\b; GRand Unified Bootloader
499328874Seadler# 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90
500169962Sobrien>>>>0x3E	ubyte		x		\b, stage1 version 0x%x
501169962Sobrien#If it is 0xFF, use a drive passed by BIOS
502169962Sobrien>>>>0x40	ubyte		<0xFF		\b, boot drive 0x%x
503169962Sobrien# in most case 0,1,0x2e for GRUB 0.5.95
504169962Sobrien>>>>0x41	ubyte		>0		\b, LBA flag 0x%x
505169962Sobrien>>>>0x42	uleshort	<0x8000		\b, stage2 address 0x%x
506169962Sobrien#>>>>0x42	uleshort	=0x8000		\b, stage2 address 0x%x (usual)
507169962Sobrien>>>>0x42	uleshort	>0x8000		\b, stage2 address 0x%x
508169962Sobrien#>>>>0x44	ulelong		=1		\b, 1st sector stage2 0x%x (default)
509169962Sobrien>>>>0x44	ulelong		>1		\b, 1st sector stage2 0x%x
510169962Sobrien>>>>0x48	uleshort	<0x800		\b, stage2 segment 0x%x
511169962Sobrien#>>>>0x48	uleshort	=0x800		\b, stage2 segment 0x%x (usual)
512169962Sobrien>>>>0x48	uleshort	>0x800		\b, stage2 segment 0x%x
513169962Sobrien>>>>402		string	Geom\0Hard\ Disk\0Read\0\ Error\0
514169962Sobrien>>>>>394	string	stage1			\b, GRUB version 0.5.95
515169962Sobrien>>>>382		string	Geom\0Hard\ Disk\0Read\0\ Error\0
516169962Sobrien>>>>>376	string	GRUB\ \0		\b, GRUB version 0.93 or 1.94
517169962Sobrien>>>>383		string	Geom\0Hard\ Disk\0Read\0\ Error\0
518169962Sobrien>>>>>377	string	GRUB\ \0		\b, GRUB version 0.94
519169962Sobrien>>>>385		string	Geom\0Hard\ Disk\0Read\0\ Error\0
520169962Sobrien>>>>>379	string	GRUB\ \0		\b, GRUB version 0.95 or 0.96
521169962Sobrien>>>>391		string	Geom\0Hard\ Disk\0Read\0\ Error\0
522169962Sobrien>>>>>385	string	GRUB\ \0		\b, GRUB version 0.97
523267843Sdelphij# unknown version
524328874Seadler>>>343		string	Geom\0Read\0\ Error\0
525169962Sobrien>>>>321		string	Loading\ stage1.5	\b, GRUB version x.y
526169962Sobrien>>>380		string	Geom\0Hard\ Disk\0Read\0\ Error\0
527169962Sobrien>>>>374		string	GRUB\ \0		\b, GRUB version n.m
528267843Sdelphij# SYSLINUX bootloader moved
529159764Sobrien>395	string	chksum\0\ ERROR!\0		\b, Gujin bootloader
530169962Sobrien# http://www.bcdwb.de/bcdw/index_e.htm
531328874Seadler>3	string	BCDL
532169962Sobrien>>498	string	BCDL\ \ \ \ BIN			\b, Bootable CD Loader (1.50Z)
533267843Sdelphij# mbr partition table entries updated by Joerg Jenderek at Sep 2013
534267843Sdelphij# skip Norton Utilities disc image data
535328874Seadler>3		string		!IHISK
536267843Sdelphij# skip Linux style boot sector starting with assember instructions mov 0x7c0,ax;
537328874Seadler>>0		belong		!0xb8c0078e
538328874Seadler# not Linux kernel
539328874Seadler>>>514		string		!HdrS
540267843Sdelphij# not BeOS
541328874Seadler>>>>422		string		!Be\ Boot\ Loader
542328874Seadler# jump over BPB instruction implies DOS bootsector or AdvanceMAME mbr
543328874Seadler>>>>>0		ubelong&0xFD000000	=0xE9000000
544267843Sdelphij# AdvanceMAME mbr
545328874Seadler>>>>>>(1.b+2)	ubequad		0xfa31c08ed88ec08e
546267843Sdelphij>>>>>>>446	use		partition-table
547267843Sdelphij# mbr, Norton Utilities disc image data, or 2nd,etc. sector of x86 bootloader
548328874Seadler>>>>>0		ubelong&0xFD000000	!0xE9000000
549267843Sdelphij# skip FSInfosector
550328874Seadler>>>>>>0		string		!RRaA
551267843Sdelphij# skip 3rd sector of MS x86 bootloader with assember instructions cli;MOVZX EAX,BYTE PTR [BP+10];MOV ECX,
552354939Sdelphij# https://thestarman.pcministry.com/asm/mbr/MSWIN41.htm
553328874Seadler>>>>>>>0	ubequad		!0xfa660fb64610668b
554267843Sdelphij# skip 13rd sector of MS x86 bootloader
555328874Seadler>>>>>>>>0	ubequad		!0x660fb64610668b4e
556267843Sdelphij# skip sector starting with DOS new line
557328874Seadler>>>>>>>>>0	string		!\r\n
558267843Sdelphij# allowed active flag 0,80h-FFh
559328874Seadler>>>>>>>>>>446	ubyte		0
560267843Sdelphij>>>>>>>>>>>446	use		partition-table
561328874Seadler>>>>>>>>>>446	ubyte		>0x7F
562267843Sdelphij>>>>>>>>>>>446	use		partition-table
563267843Sdelphij# TODO: test for extended bootrecord (ebr) moved and merged with mbr partition table entries
564226048Sobrien# mbr partition table entries end
565354939Sdelphij# https://www.acronis.de/
566169962Sobrien#FAT label=ACRONIS\ SZ
567169962Sobrien#OEM-ID=BOOTWIZ0
568328874Seadler>442	string	Non-system\ disk,\040
569169962Sobrien>>459	string	press\ any\ key...\x7\0		\b, Acronis Startup Recovery Loader
570267843Sdelphij# updated by Joerg Jenderek at Nov 2012, Sep 2013
571267843Sdelphij# DOS names like F11.SYS or BOOTWIZ.SYS are 8 right space padded bytes+3 bytes
572267843Sdelphij# display 1 space
573328874Seadler>>>447	ubyte	x		\b
574267843Sdelphij>>>477	use	DOS-filename
575169962Sobrien#
576328874Seadler>185	string	FDBOOT\ Version\040
577328874Seadler>>204	string	\rNo\ Systemdisk.\040
578328874Seadler>>>220	string	Booting\ from\ harddisk.\n\r
579328874Seadler>>>245	string	Cannot\ load\ from\ harddisk.\n\r
580328874Seadler>>>>273 string	Insert\ Systemdisk\040
581159764Sobrien>>>>>291 string and\ press\ any\ key.\n\r		\b, FDBOOT harddisk Bootloader
582159764Sobrien>>>>>>200 string	>\0                             \b, version %-3s
583328874Seadler>242	string	Bootsector\ from\ C.H.\ Hochst\204
584267843Sdelphij# http://freecode.com/projects/dosfstools	dosfstools-n.m/src/mkdosfs.c
585267843Sdelphij# updated by Joerg Jenderek at Nov 2012. Use search directive with offset instead of string
586267843Sdelphij# skip name "C.H. Hochstaetter" partly because it is sometimes written without umlaut
587328874Seadler>242	search/127	Bootsector\ from\ C.H.\ Hochst
588328874Seadler>>278	search/127	No\ Systemdisk.\ Booting\ from\ harddisk
589267843Sdelphij# followed by variants with point,CR-NL or NL-CR
590328874Seadler>>>208	search/261	Cannot\ load\ from\ harddisk.
591267843Sdelphij# followed by variants CR-NL or NL-CR
592328874Seadler>>>>236	search/235	Insert\ Systemdisk\ and\ press\ any\ key.
593267843Sdelphij# followed by variants with point,CR-NL or NL-CR
594267843Sdelphij>>>>>180	search/96	Disk\ formatted\ with\ WinImage\ 	\b, WinImage harddisk Bootloader
595267843Sdelphij# followed by string like "6.50 (c) 1993-2004 Gilles Vollant"
596267843Sdelphij>>>>>>&0	string		x 					\b, version %-4.4s
597328874Seadler>(1.b+2)	ubyte		0xe
598328874Seadler>>(1.b+3)	ubyte		0x1f
599328874Seadler>>>(1.b+4)	ubyte		0xbe
600267843Sdelphij# message offset found at (1.b+5) is 0x77 for FAT32 or 0x5b for others
601328874Seadler>>>>(1.b+5)	ubyte&0xd3	0x53
602328874Seadler>>>>>(1.b+6)	ubyte		0x7c
603267843Sdelphij# assembler instructions: lodsb;and al,al;jz 0xb;push si;mov ah,
604328874Seadler>>>>>>(1.b+7)	ubyte		0xac
605328874Seadler>>>>>>>(1.b+8)	ubyte		0x22
606328874Seadler>>>>>>>>(1.b+9)	ubyte		0xc0
607328874Seadler>>>>>>>>>(1.b+10)	ubyte	0x74
608328874Seadler>>>>>>>>>>(1.b+11)	ubyte	0x0b
609328874Seadler>>>>>>>>>>>(1.b+12)	ubyte	0x56
610267843Sdelphij>>>>>>>>>>>>(1.b+13)	ubyte	0xb4			\b, mkdosfs boot message display
611267843Sdelphij# FAT1X version
612328874Seadler>>>>>>>>>>>>>(1.b+5)	ubyte	0x5b
613267843Sdelphij>>>>>>>>>>>>>>0x5b	string	>\0			"%-s"
614267843Sdelphij# FAT32 version
615328874Seadler>>>>>>>>>>>>>(1.b+5)	ubyte	0x77
616267843Sdelphij>>>>>>>>>>>>>>0x77	string	>\0			"%-s"
617191736Sobrien>214	string	Please\ try\ to\ install\ FreeDOS\ 	\b, DOS Emulator boot message display
618328874Seadler#>>244	string	from\ dosemu-freedos-*-bin.tgz\r
619328874Seadler#>>>170	string	Sorry,\ could\ not\ load\ an\040
620328874Seadler#>>>>195	string	operating\ system.\r\n
621191736Sobrien#
622328874Seadler>103	string	This\ is\ not\ a\ bootable\ disk.\040
623328874Seadler>>132	string	Please\ insert\ a\ bootable\040
624328874Seadler>>>157	string	floppy\ and\r\n
625159764Sobrien>>>>169	string	press\ any\ key\ to\ try\ again...\r	\b, FREE-DOS message display
626159764Sobrien#
627328874Seadler>66	string	Solaris\ Boot\ Sector
628328874Seadler>>99	string	Incomplete\ MDBoot\ load.
629159764Sobrien>>>89	string	Version 				\b, Sun Solaris Bootloader
630159764Sobrien>>>>97	byte	x					version %c
631159764Sobrien#
632328874Seadler>408	string	OS/2\ !!\ SYS01475\r\0
633328874Seadler>>429	string	OS/2\ !!\ SYS02025\r\0
634328874Seadler>>>450	string	OS/2\ !!\ SYS02027\r\0
635159764Sobrien>>>469	string	OS2BOOT\ \ \ \ 				\b, IBM OS/2 Warp bootloader
636159764Sobrien#
637328874Seadler>409	string	OS/2\ !!\ SYS01475\r\0
638328874Seadler>>430	string	OS/2\ !!\ SYS02025\r\0
639328874Seadler>>>451	string	OS/2\ !!\ SYS02027\r\0
640159764Sobrien>>>470	string	OS2BOOT\ \ \ \ 				\b, IBM OS/2 Warp Bootloader
641328874Seadler>112		string	This\ disk\ is\ not\ bootable\r
642328874Seadler>>142		string	If\ you\ wish\ to\ make\ it\ bootable
643328874Seadler>>>176		string	run\ the\ DOS\ program\ SYS\040
644328874Seadler>>>200		string	after\ the\r
645328874Seadler>>>>216		string	system\ has\ been\ loaded\r\n
646328874Seadler>>>>>242	string	Please\ insert\ a\ DOS\ diskette\040
647328874Seadler>>>>>271	string	into\r\n\ the\ drive\ and\040
648159764Sobrien>>>>>>292	string	strike\ any\ key...\0		\b, IBM OS/2 Warp message display
649159764Sobrien# XP
650328874Seadler>430	string	NTLDR\ is\ missing\xFF\r\n
651328874Seadler>>449	string	Disk\ error\xFF\r\n
652159764Sobrien>>>462	string	Press\ any\ key\ to\ restart\r		\b, Microsoft Windows XP Bootloader
653159764Sobrien# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
654328874Seadler>>>>417		ubyte&0xDF	>0
655159764Sobrien>>>>>417	string		x			%-.5s
656328874Seadler>>>>>>422	ubyte&0xDF	>0
657159764Sobrien>>>>>>>422	string		x 			\b%-.3s
658328874Seadler>>>>>425	ubyte&0xDF	>0
659159764Sobrien>>>>>>425	string		>\ 			\b.%-.3s
660159764Sobrien#
661328874Seadler>>>>371		ubyte		>0x20
662328874Seadler>>>>>368	ubyte&0xDF	>0
663159764Sobrien>>>>>>368	string		x 			%-.5s
664328874Seadler>>>>>>>373	ubyte&0xDF	>0
665159764Sobrien>>>>>>>>373	string		x 			\b%-.3s
666328874Seadler>>>>>>376	ubyte&0xDF	>0
667159764Sobrien>>>>>>>376	string		x 			\b.%-.3s
668159764Sobrien#
669328874Seadler>430	string	NTLDR\ nicht\ gefunden\xFF\r\n
670328874Seadler>>453	string	Datentr\204gerfehler\xFF\r\n
671159764Sobrien>>>473	string	Neustart\ mit\ beliebiger\ Taste\r	\b, Microsoft Windows XP Bootloader (german)
672328874Seadler>>>>417		ubyte&0xDF	>0
673159764Sobrien>>>>>417	string		x			%-.5s
674328874Seadler>>>>>>422	ubyte&0xDF	>0
675159764Sobrien>>>>>>>422	string		x 			\b%-.3s
676328874Seadler>>>>>425	ubyte&0xDF	>0
677159764Sobrien>>>>>>425	string		>\ 			\b.%-.3s
678169962Sobrien# offset variant
679328874Seadler>>>>379	string	\0
680328874Seadler>>>>>368	ubyte&0xDF	>0
681169962Sobrien>>>>>>368	string		x 			%-.5s
682328874Seadler>>>>>>>373	ubyte&0xDF	>0
683169962Sobrien>>>>>>>>373	string		x 			\b%-.3s
684159764Sobrien#
685328874Seadler>430	string	NTLDR\ fehlt\xFF\r\n
686328874Seadler>>444	string	Datentr\204gerfehler\xFF\r\n
687159764Sobrien>>>464	string	Neustart\ mit\ beliebiger\ Taste\r	\b, Microsoft Windows XP Bootloader (2.german)
688328874Seadler>>>>417		ubyte&0xDF	>0
689159764Sobrien>>>>>417	string		x			%-.5s
690328874Seadler>>>>>>422	ubyte&0xDF	>0
691159764Sobrien>>>>>>>422	string		x 			\b%-.3s
692328874Seadler>>>>>425	ubyte&0xDF	>0
693159764Sobrien>>>>>>425	string		>\ 			\b.%-.3s
694159764Sobrien# variant
695328874Seadler>>>>371		ubyte		>0x20
696328874Seadler>>>>>368	ubyte&0xDF	>0
697159764Sobrien>>>>>>368	string		x 			%-.5s
698328874Seadler>>>>>>>373	ubyte&0xDF	>0
699159764Sobrien>>>>>>>>373	string		x 			\b%-.3s
700328874Seadler>>>>>>376	ubyte&0xDF	>0
701159764Sobrien>>>>>>>376	string		x 			\b.%-.3s
702159764Sobrien#
703328874Seadler>430	string	NTLDR\ fehlt\xFF\r\n
704328874Seadler>>444	string	Medienfehler\xFF\r\n
705159764Sobrien>>>459	string	Neustart:\ Taste\ dr\201cken\r		\b, Microsoft Windows XP Bootloader (3.german)
706328874Seadler>>>>371		ubyte		>0x20
707328874Seadler>>>>>368	ubyte&0xDF	>0
708159764Sobrien>>>>>>368	string		x 			%-.5s
709328874Seadler>>>>>>>373	ubyte&0xDF	>0
710159764Sobrien>>>>>>>>373	string		x 			\b%-.3s
711328874Seadler>>>>>>376	ubyte&0xDF	>0
712159764Sobrien>>>>>>>376	string		x 			\b.%-.3s
713159764Sobrien# variant
714328874Seadler>>>>417		ubyte&0xDF	>0
715159764Sobrien>>>>>417	string		x			%-.5s
716328874Seadler>>>>>>422	ubyte&0xDF	>0
717159764Sobrien>>>>>>>422	string		x 			\b%-.3s
718328874Seadler>>>>>425	ubyte&0xDF	>0
719159764Sobrien>>>>>>425	string		>\ 			\b.%-.3s
720159764Sobrien#
721328874Seadler>430	string	Datentr\204ger\ entfernen\xFF\r\n
722328874Seadler>>454	string	Medienfehler\xFF\r\n
723159764Sobrien>>>469	string	Neustart:\ Taste\ dr\201cken\r		\b, Microsoft Windows XP Bootloader (4.german)
724328874Seadler>>>>379		string		\0
725328874Seadler>>>>>368	ubyte&0xDF	>0
726191736Sobrien>>>>>>368	string		x 			%-.5s
727328874Seadler>>>>>>>373	ubyte&0xDF	>0
728191736Sobrien>>>>>>>>373	string		x 			\b%-.3s
729328874Seadler>>>>>>376	ubyte&0xDF	>0
730191736Sobrien>>>>>>>376	string		x 			\b.%-.3s
731191736Sobrien# variant
732328874Seadler>>>>417		ubyte&0xDF	>0
733191736Sobrien>>>>>417	string		x			%-.5s
734328874Seadler>>>>>>422	ubyte&0xDF	>0
735191736Sobrien>>>>>>>422	string		x 			\b%-.3s
736328874Seadler>>>>>425	ubyte&0xDF	>0
737191736Sobrien>>>>>>425	string		>\ 			\b.%-.3s
738191736Sobrien#
739191736Sobrien
740328874Seadler#>3	string	NTFS\ \ \ \040
741328874Seadler>389	string	Fehler\ beim\ Lesen\040
742159764Sobrien>>407	string	des\ Datentr\204gers
743328874Seadler>>>426	string	NTLDR\ fehlt
744159764Sobrien>>>>440	string	NTLDR\ ist\ komprimiert
745159764Sobrien>>>>>464 string	Neustart\ mit\ Strg+Alt+Entf\r		\b, Microsoft Windows XP Bootloader NTFS (german)
746328874Seadler#>3	string	NTFS\ \ \ \040
747159764Sobrien>313	string	A\ disk\ read\ error\ occurred.\r
748328874Seadler>>345	string	A\ kernel\ file\ is\ missing\040
749328874Seadler>>>370	string	from\ the\ disk.\r
750328874Seadler>>>>484	string	NTLDR\ is\ compressed
751328874Seadler>>>>>429 string	Insert\ a\ system\ diskette\040
752159764Sobrien>>>>>>454 string and\ restart\r\nthe\ system.\r		\b, Microsoft Windows XP Bootloader NTFS
753159764Sobrien# DOS loader variants different languages,offsets
754159764Sobrien>472	ubyte&0xDF	>0
755328874Seadler>>389	string	Invalid\ system\ disk\xFF\r\n
756328874Seadler>>>411	string	Disk\ I/O\ error
757328874Seadler>>>>428	string	Replace\ the\ disk,\ and\040
758159764Sobrien>>>>>455 string	press\ any\ key				\b, Microsoft Windows 98 Bootloader
759159764Sobrien#IO.SYS
760328874Seadler>>>>>>472	ubyte&0xDF	>0
761159764Sobrien>>>>>>>472	string		x 			\b %-.2s
762328874Seadler>>>>>>>>474	ubyte&0xDF	>0
763159764Sobrien>>>>>>>>>474	string		x 			\b%-.5s
764328874Seadler>>>>>>>>>>479	ubyte&0xDF	>0
765159764Sobrien>>>>>>>>>>>479 string		x 			\b%-.1s
766328874Seadler>>>>>>>480	ubyte&0xDF	>0
767159764Sobrien>>>>>>>>480	string		x 			\b.%-.3s
768159764Sobrien#MSDOS.SYS
769159764Sobrien>>>>>>>483	ubyte&0xDF	>0			\b+
770159764Sobrien>>>>>>>>483	string		x 			\b%-.5s
771328874Seadler>>>>>>>>>488	ubyte&0xDF	>0
772159764Sobrien>>>>>>>>>>488	string		x 			\b%-.3s
773328874Seadler>>>>>>>>491	ubyte&0xDF	>0
774159764Sobrien>>>>>>>>>491	string		x 			\b.%-.3s
775159764Sobrien#
776328874Seadler>>390	string	Invalid\ system\ disk\xFF\r\n
777328874Seadler>>>412	string	Disk\ I/O\ error\xFF\r\n
778328874Seadler>>>>429	string	Replace\ the\ disk,\ and\040
779159764Sobrien>>>>>451 string	then\ press\ any\ key\r			\b, Microsoft Windows 98 Bootloader
780328874Seadler>>388	string	Ungueltiges\ System\ \xFF\r\n
781328874Seadler>>>410	string	E/A-Fehler\ \ \ \ \xFF\r\n
782328874Seadler>>>>427	string	Datentraeger\ wechseln\ und\040
783159764Sobrien>>>>>453 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (german)
784159764Sobrien#WINBOOT.SYS only not spaces (0xDF)
785328874Seadler>>>>>>497	ubyte&0xDF	>0
786159764Sobrien>>>>>>>497	string		x 			%-.5s
787328874Seadler>>>>>>>>502	ubyte&0xDF	>0
788159764Sobrien>>>>>>>>>502	string		x 			\b%-.1s
789328874Seadler>>>>>>>>>>503	ubyte&0xDF	>0
790159764Sobrien>>>>>>>>>>>503	string		x 			\b%-.1s
791328874Seadler>>>>>>>>>>>>504	ubyte&0xDF	>0
792159764Sobrien>>>>>>>>>>>>>504 string		x 			\b%-.1s
793328874Seadler>>>>>>505	ubyte&0xDF	>0
794159764Sobrien>>>>>>>505	string		x 			\b.%-.3s
795159764Sobrien#IO.SYS
796159764Sobrien>>>>>>472	ubyte&0xDF	>0			or
797159764Sobrien>>>>>>>472	string		x 			\b %-.2s
798328874Seadler>>>>>>>>474	ubyte&0xDF	>0
799159764Sobrien>>>>>>>>>474	string		x 			\b%-.5s
800328874Seadler>>>>>>>>>>479	ubyte&0xDF	>0
801159764Sobrien>>>>>>>>>>>479 string		x 			\b%-.1s
802328874Seadler>>>>>>>480	ubyte&0xDF	>0
803159764Sobrien>>>>>>>>480	string		x 			\b.%-.3s
804159764Sobrien#MSDOS.SYS
805159764Sobrien>>>>>>>483	ubyte&0xDF	>0			\b+
806159764Sobrien>>>>>>>>483	string		x 			\b%-.5s
807328874Seadler>>>>>>>>>488	ubyte&0xDF	>0
808159764Sobrien>>>>>>>>>>488	string		x 			\b%-.3s
809328874Seadler>>>>>>>>491	ubyte&0xDF	>0
810159764Sobrien>>>>>>>>>491	string		x 			\b.%-.3s
811159764Sobrien#
812328874Seadler>>390	string	Ungueltiges\ System\ \xFF\r\n
813328874Seadler>>>412	string	E/A-Fehler\ \ \ \ \xFF\r\n
814328874Seadler>>>>429	string	Datentraeger\ wechseln\ und\040
815159764Sobrien>>>>>455 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (German)
816159764Sobrien#WINBOOT.SYS only not spaces (0xDF)
817328874Seadler>>>>>>497	ubyte&0xDF	>0
818159764Sobrien>>>>>>>497	string		x 			%-.7s
819328874Seadler>>>>>>>>504	ubyte&0xDF	>0
820159764Sobrien>>>>>>>>>504	string		x 			\b%-.1s
821328874Seadler>>>>>>505	ubyte&0xDF	>0
822159764Sobrien>>>>>>>505	string		x 			\b.%-.3s
823159764Sobrien#IO.SYS
824159764Sobrien>>>>>>472	ubyte&0xDF	>0			or
825159764Sobrien>>>>>>>472	string		x 			\b %-.2s
826328874Seadler>>>>>>>>474	ubyte&0xDF	>0
827159764Sobrien>>>>>>>>>474	string		x 			\b%-.6s
828328874Seadler>>>>>>>480	ubyte&0xDF	>0
829159764Sobrien>>>>>>>>480	string		x 			\b.%-.3s
830159764Sobrien#MSDOS.SYS
831159764Sobrien>>>>>>>483	ubyte&0xDF	>0			\b+
832159764Sobrien>>>>>>>>483	string		x 			\b%-.5s
833328874Seadler>>>>>>>>>488	ubyte&0xDF	>0
834159764Sobrien>>>>>>>>>>488	string		x 			\b%-.3s
835328874Seadler>>>>>>>>491	ubyte&0xDF	>0
836159764Sobrien>>>>>>>>>491	string		x 			\b.%-.3s
837159764Sobrien#
838328874Seadler>>389	string	Ungueltiges\ System\ \xFF\r\n
839328874Seadler>>>411	string	E/A-Fehler\ \ \ \ \xFF\r\n
840328874Seadler>>>>428	string	Datentraeger\ wechseln\ und\040
841159764Sobrien>>>>>454 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
842159764Sobrien# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
843159764Sobrien>>>>>>472	string		x 			%-.2s
844328874Seadler>>>>>>>474	ubyte&0xDF	>0
845159764Sobrien>>>>>>>>474	string		x 			\b%-.5s
846328874Seadler>>>>>>>>479	ubyte&0xDF	>0
847159764Sobrien>>>>>>>>>479	string		x 			\b%-.1s
848328874Seadler>>>>>>480	ubyte&0xDF	>0
849159764Sobrien>>>>>>>480	string		x 			\b.%-.3s
850159764Sobrien>>>>>>483	ubyte&0xDF	>0			\b+
851159764Sobrien>>>>>>>483	string		x 			\b%-.5s
852328874Seadler>>>>>>>488	ubyte&0xDF	>0
853159764Sobrien>>>>>>>>488	string		x 			\b%-.2s
854328874Seadler>>>>>>>>490	ubyte&0xDF	>0
855159764Sobrien>>>>>>>>>490	string		x 			\b%-.1s
856328874Seadler>>>>>>>491	ubyte&0xDF	>0
857159764Sobrien>>>>>>>>491	string		x 			\b.%-.3s
858159764Sobrien>479	ubyte&0xDF	>0
859328874Seadler>>416	string	Kein\ System\ oder\040
860328874Seadler>>>433	string	Laufwerksfehler
861159764Sobrien>>>>450	string	Wechseln\ und\ Taste\ dr\201cken	\b, Microsoft DOS Bootloader (german)
862159764Sobrien#IO.SYS
863159764Sobrien>>>>>479	string		x 			\b %-.2s
864328874Seadler>>>>>>481	ubyte&0xDF	>0
865159764Sobrien>>>>>>>481	string		x 			\b%-.6s
866328874Seadler>>>>>487	ubyte&0xDF	>0
867159764Sobrien>>>>>>487	string		x 			\b.%-.3s
868159764Sobrien#MSDOS.SYS
869159764Sobrien>>>>>>490	ubyte&0xDF	>0			\b+
870159764Sobrien>>>>>>>490	string		x 			\b%-.5s
871328874Seadler>>>>>>>>495	ubyte&0xDF	>0
872159764Sobrien>>>>>>>>>495	string		x 			\b%-.3s
873328874Seadler>>>>>>>498	ubyte&0xDF	>0
874159764Sobrien>>>>>>>>498	string		x 			\b.%-.3s
875159764Sobrien#
876328874Seadler>376	search/41	Non-System\ disk\ or\040
877328874Seadler>>395	search/41	disk\ error\r
878328874Seadler>>>407	search/41	Replace\ and\040
879175296Sobrien>>>>419	search/41	press\ 				\b,
880175296Sobrien>>>>419	search/41	strike\ 			\b, old
881175296Sobrien>>>>426	search/41	any\ key\ when\ ready\r		MS or PC-DOS bootloader
882175296Sobrien#449			Disk\ Boot\ failure\r		MS 3.21
883175296Sobrien#466			Boot\ Failure\r			MS 3.30
884328874Seadler>>>>>468 search/18	\0
885175296Sobrien#IO.SYS,IBMBIO.COM
886175296Sobrien>>>>>>&0	string		x 			\b %-.2s
887328874Seadler>>>>>>>&-20	ubyte&0xDF	>0
888175296Sobrien>>>>>>>>&-1	string		x 			\b%-.4s
889328874Seadler>>>>>>>>>&-16	ubyte&0xDF	>0
890175296Sobrien>>>>>>>>>>&-1	string		x 			\b%-.2s
891175296Sobrien>>>>>>&8	ubyte&0xDF	>0			\b.
892175296Sobrien>>>>>>>&-1	string		x 			\b%-.3s
893175296Sobrien#MSDOS.SYS,IBMDOS.COM
894175296Sobrien>>>>>>&11	ubyte&0xDF	>0			\b+
895175296Sobrien>>>>>>>&-1	string		x 			\b%-.5s
896328874Seadler>>>>>>>>&-6	ubyte&0xDF	>0
897175296Sobrien>>>>>>>>>&-1	string		x 			\b%-.1s
898328874Seadler>>>>>>>>>>&-5	ubyte&0xDF	>0
899175296Sobrien>>>>>>>>>>>&-1	string		x 			\b%-.2s
900175296Sobrien>>>>>>>&7	ubyte&0xDF	>0			\b.
901175296Sobrien>>>>>>>>&-1	string		x 			\b%-.3s
902175296Sobrien>441	string	Cannot\ load\ from\ harddisk.\n\r
903328874Seadler>>469	string	Insert\ Systemdisk\040
904175296Sobrien>>>487	string	and\ press\ any\ key.\n\r		\b, MS (2.11) DOS bootloader
905328874Seadler#>43	string	\224R-LOADER\ \ SYS			=label
906159764Sobrien>54	string	SYS
907159764Sobrien>>324	string	VASKK
908159764Sobrien>>>495	string	NEWLDR\0				\b, DR-DOS Bootloader (LOADER.SYS)
909159764Sobrien#
910328874Seadler>98	string	Press\ a\ key\ to\ retry\0\r
911328874Seadler>>120	string	Cannot\ find\ file\ \0\r
912328874Seadler>>>139	string	Disk\ read\ error\0\r
913175296Sobrien>>>>156	string	Loading\ ...\0				\b, DR-DOS (3.41) Bootloader
914175296Sobrien#DRBIOS.SYS
915328874Seadler>>>>>44		ubyte&0xDF	>0
916175296Sobrien>>>>>>44	string		x			\b %-.6s
917328874Seadler>>>>>>>50	ubyte&0xDF	>0
918175296Sobrien>>>>>>>>50	string		x 			\b%-.2s
919328874Seadler>>>>>>52	ubyte&0xDF	>0
920175296Sobrien>>>>>>>52	string		x 			\b.%-.3s
921175296Sobrien#
922328874Seadler>70	string	IBMBIO\ \ COM
923328874Seadler>>472	string	Cannot\ load\ DOS!\040
924159764Sobrien>>>489	string	Any\ key\ to\ retry			\b, DR-DOS Bootloader
925328874Seadler>>471	string	Cannot\ load\ DOS\040
926159764Sobrien>>487	string	press\ key\ to\ retry			\b, Open-DOS Bootloader
927191736Sobrien#??
928328874Seadler>444	string	KERNEL\ \ SYS
929159764Sobrien>>314	string	BOOT\ error!				\b, FREE-DOS Bootloader
930328874Seadler>499	string	KERNEL\ \ SYS
931159764Sobrien>>305	string	BOOT\ err!\0				\b, Free-DOS Bootloader
932328874Seadler>449	string	KERNEL\ \ SYS
933159764Sobrien>>319	string	BOOT\ error!				\b, FREE-DOS 0.5 Bootloader
934191736Sobrien#
935328874Seadler>449	string	Loading\ FreeDOS
936191736Sobrien>>0x1AF		ulelong		>0			\b, FREE-DOS 0.95,1.0 Bootloader
937328874Seadler>>>497		ubyte&0xDF	>0
938191736Sobrien>>>>497		string		x 			\b %-.6s
939328874Seadler>>>>>503	ubyte&0xDF	>0
940191736Sobrien>>>>>>503	string		x 			\b%-.1s
941328874Seadler>>>>>>>504	ubyte&0xDF	>0
942191736Sobrien>>>>>>>>504	string		x 			\b%-.1s
943328874Seadler>>>>505		ubyte&0xDF	>0
944191736Sobrien>>>>>505	string		x 			\b.%-.3s
945191736Sobrien#
946191736Sobrien>331	string	Error!.0				\b, FREE-DOS 1.0 bootloader
947191736Sobrien#
948328874Seadler>125	string	Loading\ FreeDOS...\r
949159764Sobrien>>311	string	BOOT\ error!\r				\b, FREE-DOS bootloader
950328874Seadler>>>441		ubyte&0xDF	>0
951159764Sobrien>>>>441		string		x 			\b %-.6s
952328874Seadler>>>>>447	ubyte&0xDF	>0
953159764Sobrien>>>>>>447	string		x 			\b%-.1s
954328874Seadler>>>>>>>448	ubyte&0xDF	>0
955159764Sobrien>>>>>>>>448	string		x 			\b%-.1s
956328874Seadler>>>>449		ubyte&0xDF	>0
957159764Sobrien>>>>>449	string		x 			\b.%-.3s
958328874Seadler>124	string	FreeDOS\0
959159764Sobrien>>331	string	\ err\0					\b, FREE-DOS BETa 0.9 Bootloader
960159764Sobrien# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
961328874Seadler>>>497		ubyte&0xDF	>0
962159764Sobrien>>>>497		string		x 			\b %-.6s
963328874Seadler>>>>>503	ubyte&0xDF	>0
964159764Sobrien>>>>>>503	string		x 			\b%-.1s
965328874Seadler>>>>>>>504	ubyte&0xDF	>0
966159764Sobrien>>>>>>>>504	string		x 			\b%-.1s
967328874Seadler>>>>505		ubyte&0xDF	>0
968159764Sobrien>>>>>505	string		x 			\b.%-.3s
969159764Sobrien>>333	string	\ err\0					\b, FREE-DOS BEta 0.9 Bootloader
970328874Seadler>>>497		ubyte&0xDF	>0
971159764Sobrien>>>>497		string		x 			\b %-.6s
972328874Seadler>>>>>503	ubyte&0xDF	>0
973159764Sobrien>>>>>>503	string		x 			\b%-.1s
974328874Seadler>>>>>>>504	ubyte&0xDF	>0
975159764Sobrien>>>>>>>>504	string		x 			\b%-.1s
976328874Seadler>>>>505		ubyte&0xDF	>0
977159764Sobrien>>>>>505	string		x 			\b.%-.3s
978159764Sobrien>>334	string	\ err\0					\b, FREE-DOS Beta 0.9 Bootloader
979328874Seadler>>>497		ubyte&0xDF	>0
980159764Sobrien>>>>497		string		x 			\b %-.6s
981328874Seadler>>>>>503	ubyte&0xDF	>0
982159764Sobrien>>>>>>503	string		x 			\b%-.1s
983328874Seadler>>>>>>>504	ubyte&0xDF	>0
984159764Sobrien>>>>>>>>504	string		x 			\b%-.1s
985328874Seadler>>>>505		ubyte&0xDF	>0
986159764Sobrien>>>>>505	string		x 			\b.%-.3s
987328874Seadler>336	string	Error!\040
988159764Sobrien>>343	string	Hit\ a\ key\ to\ reboot.		\b, FREE-DOS Beta 0.9sr1 Bootloader
989328874Seadler>>>497		ubyte&0xDF	>0
990159764Sobrien>>>>497		string		x 			\b %-.6s
991328874Seadler>>>>>503	ubyte&0xDF	>0
992159764Sobrien>>>>>>503	string		x 			\b%-.1s
993328874Seadler>>>>>>>504	ubyte&0xDF	>0
994159764Sobrien>>>>>>>>504	string		x 			\b%-.1s
995328874Seadler>>>>505		ubyte&0xDF	>0
996159764Sobrien>>>>>505	string		x 			\b.%-.3s
997169962Sobrien# added by Joerg Jenderek
998354939Sdelphij# https://www.visopsys.org/
999354939Sdelphij# https://partitionlogic.org.uk/
1000169962Sobrien# OEM-ID=Visopsys
1001328874Seadler>478		ulelong	0
1002328874Seadler>>(1.b+326)	string	I/O\ Error\ reading\040
1003328874Seadler>>>(1.b+344)	string	Visopsys\ loader\r
1004169962Sobrien>>>>(1.b+361)	string	Press\ any\ key\ to\ continue.\r	\b, Visopsys loader
1005169962Sobrien# http://alexfru.chat.ru/epm.html#bootprog
1006328874Seadler>494	ubyte	>0x4D
1007328874Seadler>>495	string	>E
1008328874Seadler>>>495	string	<S
1009169962Sobrien#OEM-ID is not reliable
1010328874Seadler>>>>3	string	BootProg
1011169962Sobrien# It just looks for a program file name at the root directory
1012169962Sobrien# and loads corresponding file with following execution.
1013169962Sobrien# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
1014328874Seadler>>>>499			ubyte&0xDF	>0		\b, COM/EXE Bootloader
1015267843Sdelphij>>>>>499		use		DOS-filename
1016169962Sobrien#If the boot sector fails to read any other sector,
1017169962Sobrien#it prints a very short message ("RE") to the screen and hangs the computer.
1018169962Sobrien#If the boot sector fails to find needed program in the root directory,
1019169962Sobrien#it also hangs with another message ("NF").
1020169962Sobrien>>>>>492		string		RENF		\b, FAT (12 bit)
1021169962Sobrien>>>>>495		string		RENF		\b, FAT (16 bit)
1022169962Sobrien#If the boot sector fails to read any other sector,
1023169962Sobrien#it prints a very short message ("RE") to the screen and hangs the computer.
1024191736Sobrien# x86 bootloader end
1025267843Sdelphij
1026354939Sdelphij# added by Joerg Jenderek at Feb 2013 according to https://thestarman.pcministry.com/asm/mbr/MSWIN41.htm#FSINFO
1027354939Sdelphij# and https://en.wikipedia.org/wiki/File_Allocation_Table#FS_Information_Sector
1028328874Seadler>0		string		RRaA
1029267843Sdelphij>>0x1E4		string		rrAa		\b, FSInfosector
1030267843Sdelphij#>>0x1FC	uleshort	=0		SHOULD BE ZERO
1031267843Sdelphij>>>0x1E8	ulelong		<0xffffffff	\b, %u free clusters
1032267843Sdelphij>>>0x1EC	ulelong		<0xffffffff	\b, last allocated cluster %u
1033267843Sdelphij
1034175296Sobrien# updated by Joerg Jenderek at Sep 2007
1035328874Seadler>3	ubyte	0
1036175296Sobrien#no active flag
1037328874Seadler>>446	ubyte	0
1038175296Sobrien# partition 1 not empty
1039328874Seadler>>>450	ubyte	>0
1040175296Sobrien# partitions 3,4 empty
1041328874Seadler>>>>482		ubyte	0
1042328874Seadler>>>>>498	ubyte	0
1043175296Sobrien# partition 2 ID=0,5,15
1044328874Seadler>>>>>>466	ubyte	<0x10
1045175296Sobrien>>>>>>>466	ubyte	0x05			\b, extended partition table
1046175296Sobrien>>>>>>>466	ubyte	0x0F			\b, extended partition table (LBA)
1047273689Sdelphij>>>>>>>466	ubyte	0x0			\b, extended partition table (last)
1048267843Sdelphij
1049267843Sdelphij# DOS x86 sector separated and moved from "DOS/MBR boot sector" by Joerg Jenderek at May 2011
1050267843Sdelphij
105168349Sobrien>0x200	lelong	0x82564557		\b, BSD disklabel
105268349Sobrien
1053267843Sdelphij# by Joerg Jenderek at Apr 2013
1054267843Sdelphij#	Print the DOS filenames from directory entry form with 8 right space padded bytes + 3 bytes for extension
1055267843Sdelphij#	like IO.SYS. MSDOS.SYS , KERNEL.SYS , DRBIO.SYS
1056267843Sdelphij0	name			DOS-filename
1057328874Seadler# space=0x20 (00100000b) means empty
1058328874Seadler>0			ubyte&0xDF	>0
1059267843Sdelphij>>0			ubyte		x 		\b%c
1060328874Seadler>>>1			ubyte&0xDF	>0
1061267843Sdelphij>>>>1			ubyte		x 		\b%c
1062328874Seadler>>>>>2			ubyte&0xDF	>0
1063267843Sdelphij>>>>>>2			ubyte		x 		\b%c
1064328874Seadler>>>>>>>3		ubyte&0xDF	>0
1065267843Sdelphij>>>>>>>>3		ubyte		x 		\b%c
1066328874Seadler>>>>>>>>>4		ubyte&0xDF	>0
1067267843Sdelphij>>>>>>>>>>4		ubyte		x 		\b%c
1068328874Seadler>>>>>>>>>>>5		ubyte&0xDF	>0
1069267843Sdelphij>>>>>>>>>>>>5		ubyte		x 		\b%c
1070328874Seadler>>>>>>>>>>>>>6		ubyte&0xDF	>0
1071267843Sdelphij>>>>>>>>>>>>>>6		ubyte		x 		\b%c
1072328874Seadler>>>>>>>>>>>>>>>7	ubyte&0xDF	>0
1073267843Sdelphij>>>>>>>>>>>>>>>>7	ubyte		x 		\b%c
1074267843Sdelphij# DOS filename extension
1075267843Sdelphij>>8			ubyte&0xDF	>0		\b.
1076267843Sdelphij>>>8			ubyte		x 		\b%c
1077328874Seadler>>>>9			ubyte&0xDF	>0
1078267843Sdelphij>>>>>9			ubyte		x 		\b%c
1079328874Seadler>>>>>>10		ubyte&0xDF	>0
1080267843Sdelphij>>>>>>>10		ubyte		x 		\b%c
1081267843Sdelphij#	Print 2 following DOS filenames from directory entry form
1082267843Sdelphij#	like IO.SYS+MSDOS.SYS or ibmbio.com+ibmdos.com
1083267843Sdelphij0	name			2xDOS-filename
1084267843Sdelphij# display 1 space
1085328874Seadler>0			ubyte		x		\b
1086267843Sdelphij>0			use		DOS-filename
1087267843Sdelphij>11			ubyte		x		\b+
1088267843Sdelphij>11			use		DOS-filename
1089139368Sobrien
1090354939Sdelphij# https://en.wikipedia.org/wiki/Master_boot_record#PTE
1091267843Sdelphij# display standard partition table
1092267843Sdelphij0	name				partition-table
1093267843Sdelphij#>0		ubyte		x	PARTITION-TABLE
1094267843Sdelphij# test and display 1st til 4th partition table entry
1095267843Sdelphij>0		use			partition-entry-test
1096267843Sdelphij>16		use			partition-entry-test
1097267843Sdelphij>32		use			partition-entry-test
1098267843Sdelphij>48		use			partition-entry-test
1099267843Sdelphij#		test for entry of partition table
1100267843Sdelphij0	name				partition-entry-test
1101267843Sdelphij# partition type ID > 0
1102267843Sdelphij>4		ubyte		>0
1103267843Sdelphij# active flag 0
1104328874Seadler>>0		ubyte		0
1105267843Sdelphij>>>0		use		partition-entry
1106328874Seadler# active flag 0x80, 0x81, ...
1107328874Seadler>>0		ubyte		>0x7F
1108267843Sdelphij>>>0		use		partition-entry
1109267843Sdelphij#		Print entry of partition table
1110267843Sdelphij0	name				partition-entry
1111267843Sdelphij# partition type ID > 0
1112267843Sdelphij>4		ubyte		>0	\b; partition
1113267843Sdelphij>>64		leshort		0xAA55	1
1114267843Sdelphij>>48		leshort		0xAA55	2
1115267843Sdelphij>>32		leshort		0xAA55	3
1116267843Sdelphij>>16		leshort		0xAA55	4
1117267843Sdelphij>>4		ubyte		x	: ID=0x%x
1118267843Sdelphij>>0		ubyte&0x80	0x80	\b, active
1119267843Sdelphij>>0		ubyte		>0x80	0x%x
1120267843Sdelphij>>1		ubyte		x	\b, start-CHS (
1121267843Sdelphij>>1		use		partition-chs
1122267843Sdelphij>>5		ubyte		x	\b), end-CHS (
1123267843Sdelphij>>5		use		partition-chs
1124267843Sdelphij>>8		ulelong		x	\b), startsector %u
1125267843Sdelphij>>12		ulelong		x	\b, %u sectors
1126267843Sdelphij#		Print cylinder,head,sector (CHS) of partition entry
1127267843Sdelphij0	name				partition-chs
1128267843Sdelphij# cylinder
1129267843Sdelphij>1		ubyte		x	\b0x
1130267843Sdelphij>1		ubyte&0xC0	0x40	\b1
1131267843Sdelphij>1		ubyte&0xC0	0x80	\b2
1132267843Sdelphij>1		ubyte&0xC0	0xC0	\b3
1133267843Sdelphij>2		ubyte		x	\b%x
1134267843Sdelphij# head
1135267843Sdelphij>0		ubyte		x	\b,%u
1136267843Sdelphij# sector
1137267843Sdelphij>1		ubyte&0x3F	x	\b,%u
113868349Sobrien
1139328874Seadler# FATX
1140267843Sdelphij0		string		FATX		FATX filesystem data
1141226048Sobrien
114268349Sobrien# romfs filesystems - Juan Cespedes <cespedes@debian.org>
1143192348Sdelphij0	string		-rom1fs-	romfs filesystem, version 1
114468349Sobrien>8	belong	x			%d bytes,
114568349Sobrien>16	string	x			named %s.
114668349Sobrien
114768349Sobrien# netboot image - Juan Cespedes <cespedes@debian.org>
114868349Sobrien0	lelong		0x1b031336L	Netboot image,
114968349Sobrien>4	lelong&0xFFFFFF00	0
115068349Sobrien>>4	lelong&0x100	0x000		mode 2
115168349Sobrien>>4	lelong&0x100	0x100		mode 3
115268349Sobrien>4	lelong&0xFFFFFF00	!0	unknown mode
115368349Sobrien
115468349Sobrien0x18b	string	OS/2	OS/2 Boot Manager
115568349Sobrien
1156267843Sdelphij# updated by Joerg Jenderek at Oct 2008 and Sep 2012
1157354939Sdelphij# https://syslinux.zytor.com/iso.php
1158267843Sdelphij# tested with versions 1.47,1.48,1.49,1.50,1.62,1.76,2.00,2.10;3.00,3.11,3.31,;3.70,3.71,3.73,3.75,3.80,3.82,3.84,3.86,4.01,4.03 and 4.05
1159267843Sdelphij# assembler instructions: cli;jmp 0:7Cyy (yy=0x40,0x5e,0x6c,0x6e,0x77);nop;nop
1160328874Seadler0	ulequad&0x909000007cc0eafa	0x909000007c40eafa
1161267843Sdelphij>631	search/689	ISOLINUX\ 	isolinux Loader
1162267843Sdelphij>>&0	string		x		(version %-4.4s)
1163354939Sdelphij# https://syslinux.zytor.com/pxe.php
1164267843Sdelphij# assembler instructions: jmp 7C05
1165267843Sdelphij0	ulelong	0x007c05ea		pxelinux loader (version 2.13 or older)
1166267843Sdelphij# assembler instructions: pushfd;pushad
1167267843Sdelphij0	ulelong	0x60669c66		pxelinux loader
1168267843Sdelphij# assembler instructions: jmp 05
1169267843Sdelphij0	ulelong	0xc00005ea		pxelinux loader (version 3.70 or newer)
1170354939Sdelphij# https://syslinux.zytor.com/wiki/index.php/SYSLINUX
1171267843Sdelphij0	string	LDLINUX\ SYS\ 		SYSLINUX loader
1172267843Sdelphij>12	string	x			(older version %-4.4s)
1173267843Sdelphij0	string	\r\nSYSLINUX\ 		SYSLINUX loader
1174267843Sdelphij>11	string	x			(version %-4.4s)
1175267843Sdelphij# syslinux updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at Sep 2012
1176267843Sdelphij# assembler instructions: jmp yy (yy=0x3c,0x58);nop;"SYSLINUX"
1177328874Seadler0	ulelong&0x80909bEB	0x009018EB
1178267843Sdelphij# OEM-ID not always "SYSLINUX"
1179328874Seadler>434	search/47	Boot\ failed
1180328874Seadler# followed by \r\n\0 or :\
1181267843Sdelphij>>482	search/132	\0LDLINUX\ SYS		Syslinux bootloader (version 2.13 or older)
1182267843Sdelphij>>1	ubyte		0x58			Syslinux bootloader (version 3.0-3.9)
1183328874Seadler>459	search/30	Boot\ error\r\n\0
1184267843Sdelphij>>1	ubyte		0x58			Syslinux bootloader (version 3.10 or newer)
1185267843Sdelphij# SYSLINUX MBR updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at Sep 2012
1186267843Sdelphij# assembler instructions: mov di,0600h;mov cx,0100h
1187328874Seadler16	search/4	\xbf\x00\x06\xb9\x00\x01
1188267843Sdelphij# to display SYSLINUX MBR (36) before old DOS/MBR boot sector one with partition table (strength=50+21)
1189267843Sdelphij!:strength +36
1190328874Seadler>94	search/249	Missing\ operating\ system
1191267843Sdelphij# followed by \r for versions older 3.35 , .\r for versions newer 3.52 and point for other
1192267843Sdelphij# skip Ranish MBR
1193328874Seadler>>408	search/4	HD1/\0
1194328874Seadler>>408	default		x
1195267843Sdelphij>>>250	search/118	\0Operating\ system\ load		SYSLINUX MBR
1196267843Sdelphij# followed by "ing " or space
1197328874Seadler>>>>292	search/98	error
1198267843Sdelphij>>>>>&0	string		\r		    			(version 3.35 or older)
1199267843Sdelphij>>>>>&0	string		.\r					(version 3.52 or newer)
1200267843Sdelphij>>>>>&0	default		x					(version 3.36-3.51 )
1201267843Sdelphij>368	search/106	\0Disk\ error\ on\ boot\r\n		SYSLINUX GPT-MBR
1202328874Seadler>>156	search/10	\0Boot\ partition\ not\ found\r\n
1203267843Sdelphij>>>270	search/10	\0OS\ not\ bootable\r\n			(version 3.86 or older)
1204328874Seadler>>174	search/10	\0Missing\ OS\r\n
1205267843Sdelphij>>>189	search/10	\0Multiple\ active\ partitions\r\n	(version 4.00 or newer)
1206267843Sdelphij# SYSLINUX END
1207191736Sobrien
1208267843Sdelphij# NetBSD mbr variants (master-boot-code version 1.22) added by Joerg Jenderek at Nov 2012
1209267843Sdelphij# assembler instructions: xor ax,ax;mov	ax,ss;mov sp,0x7c00;mov	ax,
1210328874Seadler0	ubequad		0x31c08ed0bc007c8e
1211267843Sdelphij# mbr_bootsel magic before partition table not reliable with small ipl fragments
1212328874Seadler#>444	uleshort	0xb5e1
1213328874Seadler>0004	uleshort	x
1214267843Sdelphij# ERRorTeXT
1215267843Sdelphij>>181	search/166		Error\ \0\r\n				NetBSD mbr
1216354939Sdelphij# NT Drive Serial Number https://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm#DS
1217267843Sdelphij>>>0x1B8	ubelong		>0					\b,Serial 0x%-.8x
1218267843Sdelphij# BOOTSEL definitions contains assembler instructions: int 0x13;pop dx;push dx;push dx
1219267843Sdelphij>>>0xbb		search/71	\xcd\x13\x5a\x52\x52			\b,bootselector
1220328874Seadler# BOOT_EXTENDED definitions contains assembler instructions:
1221267843Sdelphij# xchg ecx,edx;addl ecx,edx;movw lba_info,si;movb 0x42,ah;pop dx;push dx;int 0x13
1222267843Sdelphij>>>0x96	search/1	\x66\x87\xca\x66\x01\xca\x66\x89\x16\x3a\x07\xbe\x32\x07\xb4\x42\x5a\x52\xcd\x13	\b,boot extended
1223267843Sdelphij# COM_PORT_VAL definitions contains assembler instructions: outb al,dx;add 5,dl;inb %dx;test 0x40,al
1224267843Sdelphij>>>0x130	search/55	\xee\x80\xc2\x05\xec\xa8\x40		\b,serial IO
1225267843Sdelphij# not TERSE_ERROR
1226328874Seadler>>>196		search/106	No\ active\ partition\0
1227328874Seadler>>>>&0		string		Disk\ read\ error\0
1228267843Sdelphij>>>>>&0		string		No\ operating\ system\0			\b,verbose
1229267843Sdelphij# not NO_CHS definitions contains assembler instructions: pop dx;push dx;movb $8,ah;int0x13
1230267843Sdelphij>>>0x7d		search/7	\x5a\x52\xb4\x08\xcd\x13		\b,CHS
1231267843Sdelphij# not NO_LBA_CHECK definitions contains assembler instructions: movw 0x55aa,bx;movb 0x41,ah;pop	dx;push	dx;int 0x13
1232267843Sdelphij>>>0xa4		search/84	\xbb\xaa\x55\xb4\x41\x5a\x52\xcd\x13	\b,LBA-check
1233267843Sdelphij# assembler instructions: movw nametab,bx
1234328874Seadler>>>0x26	    search/21	\xBB\x94\x07
1235267843Sdelphij# not NO_BANNER definitions contains assembler instructions: mov banner,si;call message_crlf
1236328874Seadler>>>>&-9	ubequad&0xBE00f0E800febb94	0xBE0000E80000bb94
1237328874Seadler>>>>>181	search/166		Error\ \0
1238267843Sdelphij# "a: disk" , "Fn: diskn" or "NetBSD MBR boot"
1239267843Sdelphij>>>>>>&3	string			x				\b,"%s"
1240273689Sdelphij>>>446	use		partition-table
1241267843Sdelphij# Andrea Mazzoleni AdvanceCD mbr loader of http://advancemame.sourceforge.net/boot-readme.html
1242267843Sdelphij# added by Joerg Jenderek at Nov 2012 for versions 1.3 - 1.4
1243267843Sdelphij# assembler instructions: jmp short 0x58;nop;ASCII
1244328874Seadler0	ubequad&0xeb58908000000000	0xeb58900000000000
1245267843Sdelphij# assembler instructions: cli;xor ax,ax;mov ds,ax;mov es,ax;mov ss,
1246328874Seadler>(1.b+2)	ubequad			0xfa31c08ed88ec08e
1247267843Sdelphij# Error messages at end of code
1248328874Seadler>>376		string	No\ operating\ system\r\n\0
1249328874Seadler>>>398		string	Disk\ error\r\n\0FDD\0HDD\0
1250267843Sdelphij>>>>419		string	\ EBIOS\r\n\0				AdvanceMAME mbr
1251267843Sdelphij
1252354939Sdelphij# Neil Turton mbr loader variant of https://www.chiark.greenend.org.uk/~neilt/mbr/
1253267843Sdelphij# added by Joerg Jenderek at Mar 2011 for versions 1.0.0 - 1.1.11
1254267843Sdelphij# for 1st version assembler instructions:	cld;xor ax,ax;mov DS,ax;MOV ES,AX;mov SI,
1255267843Sdelphij# or  	  	  	    			cld;xor ax,ax;mov SS,ax;XOR SP,SP;mov DS,
1256328874Seadler0	ulequad&0xcE1b40D48EC031FC	0x8E0000D08EC031FC
1257267843Sdelphij# pointer to the data starting with Neil Turton signature string
1258328874Seadler>(0x1BC.s)		string		NDTmbr
1259267843Sdelphij>>&-14			string		1234F\0			Turton mbr (
1260267843Sdelphij# parameters also viewed by install-mbr --list
1261267843Sdelphij>>>(0x1BC.s+7)		ubyte		x			\b%u<=
1262267843Sdelphij>>>(0x1BC.s+9)		ubyte		x			\bVersion<=%u
1263267843Sdelphij#>>>(0x1BC.s+8)		ubyte		x			asm_flag_%x
1264267843Sdelphij>>>(0x1BC.s+8)		ubyte&1		1			\b,Y2K-Fix
1265354939Sdelphij# variant used by testdisk of https://www.cgsecurity.org/wiki/Menu_MBRCode
1266267843Sdelphij>>>(0x1BC.s+8)		ubyte&2		2			\b,TestDisk
1267267843Sdelphij#0x1~1,..,0x8~4,0x10~F,0x80~A enabled
1268267843Sdelphij#>>>(0x1BC.s+10)		ubyte		x			\b,flags 0x%x
1269267843Sdelphij#0x0~1,0x1~2,...,0x3~4,0x4~F,0x7~D default boot
1270267843Sdelphij#>>>(0x1BC.s+11)		ubyte		x			\b,cfg_def 0x%x
1271267843Sdelphij# for older versions
1272328874Seadler>>>(0x1BC.s+9)		ubyte		<2
1273267843Sdelphij#>>>>(0x1BC.s+12)	ubyte		18			\b,%hhu/18 seconds
1274267843Sdelphij>>>>(0x1BC.s+12)	ubyte		!18			\b,%u/18 seconds
1275267843Sdelphij# floppy A: or B:
1276267843Sdelphij>>>>(0x1BC.s+13)	ubyte		<2			\b,floppy 0x%x
1277328874Seadler>>>>(0x1BC.s+13)	ubyte		>1
1278267843Sdelphij# 1st hard disc
1279267843Sdelphij#>>>>>(0x1BC.s+13)	ubyte		0x80			\b,drive 0x%x
1280267843Sdelphij# not 1st hard disc
1281267843Sdelphij>>>>>(0x1BC.s+13)	ubyte		!0x80			\b,drive 0x%x
1282267843Sdelphij# for version >= 2 maximal timeout can be 65534
1283328874Seadler>>>(0x1BC.s+9)		ubyte		>1
1284267843Sdelphij#>>>>(0x1BC.s+12)	uleshort	18			\b,%u/18 seconds
1285267843Sdelphij>>>>(0x1BC.s+12)	uleshort	!18			\b,%u/18 seconds
1286267843Sdelphij# floppy A: or B:
1287267843Sdelphij>>>>(0x1BC.s+14)	ubyte		<2			\b,floppy 0x%x
1288328874Seadler>>>>(0x1BC.s+14)	ubyte		>1
1289267843Sdelphij# 1st hard disc
1290267843Sdelphij#>>>>>(0x1BC.s+14)	ubyte		0x80			\b,drive 0x%x
1291267843Sdelphij# not 1st hard disc
1292267843Sdelphij>>>>>(0x1BC.s+14)	ubyte		!0x80			\b,drive 0x%x
1293267843Sdelphij>>>0	ubyte		x					\b)
1294267843Sdelphij
1295169962Sobrien# added by Joerg Jenderek
1296169962Sobrien# In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or
1297169962Sobrien# grub-1.94/kern/i386/pc/startup.S
1298354939Sdelphij# https://www.gnu.org/software/grub/manual/grub.html#Embedded-data
1299169962Sobrien# usual values are marked with comments to get only informations of strange GRUB loaders
1300328874Seadler0x200	uleshort		0x70EA
1301169962Sobrien# found only version 3.{1,2}
1302328874Seadler>0x206		ubeshort	>0x0300
1303169962Sobrien# GRUB version (0.5.)95,0.93,0.94,0.96,0.97 > "00"
1304328874Seadler>>0x212 	ubyte		>0x29
1305328874Seadler>>>0x213 	ubyte		>0x29
1306169962Sobrien# not iso9660_stage1_5
1307328874Seadler#>>>0	ulelong&0x00BE5652	0x00BE5652
1308169962Sobrien>>>>0x213 	ubyte		>0x29		GRand Unified Bootloader
1309169962Sobrien# config_file for stage1_5 is 0xffffffff + default "/boot/grub/stage2"
1310169962Sobrien>>>>0x217 	ubyte		0xFF		stage1_5
1311169962Sobrien>>>>0x217 	ubyte		<0xFF		stage2
1312169962Sobrien>>>>0x206	ubyte		x		\b version %u
1313169962Sobrien>>>>0x207	ubyte		x		\b.%u
1314169962Sobrien# module_size for 1.94
1315169962Sobrien>>>>0x208	ulelong		<0xffffff	\b, installed partition %u
1316267843Sdelphij#>>>>0x208	ulelong		=0xffffff	\b, %lu (default)
1317169962Sobrien>>>>0x208	ulelong		>0xffffff	\b, installed partition %u
1318169962Sobrien# GRUB 0.5.95 unofficial
1319328874Seadler>>>>0x20C	ulelong&0x2E300000 0x2E300000
1320169962Sobrien# 0=stage2	1=ffs	2=e2fs	3=fat	4=minix	5=reiserfs
1321169962Sobrien>>>>>0x20C	ubyte		x		\b, identifier 0x%x
1322169962Sobrien#>>>>>0x20D	ubyte		=0		\b, LBA flag 0x%x (default)
1323169962Sobrien>>>>>0x20D	ubyte		>0		\b, LBA flag 0x%x
1324169962Sobrien# GRUB version as string
1325169962Sobrien>>>>>0x20E 	string		>\0		\b, GRUB version %-s
1326169962Sobrien# for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
1327328874Seadler>>>>>>0x215 	ulong		0xffffffff
1328169962Sobrien>>>>>>>0x219 	string		>\0		\b, configuration file %-s
1329328874Seadler>>>>>>0x215 	ulong		!0xffffffff
1330169962Sobrien>>>>>>>0x215 	string		>\0		\b, configuration file %-s
1331169962Sobrien# newer GRUB versions
1332328874Seadler>>>>0x20C	ulelong&0x2E300000 !0x2E300000
1333169962Sobrien##>>>>>0x20C	ulelong		=0		\b, saved entry %d (usual)
1334169962Sobrien>>>>>0x20C	ulelong		>0		\b, saved entry %d
1335169962Sobrien# for 1.94 contains kernel image size
1336169962Sobrien# for 0.93,0.94,0.96,0.97
1337328874Seadler# 0=stage2	1=ffs	2=e2fs	3=fat	4=minix	5=reiserfs	6=vstafs	7=jfs	8=xfs	9=iso9660	a=ufs2
1338169962Sobrien>>>>>0x210	ubyte		x		\b, identifier 0x%x
1339169962Sobrien# The flag for LBA forcing is in most cases 0
1340169962Sobrien#>>>>>0x211	ubyte		=0		\b, LBA flag 0x%x (default)
1341169962Sobrien>>>>>0x211	ubyte		>0		\b, LBA flag 0x%x
1342169962Sobrien# GRUB version as string
1343169962Sobrien>>>>>0x212 	string		>\0		\b, GRUB version %-s
1344169962Sobrien# for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
1345328874Seadler>>>>>0x217 	ulong		0xffffffff
1346169962Sobrien>>>>>>0x21b 	string		>\0		\b, configuration file %-s
1347328874Seadler>>>>>0x217 	ulong		!0xffffffff
1348169962Sobrien>>>>>>0x217 	string		>\0		\b, configuration file %-s
1349169962Sobrien
1350267843Sdelphij# DOS x86 sector updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at May 2011
1351267843Sdelphij# JuMP short     bootcodeoffset NOP assembler instructions will usually be EB xx 90
1352267843Sdelphij# over BIOS parameter block (BPB)
1353354939Sdelphij# https://thestarman.pcministry.com/asm/2bytejumps.htm#FWD
1354267843Sdelphij# older drives may use Near JuMP instruction E9 xx xx
1355267843Sdelphij# minimal short forward jump found 0x29 for bootloaders or 0x0
1356267843Sdelphij# maximal short forward jump is 0x7f
1357267843Sdelphij# OEM-ID is empty or contain readable bytes
1358273689Sdelphij0		ulelong&0x804000E9	0x000000E9
1359273689Sdelphij!:strength	+60
1360267843Sdelphij# mtools-3.9.8/msdos.h
1361267843Sdelphij# usual values are marked with comments to get only informations of strange FAT systems
1362267843Sdelphij# valid sectorsize must be a power of 2 from 32 to 32768
1363328874Seadler>11		uleshort&0x001f	0
1364328874Seadler>>11		uleshort	<32769
1365328874Seadler>>>11		uleshort	>31
1366328874Seadler>>>>21		ubyte&0xf0	0xF0
1367273689Sdelphij>>>>>0		ubyte		0xEB		DOS/MBR boot sector
1368267843Sdelphij>>>>>>1		ubyte		x		\b, code offset 0x%x+2
1369328874Seadler>>>>>0		ubyte		0xE9
1370273689Sdelphij>>>>>>1		uleshort	x		\b, code offset 0x%x+3
1371267843Sdelphij>>>>>3		string		>\0		\b, OEM-ID "%-.8s"
1372267843Sdelphij#http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
1373267843Sdelphij>>>>>>8		string		IHC		\b cached by Windows 9M
1374267843Sdelphij>>>>>11		uleshort	>512		\b, Bytes/sector %u
1375267843Sdelphij#>>>>>11	uleshort	=512		\b, Bytes/sector %u=512 (usual)
1376267843Sdelphij>>>>>11		uleshort	<512		\b, Bytes/sector %u
1377267843Sdelphij>>>>>13		ubyte		>1		\b, sectors/cluster %u
1378267843Sdelphij#>>>>>13	ubyte		=1		\b, sectors/cluster %u (usual on Floppies)
1379273689Sdelphij# for lazy FAT32 implementation like Transcend digital photo frame PF830
1380328874Seadler>>>>>82		string/c	fat32
1381267843Sdelphij>>>>>>14	uleshort	!32		\b, reserved sectors %u
1382267843Sdelphij#>>>>>>14	uleshort	=32		\b, reserved sectors %u (usual Fat32)
1383328874Seadler>>>>>82		string/c	!fat32
1384267843Sdelphij>>>>>>14	uleshort	>1		\b, reserved sectors %u
1385267843Sdelphij#>>>>>>14	uleshort	=1		\b, reserved sectors %u (usual FAT12,FAT16)
1386267843Sdelphij#>>>>>>14	uleshort	0		\b, reserved sectors %u (usual NTFS)
1387267843Sdelphij>>>>>16		ubyte		>2		\b, FATs %u
1388267843Sdelphij#>>>>>16	ubyte		=2		\b, FATs %u (usual)
1389267843Sdelphij>>>>>16		ubyte		=1		\b, FAT  %u
1390267843Sdelphij>>>>>16		ubyte		>0
1391267843Sdelphij>>>>>17		uleshort	>0		\b, root entries %u
1392267843Sdelphij#>>>>>17	uleshort	=0		\b, root entries %hu=0 (usual Fat32)
1393328874Seadler>>>>>19		uleshort	>0		\b, sectors %u (volumes <=32 MB)
1394267843Sdelphij#>>>>>19	uleshort	=0		\b, sectors %hu=0 (usual Fat32)
1395267843Sdelphij>>>>>21		ubyte		>0xF0		\b, Media descriptor 0x%x
1396267843Sdelphij#>>>>>21	ubyte		=0xF0		\b, Media descriptor 0x%x (usual floppy)
1397267843Sdelphij>>>>>21		ubyte		<0xF0		\b, Media descriptor 0x%x
1398267843Sdelphij>>>>>22		uleshort	>0		\b, sectors/FAT %u
1399267843Sdelphij#>>>>>22	uleshort	=0		\b, sectors/FAT %hu=0 (usual Fat32)
1400267843Sdelphij>>>>>24		uleshort	x		\b, sectors/track %u
1401267843Sdelphij>>>>>26		ubyte		>2		\b, heads %u
1402267843Sdelphij#>>>>>26	ubyte		=2		\b, heads %u (usual floppy)
1403267843Sdelphij>>>>>26		ubyte		=1		\b, heads %u
1404267843Sdelphij# valid only for sector sizes with more then 32 Bytes
1405328874Seadler>>>>>11		uleshort	>32
1406354939Sdelphij# https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#Extended_BIOS_Parameter_Block
1407273689Sdelphij# skip for values 2,2Ah,70h,73h,DFh
1408273689Sdelphij# and continue for extended boot signature values 0,28h,29h,80h
1409328874Seadler>>>>>>38	ubyte&0x56	=0
1410267843Sdelphij>>>>>>>28	ulelong		>0		\b, hidden sectors %u
1411267843Sdelphij#>>>>>>>28	ulelong		=0		\b, hidden sectors %u (usual floppy)
1412328874Seadler>>>>>>>32	ulelong		>0		\b, sectors %u (volumes > 32 MB)
1413267843Sdelphij#>>>>>>>32	ulelong		=0		\b, sectors %u (volumes > 32 MB)
1414328874Seadler# FAT<32 bit specific
1415328874Seadler>>>>>>>82	string/c	!fat32
1416267843Sdelphij#>>>>>>>>36	ubyte		0x80		\b, physical drive 0x%x=0x80 (usual harddisk)
1417267843Sdelphij#>>>>>>>>36	ubyte		0		\b, physical drive 0x%x=0 (usual floppy)
1418328874Seadler>>>>>>>>36	ubyte		!0x80
1419267843Sdelphij>>>>>>>>>36	ubyte		!0		\b, physical drive 0x%x
1420273689Sdelphij# VGA-copy CRC or
1421273689Sdelphij# in Windows NT bit 0 is a dirty flag to request chkdsk at boot time. bit 1 requests surface scan too
1422267843Sdelphij>>>>>>>>37	ubyte		>0		\b, reserved 0x%x
1423267843Sdelphij#>>>>>>>>37	ubyte		=0		\b, reserved 0x%x
1424273689Sdelphij# extended boot signatur value is 0x80 for NTFS, 0x28 or 0x29 for others
1425267843Sdelphij>>>>>>>>38	ubyte		!0x29		\b, dos < 4.0 BootSector (0x%x)
1426273689Sdelphij>>>>>>>>38	ubyte&0xFE	=0x28
1427273689Sdelphij>>>>>>>>>39	ulelong		x		\b, serial number 0x%x
1428267843Sdelphij>>>>>>>>38	ubyte		=0x29
1429267843Sdelphij>>>>>>>>>43	string		<NO\ NAME	\b, label: "%11.11s"
1430267843Sdelphij>>>>>>>>>43	string		>NO\ NAME	\b, label: "%11.11s"
1431267843Sdelphij>>>>>>>>>43	string		=NO\ NAME	\b, unlabeled
1432267843Sdelphij# there exist some old floppies without word FAT at offset 54
1433267843Sdelphij# a word like "FATnm   " is only a hint for a FAT size on nm-bits
1434267843Sdelphij# Normally the number of clusters is calculated by the values of BPP.
1435267843Sdelphij# if it is small enough FAT is 12 bit, if it is too big enough FAT is 32 bit,
1436267843Sdelphij# otherwise FAT is 16 bit.
1437267843Sdelphij# http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-fat-widths.html
1438328874Seadler>>>>>82		string/c	!fat32
1439273689Sdelphij>>>>>>54	string		FAT12		\b, FAT (12 bit)
1440273689Sdelphij>>>>>>54	string		FAT16		\b, FAT (16 bit)
1441328874Seadler>>>>>>54	default		x
1442273689Sdelphij# determinate FAT bit size by media descriptor
1443273689Sdelphij# small floppies implies FAT12
1444273689Sdelphij>>>>>>>21	ubyte		<0xF0		\b, FAT (12 bit by descriptor)
1445273689Sdelphij# with media descriptor F0h floppy or maybe superfloppy with FAT16
1446328874Seadler>>>>>>>21	ubyte		=0xF0
1447273689Sdelphij# superfloppy (many sectors) implies FAT16
1448273689Sdelphij>>>>>>>>32	ulelong		>0xFFFF		\b, FAT (16 bit by descriptor+sectors)
1449273689Sdelphij# no superfloppy with media descriptor F0h implies FAT12
1450273689Sdelphij>>>>>>>>32	default		x		\b, FAT (12 bit by descriptor+sectors)
1451273689Sdelphij# with media descriptor F8h floppy or hard disc with FAT12 or FAT16
1452328874Seadler>>>>>>>21	ubyte		=0xF8
1453273689Sdelphij# 360 KiB with media descriptor F8h, 9 sectors per track ,single sided floppy implies FAT12
1454273689Sdelphij>>>>>>>>19	ubequad	0xd002f80300090001	\b, FAT (12 bit by descriptor+geometry)
1455273689Sdelphij# hard disc with FAT12 or FAT16
1456273689Sdelphij>>>>>>>>19	default		x		\b, FAT (1Y bit by descriptor)
1457273689Sdelphij# with media descriptor FAh floppy, RAM disc with FAT12 or FAT16 or Tandy hard disc
1458328874Seadler>>>>>>>21	ubyte		=0xFA
1459273689Sdelphij# 320 KiB with media descriptor FAh, 8 sectors per track ,single sided floppy implies FAT12
1460273689Sdelphij>>>>>>>>19	ubequad	0x8002fa0200080001	\b, FAT (12 bit by descriptor+geometry)
1461273689Sdelphij# RAM disc with FAT12 or FAT16 or Tandy hard disc
1462273689Sdelphij>>>>>>>>19	default		x		\b, FAT (1Y bit by descriptor)
1463273689Sdelphij# others are floppy
1464273689Sdelphij>>>>>>>21	default		x		\b, FAT (12 bit by descriptor)
1465267843Sdelphij# FAT32 bit specific
1466273689Sdelphij>>>>>82		string/c	fat32		\b, FAT (32 bit)
1467267843Sdelphij>>>>>>36	ulelong		x		\b, sectors/FAT %u
1468354939Sdelphij# https://technet.microsoft.com/en-us/library/cc977221.aspx
1469267843Sdelphij>>>>>>40	uleshort	>0		\b, extension flags 0x%x
1470267843Sdelphij#>>>>>>40	uleshort	=0		\b, extension flags %hu
1471267843Sdelphij>>>>>>42	uleshort	>0		\b, fsVersion %u
1472267843Sdelphij#>>>>>>42	uleshort	=0		\b, fsVersion %u (usual)
1473267843Sdelphij>>>>>>44	ulelong		>2		\b, rootdir cluster %u
1474267843Sdelphij#>>>>>>44	ulelong		=2		\b, rootdir cluster %u
1475267843Sdelphij#>>>>>>44	ulelong		=1		\b, rootdir cluster %u
1476267843Sdelphij>>>>>>48	uleshort	>1		\b, infoSector %u
1477267843Sdelphij#>>>>>>48	uleshort	=1		\b, infoSector %u (usual)
1478267843Sdelphij>>>>>>48	uleshort	<1		\b, infoSector %u
1479273689Sdelphij# 0 or 0xFFFF instead of usual 6 means no backup sector
1480273689Sdelphij>>>>>>50	uleshort	=0xFFFF		\b, no Backup boot sector
1481273689Sdelphij>>>>>>50	uleshort	=0		\b, no Backup boot sector
1482328874Seadler#>>>>>>50	uleshort	=6		\b, Backup boot sector %u (usual)
1483328874Seadler>>>>>>50	default		x
1484273689Sdelphij>>>>>>>50	uleshort	x		\b, Backup boot sector %u
1485354939Sdelphij# corrected by Joerg Jenderek at Feb 2011 according to https://thestarman.pcministry.com/asm/mbr/MSWIN41.htm#FSINFO
1486267843Sdelphij>>>>>>52	ulelong		>0		\b, reserved1 0x%x
1487267843Sdelphij>>>>>>56	ulelong		>0		\b, reserved2 0x%x
1488267843Sdelphij>>>>>>60	ulelong		>0		\b, reserved3 0x%x
1489328874Seadler# same structure as FAT1X
1490267843Sdelphij#>>>>>>64	ubyte		=0x80		\b, physical drive 0x%x=80 (usual harddisk)
1491267843Sdelphij#>>>>>>64	ubyte		=0		\b, physical drive 0x%x=0 (usual floppy)
1492328874Seadler>>>>>>64	ubyte		!0x80
1493267843Sdelphij>>>>>>>64	ubyte		>0		\b, physical drive 0x%x
1494267843Sdelphij# in Windows NT bit 0 is a dirty flag to request chkdsk at boot time. bit 1 requests surface scan too
1495267843Sdelphij>>>>>>65	ubyte		>0		\b, reserved 0x%x
1496267843Sdelphij>>>>>>66	ubyte		!0x29		\b, dos < 4.0 BootSector (0x%x)
1497267843Sdelphij>>>>>>66	ubyte		=0x29
1498267843Sdelphij>>>>>>>67	ulelong		x		\b, serial number 0x%x
1499267843Sdelphij>>>>>>>71	string		<NO\ NAME	\b, label: "%11.11s"
1500267843Sdelphij>>>>>>>71	string		>NO\ NAME	\b, label: "%11.11s"
1501267843Sdelphij>>>>>>>71	string		=NO\ NAME	\b, unlabeled
1502267843Sdelphij# additional tests for floppy image added by Joerg Jenderek
1503328874Seadler# no fixed disk
1504328874Seadler>>>>>21		ubyte		!0xF8
1505267843Sdelphij# floppy media with 12 bit FAT
1506328874Seadler>>>>>>54	string		!FAT16
1507267843Sdelphij# test for FAT after bootsector
1508267843Sdelphij>>>>>>>(11.s)	ulelong&0x00ffffF0	0x00ffffF0	\b, followed by FAT
1509267843Sdelphij# floppy image
1510267843Sdelphij!:mime application/x-ima
1511354939Sdelphij# NTFS specific added by Joerg Jenderek at Mar 2011 according to https://thestarman.pcministry.com/asm/mbr/NTFSBR.htm
1512267843Sdelphij# and http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/bios-parameter-block.html
1513267843Sdelphij# 0 FATs
1514328874Seadler>>>>>16	ubyte		=0
1515267843Sdelphij# 0 root entries
1516328874Seadler>>>>>>17	uleshort	=0
1517267843Sdelphij# 0 DOS sectors
1518328874Seadler>>>>>>>19	uleshort	=0
1519267843Sdelphij# 0 sectors/FAT
1520267843Sdelphij# dos < 4.0 BootSector value found is 0x80
1521267843Sdelphij#38	ubyte		=0x80			\b, dos < 4.0 BootSector (0x%x)
1522267843Sdelphij>>>>>>>>22	uleshort	=0		\b; NTFS
1523267843Sdelphij>>>>>>>>>24	uleshort	>0		\b, sectors/track %u
1524267843Sdelphij>>>>>>>>>36	ulelong		!0x800080	\b, physical drive 0x%x
1525267843Sdelphij>>>>>>>>>40	ulequad		>0		\b, sectors %lld
1526267843Sdelphij>>>>>>>>>48	ulequad		>0		\b, $MFT start cluster %lld
1527267843Sdelphij>>>>>>>>>56	ulequad		>0		\b, $MFTMirror start cluster %lld
1528267843Sdelphij# Values 0 to 127 represent MFT record sizes of 0 to 127 clusters.
1529328874Seadler# Values 128 to 255 represent MFT record sizes of 2^(256-N) bytes.
1530328874Seadler>>>>>>>>>64	lelong		<256
1531267843Sdelphij>>>>>>>>>>64	lelong		<128		\b, clusters/RecordSegment %d
1532267843Sdelphij>>>>>>>>>>64	ubyte		>127		\b, bytes/RecordSegment 2^(-1*%i)
1533267843Sdelphij# Values 0 to 127 represent index block sizes of 0 to 127 clusters.
1534267843Sdelphij# Values 128 to 255 represent index block sizes of 2^(256-N) byte
1535328874Seadler>>>>>>>>>68	ulelong		<256
1536267843Sdelphij>>>>>>>>>>68	ulelong		<128		\b, clusters/index block %d
1537267843Sdelphij#>>>>>>>>>>68	ulelong		>127		\b, bytes/index block 2^(256-%d)
1538267843Sdelphij>>>>>>>>>>68	ubyte		>127		\b, bytes/index block 2^(-1*%i)
1539267843Sdelphij>>>>>>>>>72	ulequad		x		\b, serial number 0%llx
1540267843Sdelphij>>>>>>>>>80	ulelong		>0		\b, checksum 0x%x
1541267843Sdelphij#>>>>>>>>>80	ulelong		=0		\b, checksum 0x%x=0 (usual)
1542354939Sdelphij# unicode loadername size jump
1543354939Sdelphij>>>>>>>>>(0x200.s*2)	ubyte				x
1544354939Sdelphij# in next sector loadername terminated by unicode CTRL-D and $
1545354939Sdelphij>>>>>>>>>>&0x1FF	ulequad&0x0000FFffFFffFF00	0x0000002400040000 \b; contains
1546354939Sdelphij# if 2nd NTFS sectors is found then assume whole filesystem
1547354939Sdelphij#!:mime		application/x-raw-disk-image
1548354939Sdelphij!:ext		img/bin/ntfs
1549354939Sdelphij>>>>>>>>>>>0x200	use				ntfs-sector2
1550354939Sdelphij
1551354939Sdelphij# For 2nd NTFS sector added by Joerg Jenderek at Jan 2013, Mar 2019
1552354939Sdelphij# https://thestarman.pcministry.com/asm/mbr/NTFSbrHexEd.htm
1553354939Sdelphij# unused assembler instructions short JMP y2;NOP;NOP
1554354939Sdelphij0x056		ulelong&0xFFFF0FFF	0x909002EB	NTFS
1555354939Sdelphij#!:mime		application/octet-stream
1556354939Sdelphij!:ext		bin
1557354939Sdelphij>0		use		ntfs-sector2
1558354939Sdelphij# https://memory.dataram.com/products-and-services/software/ramdisk
1559354939Sdelphij# assembler instructions JMP C000;NOP
1560354939Sdelphij0x056		ulelong			0x9000c0e9	NTFS
1561354939Sdelphij#!:mime		application/octet-stream
1562354939Sdelphij!:ext		bin
1563354939Sdelphij>0		use		ntfs-sector2
1564354939Sdelphij# check for characteristics of second NTFS sector and then display loader name
1565354939Sdelphij0		name		ntfs-sector2
1566354939Sdelphij# number of utf16 characters of loadername
1567354939Sdelphij>0		uleshort	<8
1568354939Sdelphij# unused assembler instructions JMP y2;NOP;NOP or JMP C000;NOP
1569354939Sdelphij>>0x056		ulelong&0xFF0000FD	0x900000E9
1570267843Sdelphij# loadernames are NTLDR,CMLDR,PELDR,$LDR$ or BOOTMGR
1571354939Sdelphij>>>0x002		lestring16	x	bootstrap %-5.5s
1572354939Sdelphij# check for 7 character length of loader name like BOOTMGR
1573354939Sdelphij>>>0		uleshort	7
1574354939Sdelphij>>>>0x0c	lestring16	x	\b%-2.2s
1575267843Sdelphij### DOS,NTFS boot sectors end
1576267843Sdelphij
1577328874Seadler# ntfsclone-image is a special save format for NTFS volumes,
1578328874Seadler# created and restored by the ntfsclone program
1579328874Seadler0	string	\0ntfsclone-image	ntfsclone image,
1580328874Seadler>0x10	byte	x			version %d.
1581328874Seadler>0x11	byte	x			\b%d,
1582328874Seadler>0x12	lelong	x			cluster size %d,
1583328874Seadler>0x16	lequad	x			device size %lld,
1584328874Seadler>0x1e	lequad	x			%lld total clusters,
1585328874Seadler>0x26	lequad	x			%lld clusters in use
1586328874Seadler
1587169942Sobrien9564	lelong		0x00011954	Unix Fast File system [v1] (little-endian),
158868349Sobrien>8404	string		x		last mounted on %s,
158984685Sobrien#>9504	ledate		x		last checked at %s,
159084685Sobrien>8224	ledate		x		last written at %s,
159184685Sobrien>8401	byte		x		clean flag %d,
159268349Sobrien>8228	lelong		x		number of blocks %d,
159368349Sobrien>8232	lelong		x		number of data blocks %d,
159468349Sobrien>8236	lelong		x		number of cylinder groups %d,
159584685Sobrien>8240	lelong		x		block size %d,
159684685Sobrien>8244	lelong		x		fragment size %d,
159784685Sobrien>8252	lelong		x		minimum percentage of free blocks %d,
159884685Sobrien>8256	lelong		x		rotational delay %dms,
159984685Sobrien>8260	lelong		x		disk rotational speed %drps,
160068349Sobrien>8320	lelong		0		TIME optimization
160168349Sobrien>8320	lelong		1		SPACE optimization
160268349Sobrien
1603169942Sobrien42332	lelong		0x19540119	Unix Fast File system [v2] (little-endian)
1604169942Sobrien>&-1164	string		x		last mounted on %s,
1605169942Sobrien>&-696	string		>\0		volume name %s,
1606169942Sobrien>&-304	leqldate	x		last written at %s,
1607169942Sobrien>&-1167	byte		x		clean flag %d,
1608169942Sobrien>&-1168	byte		x		readonly flag %d,
1609169942Sobrien>&-296	lequad		x		number of blocks %lld,
1610169942Sobrien>&-288	lequad		x		number of data blocks %lld,
1611169942Sobrien>&-1332	lelong		x		number of cylinder groups %d,
1612169942Sobrien>&-1328	lelong		x		block size %d,
1613169942Sobrien>&-1324	lelong		x		fragment size %d,
1614169942Sobrien>&-180	lelong		x		average file size %d,
1615169942Sobrien>&-176	lelong		x		average number of files in dir %d,
1616169942Sobrien>&-272	lequad		x		pending blocks to free %lld,
1617267843Sdelphij>&-264	lelong		x		pending inodes to free %d,
1618169942Sobrien>&-664	lequad		x		system-wide uuid %0llx,
1619169942Sobrien>&-1316	lelong		x		minimum percentage of free blocks %d,
1620169942Sobrien>&-1248	lelong		0		TIME optimization
1621169942Sobrien>&-1248	lelong		1		SPACE optimization
1622169942Sobrien
1623169942Sobrien66908	lelong		0x19540119	Unix Fast File system [v2] (little-endian)
1624169942Sobrien>&-1164	string		x		last mounted on %s,
1625169942Sobrien>&-696	string		>\0		volume name %s,
1626169942Sobrien>&-304	leqldate	x		last written at %s,
1627169942Sobrien>&-1167	byte		x		clean flag %d,
1628169942Sobrien>&-1168	byte		x		readonly flag %d,
1629169942Sobrien>&-296	lequad		x		number of blocks %lld,
1630169942Sobrien>&-288	lequad		x		number of data blocks %lld,
1631169942Sobrien>&-1332	lelong		x		number of cylinder groups %d,
1632169942Sobrien>&-1328	lelong		x		block size %d,
1633169942Sobrien>&-1324	lelong		x		fragment size %d,
1634169942Sobrien>&-180	lelong		x		average file size %d,
1635169942Sobrien>&-176	lelong		x		average number of files in dir %d,
1636169942Sobrien>&-272	lequad		x		pending blocks to free %lld,
1637267843Sdelphij>&-264	lelong		x		pending inodes to free %d,
1638169942Sobrien>&-664	lequad		x		system-wide uuid %0llx,
1639169942Sobrien>&-1316	lelong		x		minimum percentage of free blocks %d,
1640169942Sobrien>&-1248	lelong		0		TIME optimization
1641169942Sobrien>&-1248	lelong		1		SPACE optimization
1642169942Sobrien
1643169942Sobrien9564	belong		0x00011954	Unix Fast File system [v1] (big-endian),
1644169942Sobrien>7168   belong		0x4c41424c	Apple UFS Volume
1645111658Sobrien>>7186  string		x		named %s,
1646111658Sobrien>>7176  belong		x		volume label version %d,
1647111658Sobrien>>7180  bedate		x		created on %s,
164880588Sobrien>8404	string		x		last mounted on %s,
164984685Sobrien#>9504	bedate		x		last checked at %s,
165084685Sobrien>8224	bedate		x		last written at %s,
165184685Sobrien>8401	byte		x		clean flag %d,
165280588Sobrien>8228	belong		x		number of blocks %d,
165380588Sobrien>8232	belong		x		number of data blocks %d,
165480588Sobrien>8236	belong		x		number of cylinder groups %d,
165584685Sobrien>8240	belong		x		block size %d,
165684685Sobrien>8244	belong		x		fragment size %d,
165784685Sobrien>8252	belong		x		minimum percentage of free blocks %d,
165884685Sobrien>8256	belong		x		rotational delay %dms,
165984685Sobrien>8260	belong		x		disk rotational speed %drps,
166080588Sobrien>8320	belong		0		TIME optimization
166180588Sobrien>8320	belong		1		SPACE optimization
166280588Sobrien
1663169942Sobrien42332	belong		0x19540119	Unix Fast File system [v2] (big-endian)
1664169942Sobrien>&-1164	string		x		last mounted on %s,
1665169942Sobrien>&-696	string		>\0		volume name %s,
1666169942Sobrien>&-304	beqldate	x		last written at %s,
1667169942Sobrien>&-1167	byte		x		clean flag %d,
1668169942Sobrien>&-1168	byte		x		readonly flag %d,
1669169942Sobrien>&-296	bequad		x		number of blocks %lld,
1670169942Sobrien>&-288	bequad		x		number of data blocks %lld,
1671169942Sobrien>&-1332	belong		x		number of cylinder groups %d,
1672169942Sobrien>&-1328	belong		x		block size %d,
1673169942Sobrien>&-1324	belong		x		fragment size %d,
1674169942Sobrien>&-180	belong		x		average file size %d,
1675169942Sobrien>&-176	belong		x		average number of files in dir %d,
1676169942Sobrien>&-272	bequad		x		pending blocks to free %lld,
1677267843Sdelphij>&-264	belong		x		pending inodes to free %d,
1678169942Sobrien>&-664	bequad		x		system-wide uuid %0llx,
1679169942Sobrien>&-1316	belong		x		minimum percentage of free blocks %d,
1680169942Sobrien>&-1248	belong		0		TIME optimization
1681169942Sobrien>&-1248	belong		1		SPACE optimization
1682169942Sobrien
1683169942Sobrien66908	belong		0x19540119	Unix Fast File system [v2] (big-endian)
1684169942Sobrien>&-1164	string		x		last mounted on %s,
1685169942Sobrien>&-696	string		>\0		volume name %s,
1686169942Sobrien>&-304	beqldate	x		last written at %s,
1687169942Sobrien>&-1167	byte		x		clean flag %d,
1688169942Sobrien>&-1168	byte		x		readonly flag %d,
1689169942Sobrien>&-296	bequad		x		number of blocks %lld,
1690169942Sobrien>&-288	bequad		x		number of data blocks %lld,
1691169942Sobrien>&-1332	belong		x		number of cylinder groups %d,
1692169942Sobrien>&-1328	belong		x		block size %d,
1693169942Sobrien>&-1324	belong		x		fragment size %d,
1694169942Sobrien>&-180	belong		x		average file size %d,
1695169942Sobrien>&-176	belong		x		average number of files in dir %d,
1696169942Sobrien>&-272	bequad		x		pending blocks to free %lld,
1697267843Sdelphij>&-264	belong		x		pending inodes to free %d,
1698169942Sobrien>&-664	bequad		x		system-wide uuid %0llx,
1699169942Sobrien>&-1316	belong		x		minimum percentage of free blocks %d,
1700169942Sobrien>&-1248	belong		0		TIME optimization
1701169942Sobrien>&-1248	belong		1		SPACE optimization
1702169942Sobrien
1703328874Seadler0	ulequad		0xc8414d4dc5523031	HAMMER filesystem (little-endian),
1704328874Seadler>0x90	lelong+1	x			volume %d
1705328874Seadler>0x94	lelong		x			(of %d),
1706328874Seadler>0x50	string		x			name %s,
1707328874Seadler>0x98	ulelong		x			version %u,
1708328874Seadler>0xa0	ulelong		x			flags 0x%x
1709328874Seadler
1710186690Sobrien# ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca>
1711186690Sobrien# ext4 filesystem - Eric Sandeen <sandeen@sandeen.net>
1712226048Sobrien# volume label and UUID Russell Coker
1713354939Sdelphij# https://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
1714186690Sobrien0x438   leshort         0xEF53          Linux
1715186690Sobrien>0x44c  lelong          x               rev %d
1716186690Sobrien>0x43e  leshort         x               \b.%d
1717186690Sobrien# No journal?  ext2
1718186690Sobrien>0x45c  lelong          ^0x0000004      ext2 filesystem data
1719186690Sobrien>>0x43a leshort         ^0x0000001      (mounted or unclean)
1720186690Sobrien# Has a journal?  ext3 or ext4
1721186690Sobrien>0x45c  lelong          &0x0000004
1722186690Sobrien#  and small INCOMPAT?
1723186690Sobrien>>0x460 lelong          <0x0000040
1724186690Sobrien#   and small RO_COMPAT?
1725186690Sobrien>>>0x464 lelong         <0x0000008      ext3 filesystem data
1726186690Sobrien#   else large RO_COMPAT?
1727186690Sobrien>>>0x464 lelong         >0x0000007      ext4 filesystem data
1728186690Sobrien#  else large INCOMPAT?
1729226048Sobrien>>0x460	lelong          >0x000003f      ext4 filesystem data
1730226048Sobrien>0x468	belong		x		\b, UUID=%08x
1731226048Sobrien>0x46c	beshort		x		\b-%04x
1732226048Sobrien>0x46e	beshort		x		\b-%04x
1733226048Sobrien>0x470	beshort		x		\b-%04x
1734226048Sobrien>0x472	belong		x		\b-%08x
1735226048Sobrien>0x476	beshort		x		\b%04x
1736226048Sobrien>0x478	string		>0		\b, volume name "%s"
1737186690Sobrien# General flags for any ext* fs
1738226048Sobrien>0x460	lelong          &0x0000004      (needs journal recovery)
1739226048Sobrien>0x43a	leshort         &0x0000002      (errors)
1740186690Sobrien# INCOMPAT flags
1741226048Sobrien>0x460	lelong          &0x0000001      (compressed)
1742226048Sobrien#>0x460	lelong          &0x0000002      (filetype)
1743226048Sobrien#>0x460	lelong          &0x0000010      (meta bg)
1744226048Sobrien>0x460	lelong          &0x0000040      (extents)
1745226048Sobrien>0x460	lelong          &0x0000080      (64bit)
1746226048Sobrien#>0x460	lelong          &0x0000100      (mmp)
1747226048Sobrien#>0x460	lelong          &0x0000200      (flex bg)
1748186690Sobrien# RO_INCOMPAT flags
1749226048Sobrien#>0x464	lelong          &0x0000001      (sparse super)
1750226048Sobrien>0x464	lelong          &0x0000002      (large files)
1751226048Sobrien>0x464	lelong          &0x0000008      (huge files)
1752226048Sobrien#>0x464	lelong          &0x0000010      (gdt checksum)
1753226048Sobrien#>0x464	lelong          &0x0000020      (many subdirs)
1754226048Sobrien#>0x463	lelong          &0x0000040      (extra isize)
175584685Sobrien
1756337827Seadler# f2fs filesystem - Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
1757337827Seadler0x400	lelong		0xF2F52010	F2FS filesystem
1758337827Seadler>0x46c	belong		x		\b, UUID=%08x
1759337827Seadler>0x470	beshort		x		\b-%04x
1760337827Seadler>0x472	beshort		x		\b-%04x
1761337827Seadler>0x474	beshort		x		\b-%04x
1762337827Seadler>0x476	belong		x		\b-%08x
1763337827Seadler>0x47a	beshort		x		\b%04x
1764337827Seadler>0x147c	lestring16	x		\b, volume name "%s"
1765337827Seadler
1766267843Sdelphij# Minix filesystems - Juan Cespedes <cespedes@debian.org>
1767267843Sdelphij0x410	leshort		0x137f
1768267843Sdelphij!:strength / 2
1769267843Sdelphij>0x402	beshort		< 100
1770288143Sdelphij>0x402	beshort		> -1		Minix filesystem, V1, 14 char names, %d zones
1771267843Sdelphij>0x1e	string		minix		\b, bootable
1772267843Sdelphij0x410	beshort		0x137f
1773267843Sdelphij!:strength / 2
1774267843Sdelphij>0x402	beshort		< 100
1775267843Sdelphij>0x402	beshort		> -1		Minix filesystem, V1 (big endian), %d zones
1776267843Sdelphij>0x1e	string		minix		\b, bootable
1777267843Sdelphij0x410	leshort		0x138f
1778267843Sdelphij!:strength / 2
1779267843Sdelphij>0x402	beshort		< 100
1780267843Sdelphij>0x402	beshort		> -1		Minix filesystem, V1, 30 char names, %d zones
1781267843Sdelphij>0x1e	string		minix		\b, bootable
1782267843Sdelphij0x410	beshort		0x138f
1783267843Sdelphij!:strength / 2
1784267843Sdelphij>0x402	beshort		< 100
1785267843Sdelphij>0x402	beshort		> -1		Minix filesystem, V1, 30 char names (big endian), %d zones
1786267843Sdelphij>0x1e	string		minix		\b, bootable
1787298192Sdelphij# Weak Magic: this is $x
1788298192Sdelphij#0x410	leshort		0x2468
1789298192Sdelphij#>0x402	beshort		< 100
1790298192Sdelphij#>>0x402	beshort		> -1		Minix filesystem, V2, 14 char names
1791298192Sdelphij#>0x1e	string		minix		\b, bootable
1792298192Sdelphij#0x410	beshort		0x2468
1793298192Sdelphij#>0x402	beshort		< 100
1794298192Sdelphij#>0x402	beshort		> -1		Minix filesystem, V2 (big endian)
1795298192Sdelphij#>0x1e	string		minix		\b, bootable
1796298192Sdelphij#0x410	leshort		0x2478
1797298192Sdelphij#>0x402	beshort		< 100
1798298192Sdelphij#>0x402	beshort		> -1		Minix filesystem, V2, 30 char names
1799298192Sdelphij#>0x1e	string		minix		\b, bootable
1800298192Sdelphij#0x410	leshort		0x2478
1801298192Sdelphij#>0x402	beshort		< 100
1802298192Sdelphij#>0x402	beshort		> -1		Minix filesystem, V2, 30 char names
1803298192Sdelphij#>0x1e	string		minix		\b, bootable
1804298192Sdelphij#0x410	beshort		0x2478
1805298192Sdelphij#>0x402	beshort		!0		Minix filesystem, V2, 30 char names (big endian)
1806298192Sdelphij#>0x1e	string		minix		\b, bootable
1807298192Sdelphij# Weak Magic! this is MD
1808298192Sdelphij#0x418	leshort		0x4d5a
1809298192Sdelphij#>0x402	beshort		<100
1810298192Sdelphij#>>0x402	beshort		> -1		Minix filesystem, V3, 60 char names
1811267843Sdelphij
181284685Sobrien# SGI disk labels - Nathan Scott <nathans@debian.org>
181384685Sobrien0	belong		0x0BE5A941	SGI disk label (volume header)
181484685Sobrien
181584685Sobrien# SGI XFS filesystem - Nathan Scott <nathans@debian.org>
181684685Sobrien0	belong		0x58465342	SGI XFS filesystem data
1817133359Sobrien>0x4	belong		x		(blksz %d,
1818133359Sobrien>0x68	beshort		x		inosz %d,
181984685Sobrien>0x64	beshort		^0x2004		v1 dirs)
182084685Sobrien>0x64	beshort		&0x2004		v2 dirs)
1821103373Sobrien
1822103373Sobrien############################################################################
1823103373Sobrien# Minix-ST kernel floppy
1824103373Sobrien0x800	belong		0x46fc2700	Atari-ST Minix kernel image
1825354939Sdelphij# https://en.wikipedia.org/wiki/BIOS_parameter_block
1826267843Sdelphij# floppies with valid BPB and any instruction at beginning
1827267843Sdelphij>19	string		\240\005\371\005\0\011\0\2\0	\b, 720k floppy
1828267843Sdelphij>19	string		\320\002\370\005\0\011\0\1\0	\b, 360k floppy
1829103373Sobrien
1830103373Sobrien############################################################################
1831103373Sobrien# Hmmm, is this a better way of detecting _standard_ floppy images ?
1832267843Sdelphij19	string		\320\002\360\003\0\011\0\1\0	DOS floppy 360k
1833267843Sdelphij>0x1FE	leshort		0xAA55		\b, DOS/MBR hard disk boot sector
1834267843Sdelphij19	string		\240\005\371\003\0\011\0\2\0	DOS floppy 720k
1835267843Sdelphij>0x1FE	leshort		0xAA55		\b, DOS/MBR hard disk boot sector
1836103373Sobrien19	string		\100\013\360\011\0\022\0\2\0	DOS floppy 1440k
1837267843Sdelphij>0x1FE	leshort		0xAA55		\b, DOS/MBR hard disk boot sector
1838103373Sobrien
1839267843Sdelphij19	string		\240\005\371\005\0\011\0\2\0	DOS floppy 720k, IBM
1840267843Sdelphij>0x1FE	leshort		0xAA55		\b, DOS/MBR hard disk boot sector
1841267843Sdelphij19	string		\100\013\371\005\0\011\0\2\0	DOS floppy 1440k, mkdosfs
1842267843Sdelphij>0x1FE	leshort		0xAA55		\b, DOS/MBR hard disk boot sector
1843103373Sobrien
1844267843Sdelphij19	string		\320\002\370\005\0\011\0\1\0	Atari-ST floppy 360k
1845267843Sdelphij19	string		\240\005\371\005\0\011\0\2\0	Atari-ST floppy 720k
1846267843Sdelphij#			|       |   |     |     |
1847267843Sdelphij#			|       |   |     |     heads
1848267843Sdelphij#			|       |   |     sectors/track
1849267843Sdelphij#			|       |   sectors/FAT
1850267843Sdelphij#			|       media descriptor
1851267843Sdelphij#		BPB:	sectors
1852103373Sobrien
1853103373Sobrien#  Valid media descriptor bytes for MS-DOS:
1854103373Sobrien#
1855103373Sobrien#     Byte   Capacity   Media Size and Type
1856103373Sobrien#     -------------------------------------------------
1857103373Sobrien#
1858103373Sobrien#     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
1859103373Sobrien#     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
1860103373Sobrien#     F9     720K       3.5-inch, 2-sided, 9-sector
1861103373Sobrien#     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
1862103373Sobrien#     FD     360K       5.25-inch, 2-sided, 9-sector
1863103373Sobrien#     FF     320K       5.25-inch, 2-sided, 8-sector
1864103373Sobrien#     FC     180K       5.25-inch, 1-sided, 9-sector
1865103373Sobrien#     FE     160K       5.25-inch, 1-sided, 8-sector
1866103373Sobrien#     FE     250K       8-inch, 1-sided, single-density
1867103373Sobrien#     FD     500K       8-inch, 2-sided, single-density
1868103373Sobrien#     FE     1.2 MB     8-inch, 2-sided, double-density
1869328874Seadler#     F8     -----      Fixed disk
1870103373Sobrien#
1871103373Sobrien#     FC     xxxK       Apricot 70x1x9 boot disk.
1872103373Sobrien#
1873103373Sobrien# Originally a bitmap:
1874103373Sobrien#  xxxxxxx0	Not two sided
1875103373Sobrien#  xxxxxxx1	Double sided
1876103373Sobrien#  xxxxxx0x	Not 8 SPT
1877103373Sobrien#  xxxxxx1x	8 SPT
1878103373Sobrien#  xxxxx0xx	Not Removable drive
1879103373Sobrien#  xxxxx1xx	Removable drive
1880103373Sobrien#  11111xxx	Must be one.
1881103373Sobrien#
1882103373Sobrien# But now it's rather random:
1883103373Sobrien#  111111xx	Low density disk
1884103373Sobrien#        00	SS, Not 8 SPT
1885103373Sobrien#        01	DS, Not 8 SPT
1886103373Sobrien#        10	SS, 8 SPT
1887103373Sobrien#        11	DS, 8 SPT
1888103373Sobrien#
1889267843Sdelphij#  11111001	Double density 3 1/2 floppy disk, high density 5 1/4
1890267843Sdelphij#  11110000	High density 3 1/2 floppy disk
1891103373Sobrien#  11111000	Hard disk any format
1892103373Sobrien#
1893103373Sobrien
1894267843Sdelphij# all FAT12 (strength=70) floppies with sectorsize 512 added by Joerg Jenderek at Jun 2013
1895354939Sdelphij# https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
1896267843Sdelphij# Too Weak.
1897328874Seadler#512		ubelong&0xE0ffff00	0xE0ffff00
1898267843Sdelphij# without valid Media descriptor in place of BPB, cases with are done at other places
1899267843Sdelphij#>21		ubyte			<0xE5			floppy with old FAT filesystem
1900267843Sdelphij# but valid Media descriptor at begin of FAT
1901267843Sdelphij#>>512		ubyte			=0xed			720k
1902267843Sdelphij#>>512		ubyte			=0xf0			1440k
1903267843Sdelphij#>>512		ubyte			=0xf8			720k
1904267843Sdelphij#>>512		ubyte			=0xf9			1220k
1905267843Sdelphij#>>512		ubyte			=0xfa			320k
1906267843Sdelphij#>>512		ubyte			=0xfb			640k
1907267843Sdelphij#>>512		ubyte			=0xfc			180k
1908354939Sdelphij# look like an old DOS directory entry
1909328874Seadler#>>>0xA0E	ubequad			0
1910328874Seadler#>>>>0xA00	ubequad			!0
1911267843Sdelphij#!:mime application/x-ima
1912328874Seadler#>>512		ubyte			=0xfd
1913267843Sdelphij# look for 2nd FAT at different location to distinguish between 360k and 500k
1914267843Sdelphij#>>>0x600	ubelong&0xE0ffff00	0xE0ffff00		360k
1915267843Sdelphij#>>>0x500	ubelong&0xE0ffff00	0xE0ffff00		500k
1916328874Seadler#>>>0xA0E	ubequad			0
1917267843Sdelphij#!:mime application/x-ima
1918328874Seadler#>>512		ubyte			=0xfe
1919267843Sdelphij#>>>0x400	ubelong&0xE0ffff00	0xE0ffff00		160k
1920328874Seadler#>>>>0x60E	ubequad			0
1921328874Seadler#>>>>>0x600	ubequad			!0
1922267843Sdelphij#!:mime application/x-ima
1923267843Sdelphij#>>>0xC00	ubelong&0xE0ffff00	0xE0ffff00		1200k
1924267843Sdelphij#>>512		ubyte			=0xff			320k
1925328874Seadler#>>>0x60E	ubequad			0
1926328874Seadler#>>>>0x600	ubequad			!0
1927267843Sdelphij#!:mime application/x-ima
1928267843Sdelphij#>>512		ubyte			x			\b, Media descriptor 0x%x
1929267843Sdelphij# without x86 jump instruction
1930328874Seadler#>>0		ulelong&0x804000E9	!0x000000E9
1931328874Seadler# assembler instructions: CLI;MOV SP,1E7;MOV AX;07c0;MOV
1932267843Sdelphij#>>>0	ubequad				0xfabce701b8c0078e	\b, MS-DOS 1.12 bootloader
1933267843Sdelphij# IOSYS.COM+MSDOS.COM
1934267843Sdelphij#>>>>0xc4	use			2xDOS-filename
1935328874Seadler#>>0		ulelong&0x804000E9	=0x000000E9
1936267843Sdelphij# only x86 short jump instruction found
1937267843Sdelphij#>>>0		ubyte			=0xEB
1938267843Sdelphij#>>>>1		ubyte			x			\b, code offset 0x%x+2
1939354939Sdelphij# https://thestarman.pcministry.com/DOS/ibm100/Boot.htm
1940328874Seadler# assembler instructions: CLI;MOV AX,CS;MOV DS,AX;MOV DX,0
1941328874Seadler#>>>>(1.b+2)	ubequad			0xfa8cc88ed8ba0000	\b, PC-DOS 1.0 bootloader
1942267843Sdelphij# ibmbio.com+ibmdos.com
1943267843Sdelphij#>>>>>0x176	use			DOS-filename
1944267843Sdelphij#>>>>>0x181	ubyte			x			\b+
1945267843Sdelphij#>>>>>0x182	use			DOS-filename
1946354939Sdelphij# https://thestarman.pcministry.com/DOS/ibm110/Boot.htm
1947328874Seadler# assembler instructions: CLI;MOV AX,CS;MOV DS,AX;XOR DX,DX;MOV
1948328874Seadler#>>>>(1.b+2)	ubequad			0xfa8cc88ed833d28e	\b, PC-DOS 1.1 bootloader
1949267843Sdelphij# ibmbio.com+ibmdos.com
1950267843Sdelphij#>>>>>0x18b	use			DOS-filename
1951267843Sdelphij#>>>>>0x196	ubyte			x			\b+
1952267843Sdelphij#>>>>>0x197	use			DOS-filename
1953354939Sdelphij# https://en.wikipedia.org/wiki/Zenith_Data_Systems
1954328874Seadler# assembler instructions: MOV BX,07c0;MOV SS,BX;MOV SP,01c6
1955267843Sdelphij#>>>>(1.b+2)	ubequad			0xbbc0078ed3bcc601	\b, Zenith Data Systems MS-DOS 1.25 bootloader
1956267843Sdelphij# IO.SYS+MSDOS.SYS
1957267843Sdelphij#>>>>>0x20	use			2xDOS-filename
1958354939Sdelphij# https://en.wikipedia.org/wiki/Corona_Data_Systems
1959328874Seadler# assembler instructions: MOV AX,CS;MOV DS,AX;CLI;MOV SS,AX;
1960267843Sdelphij#>>>>(1.b+2)	ubequad			0x8cc88ed8fa8ed0bc	\b, MS-DOS 1.25 bootloader
1961267843Sdelphij# IO.SYS+MSDOS.SYS
1962267843Sdelphij#>>>>>0x69	use			2xDOS-filename
1963328874Seadler# assembler instructions: CLI;PUSH CS;POP SS;MOV SP,7c00;
1964267843Sdelphij#>>>>(1.b+2)	ubequad			0xfa0e17bc007cb860	\b, MS-DOS 2.11 bootloader
1965267843Sdelphij# defect IO.SYS+MSDOS.SYS ?
1966267843Sdelphij#>>>>>0x162	use			2xDOS-filename
1967267843Sdelphij
1968273689Sdelphij0	name				cdrom
1969273689Sdelphij>38913	string   !NSR0      ISO 9660 CD-ROM filesystem data
1970186690Sobrien!:mime	application/x-iso9660-image
1971337827Seadler!:ext	iso/iso9660
1972186690Sobrien>38913	string    NSR0      UDF filesystem data
1973273689Sdelphij!:mime	application/x-iso9660-image
1974337827Seadler!:ext	iso/udf
1975186690Sobrien>>38917	string    1         (version 1.0)
1976186690Sobrien>>38917	string    2         (version 1.5)
1977186690Sobrien>>38917	string    3         (version 2.0)
1978186690Sobrien>>38917	byte     >0x33      (unknown version, ID 0x%X)
1979186690Sobrien>>38917	byte     <0x31      (unknown version, ID 0x%X)
1980309847Sdelphij# The next line is not necessary because the MBR staff is done looking for boot signature
1981284237Sdelphij>0x1FE	leshort  0xAA55     (DOS/MBR boot sector)
1982133359Sobrien# "application id" which appears to be used as a volume label
1983267843Sdelphij>32808	string/T  >\0       '%s'
1984186690Sobrien>34816	string    \000CD001\001EL\ TORITO\ SPECIFICATION    (bootable)
1985186690Sobrien37633	string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
1986186690Sobrien!:mime	application/x-iso9660-image
1987267843Sdelphij32777	string    CDROM     High Sierra CD-ROM filesystem data
1988133359Sobrien
1989273689Sdelphij# CDROM Filesystems
1990273689Sdelphij# https://en.wikipedia.org/wiki/ISO_9660
1991273689Sdelphij# Modified for UDF by gerardo.cacciari@gmail.com
1992273689Sdelphij32769	string    CD001
1993273689Sdelphij# mime line at that position does not work
1994273689Sdelphij# to display CD-ROM (70=81-11) after MBR (113=40+72+1), partition-table (71=50+21) and before Apple Driver Map (51)
1995328874Seadler#!:strength -11
1996273689Sdelphij# to display CD-ROM (114=81+33) before MBR (113=40+72+1), partition-table (71=50+21) and Apple Driver Map (51)
1997362844Sdelphij!:strength +35
1998328874Seadler>0	use	cdrom
1999273689Sdelphij
2000337827Seadler# URL: https://en.wikipedia.org/wiki/NRG_(file_format)
2001337827Seadler# Reference: https://dl.opendesktop.org/api/files/download/id/1460731811/
2002337827Seadler#	11577-mount-iso-0.9.5.tar.bz2/mount-iso-0.9.5/install.sh
2003337827Seadler# From: Joerg Jenderek
2004337827Seadler# Note:	Only for nero disc with once (DAO) type after 300 KB header
2005337827Seadler339969	string    CD001	Nero CD image at 0x4B000
2006337827Seadler!:mime	application/x-nrg
2007337827Seadler!:ext	nrg
2008337827Seadler>307200	use cdrom
2009337827Seadler
2010226048Sobrien# .cso files
2011354939Sdelphij# Reference: https://pismotec.com/ciso/ciso.h
2012328874Seadler# NOTE: There are two other formats with the same magic but
2013328874Seadler# completely incompatible specifications:
2014328874Seadler# - GameCube/Wii CISO: https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/DiscIO/CISOBlob.h
2015328874Seadler# - PSP CISO: https://github.com/jamie/ciso/blob/master/ciso.h
2016328874Seadler0    string    CISO
2017328874Seadler# Other fields are used to determine what type of CISO this is:
2018328874Seadler# - 0x04 == 0x00200000: GameCube/Wii CISO (block_size)
2019328874Seadler# - 0x10 == 0x00000800: PSP CISO (ISO-9660 sector size)
2020354939Sdelphij# - 0x10 == 0x00004000: For >2GB files using maxcso...
2021354939Sdelphij# 			https://github.com/unknownbrackets/maxcso/issues/26
2022328874Seadler# - None of the above: Compact ISO.
2023328874Seadler>4	lelong	!0
2024328874Seadler>>4	lelong	!0x200000
2025354939Sdelphij>>>16	lelong	!0x800
2026354939Sdelphij>>>>16	lelong	!0x4000		Compressed ISO CD image
2027226048Sobrien
2028133359Sobrien# cramfs filesystem - russell@coker.com.au
2029133359Sobrien0       lelong    0x28cd3d45      Linux Compressed ROM File System data, little endian
2030267843Sdelphij>4      lelong  x size %u
2031133359Sobrien>8      lelong  &1 version #2
2032133359Sobrien>8      lelong  &2 sorted_dirs
2033133359Sobrien>8      lelong  &4 hole_support
2034133359Sobrien>32     lelong  x CRC 0x%x,
2035267843Sdelphij>36     lelong  x edition %u,
2036267843Sdelphij>40     lelong  x %u blocks,
2037267843Sdelphij>44     lelong  x %u files
2038133359Sobrien
2039133359Sobrien0       belong    0x28cd3d45      Linux Compressed ROM File System data, big endian
2040267843Sdelphij>4      belong  x size %u
2041133359Sobrien>8      belong  &1 version #2
2042133359Sobrien>8      belong  &2 sorted_dirs
2043133359Sobrien>8      belong  &4 hole_support
2044133359Sobrien>32     belong  x CRC 0x%x,
2045267843Sdelphij>36     belong  x edition %u,
2046267843Sdelphij>40     belong  x %u blocks,
2047267843Sdelphij>44     belong  x %u files
2048133359Sobrien
2049133359Sobrien# reiserfs - russell@coker.com.au
2050133359Sobrien0x10034		string	ReIsErFs	ReiserFS V3.5
2051133359Sobrien0x10034		string	ReIsEr2Fs	ReiserFS V3.6
2052226048Sobrien0x10034		string	ReIsEr3Fs	ReiserFS V3.6.19
2053133359Sobrien>0x1002c 	leshort	x		block size %d
2054133359Sobrien>0x10032	leshort	&2		(mounted or unclean)
2055133359Sobrien>0x10000	lelong	x		num blocks %d
2056133359Sobrien>0x10040	lelong	1		tea hash
2057133359Sobrien>0x10040	lelong	2		yura hash
2058133359Sobrien>0x10040	lelong	3		r5 hash
2059133359Sobrien
2060133359Sobrien# EST flat binary format (which isn't, but anyway)
2061133359Sobrien# From: Mark Brown <broonie@sirena.org.uk>
2062133359Sobrien0	string	ESTFBINR	EST flat binary
2063133359Sobrien
2064133359Sobrien# Aculab VoIP firmware
2065133359Sobrien# From: Mark Brown <broonie@sirena.org.uk>
2066133359Sobrien0	string	VoIP\ Startup\ and	Aculab VoIP firmware
2067133359Sobrien>35	string	x	format %s
2068133359Sobrien
2069226048Sobrien# From: Mark Brown <broonie@sirena.org.uk> [old]
2070226048Sobrien# From: Behan Webster <behanw@websterwood.com>
2071226048Sobrien0	belong	0x27051956	u-boot legacy uImage,
2072226048Sobrien>32	string	x		%s,
2073226048Sobrien>28	byte	0		Invalid os/
2074226048Sobrien>28	byte	1		OpenBSD/
2075226048Sobrien>28	byte	2		NetBSD/
2076226048Sobrien>28	byte	3		FreeBSD/
2077226048Sobrien>28	byte	4		4.4BSD/
2078226048Sobrien>28	byte	5		Linux/
2079226048Sobrien>28	byte	6		SVR4/
2080226048Sobrien>28	byte	7		Esix/
2081226048Sobrien>28	byte	8		Solaris/
2082226048Sobrien>28	byte	9		Irix/
2083226048Sobrien>28	byte	10		SCO/
2084226048Sobrien>28	byte	11		Dell/
2085226048Sobrien>28	byte	12		NCR/
2086226048Sobrien>28	byte	13		LynxOS/
2087226048Sobrien>28	byte	14		VxWorks/
2088226048Sobrien>28	byte	15		pSOS/
2089226048Sobrien>28	byte	16		QNX/
2090226048Sobrien>28	byte	17		Firmware/
2091226048Sobrien>28	byte	18		RTEMS/
2092226048Sobrien>28	byte	19		ARTOS/
2093226048Sobrien>28	byte	20		Unity OS/
2094226048Sobrien>28	byte	21		INTEGRITY/
2095226048Sobrien>29	byte	0		\bInvalid CPU,
2096226048Sobrien>29	byte	1		\bAlpha,
2097226048Sobrien>29	byte	2		\bARM,
2098226048Sobrien>29	byte	3		\bIntel x86,
2099226048Sobrien>29	byte	4		\bIA64,
2100226048Sobrien>29	byte	5		\bMIPS,
2101226048Sobrien>29	byte	6		\bMIPS 64-bit,
2102226048Sobrien>29	byte	7		\bPowerPC,
2103226048Sobrien>29	byte	8		\bIBM S390,
2104226048Sobrien>29	byte	9		\bSuperH,
2105226048Sobrien>29	byte	10		\bSparc,
2106226048Sobrien>29	byte	11		\bSparc 64-bit,
2107226048Sobrien>29	byte	12		\bM68K,
2108226048Sobrien>29	byte	13		\bNios-32,
2109226048Sobrien>29	byte	14		\bMicroBlaze,
2110226048Sobrien>29	byte	15		\bNios-II,
2111226048Sobrien>29	byte	16		\bBlackfin,
2112226048Sobrien>29	byte	17		\bAVR32,
2113226048Sobrien>29	byte	18		\bSTMicroelectronics ST200,
2114328874Seadler>29	byte	19		\bSandbox architecture,
2115328874Seadler>29	byte	20		\bANDES Technology NDS32,
2116328874Seadler>29	byte	21		\bOpenRISC 1000,
2117328874Seadler>29	byte	22		\bARM 64-bit,
2118328874Seadler>29	byte	23		\bDesignWare ARC,
2119328874Seadler>29	byte	24		\bx86_64,
2120328874Seadler>29	byte	25		\bXtensa,
2121360521Sdelphij>29	byte	26		\bRISC-V,
2122226048Sobrien>30	byte	0		Invalid Image
2123226048Sobrien>30	byte	1		Standalone Program
2124226048Sobrien>30	byte	2		OS Kernel Image
2125226048Sobrien>30	byte	3		RAMDisk Image
2126226048Sobrien>30	byte	4		Multi-File Image
2127226048Sobrien>30	byte	5		Firmware Image
2128226048Sobrien>30	byte	6		Script File
2129226048Sobrien>30	byte	7		Filesystem Image (any type)
2130226048Sobrien>30	byte	8		Binary Flat Device Tree BLOB
2131226048Sobrien>31	byte	0		(Not compressed),
2132226048Sobrien>31	byte	1		(gzip),
2133226048Sobrien>31	byte	2		(bzip2),
2134226048Sobrien>31	byte	3		(lzma),
2135226048Sobrien>12	belong	x		%d bytes,
2136226048Sobrien>8	bedate	x		%s,
2137226048Sobrien>16	belong	x		Load Address: 0x%08X,
2138226048Sobrien>20	belong	x		Entry Point: 0x%08X,
2139226048Sobrien>4	belong	x		Header CRC: 0x%08X,
2140226048Sobrien>24	belong	x		Data CRC: 0x%08X
2141133359Sobrien
2142133359Sobrien# JFFS2 file system
2143169942Sobrien0	leshort	0x1984		Linux old jffs2 filesystem data little endian
2144360521Sdelphij0	beshort	0x1984		Linux old jffs2 filesystem data big endian
2145169942Sobrien0	leshort	0x1985		Linux jffs2 filesystem data little endian
2146360521Sdelphij0	beshort	0x1985		Linux jffs2 filesystem data big endian
2147159764Sobrien
2148159764Sobrien# Squashfs
2149360521Sdelphij0	name	squashfs
2150159764Sobrien>28	beshort	x	version %d.
2151360521Sdelphij>30	beshort	x	\b%d,
2152360521Sdelphij>20	beshort 0	uncompressed,
2153360521Sdelphij>20	beshort 1	zlib
2154360521Sdelphij>20	beshort 2	lzma
2155360521Sdelphij>20	beshort 3	lzo
2156360521Sdelphij>20	beshort 4	xz
2157360521Sdelphij>20	beshort 5	lz4
2158360521Sdelphij>20	beshort 6	zstd
2159360521Sdelphij>20	beshort >0	compressed,
2160169942Sobrien>28	beshort <3
2161169942Sobrien>>8	belong	x	%d bytes,
2162169942Sobrien>28	beshort >2
2163360521Sdelphij>>28	beshort <4
2164226048Sobrien>>>63	bequad x	%lld bytes,
2165360521Sdelphij>>28	beshort >3
2166226048Sobrien>>>40	bequad x	%lld bytes,
2167169942Sobrien#>>67	belong	x	%d bytes,
2168159764Sobrien>4	belong	x	%d inodes,
2169159764Sobrien>28	beshort <2
2170159764Sobrien>>32	beshort	x	blocksize: %d bytes,
2171159764Sobrien>28	beshort >1
2172360521Sdelphij>>28	beshort <4
2173226048Sobrien>>>51	belong	x	blocksize: %d bytes,
2174360521Sdelphij>>28	beshort >3
2175226048Sobrien>>>12	belong	x	blocksize: %d bytes,
2176360521Sdelphij>28	beshort <4
2177226048Sobrien>>39	bedate	x	created: %s
2178360521Sdelphij>28	beshort >3
2179226048Sobrien>>8	bedate	x	created: %s
2180360521Sdelphij
2181360521Sdelphij0	string	sqsh	Squashfs filesystem, big endian,
2182360521Sdelphij>0	use	squashfs
2183360521Sdelphij
2184159764Sobrien0	string	hsqs	Squashfs filesystem, little endian,
2185362844Sdelphij>0	use	\^squashfs
2186159764Sobrien
2187159764Sobrien# AFS Dump Magic
2188328874Seadler# From: Ty Sarna <tsarna@sarna.org>
2189159764Sobrien0       string                  \x01\xb3\xa1\x13\x22    AFS Dump
2190159764Sobrien>&0     belong                  x                       (v%d)
2191159764Sobrien>>&0    byte                    0x76
2192159764Sobrien>>>&0   belong                  x                       Vol %d,
2193159764Sobrien>>>>&0  byte                    0x6e
2194159764Sobrien>>>>>&0 string                  x                       %s
2195159764Sobrien>>>>>>&1        byte            0x74
2196159764Sobrien>>>>>>>&0       beshort         2
2197159764Sobrien>>>>>>>>&4      bedate          x                       on: %s
2198159764Sobrien>>>>>>>>&0      bedate          =0                      full dump
2199159764Sobrien>>>>>>>>&0      bedate          !0                      incremental since: %s
2200169942Sobrien
2201169962Sobrien#----------------------------------------------------------
2202226048Sobrien#delta ISO    Daniel Novotny (dnovotny@redhat.com)
2203226048Sobrien0	string  DISO	Delta ISO data
2204275698Sdelphij!:strength +50
2205226048Sobrien>4	belong  x	version %d
2206226048Sobrien
2207169942Sobrien# VMS backup savesets - gerardo.cacciari@gmail.com
2208169962Sobrien#
2209169962Sobrien4            string  \x01\x00\x01\x00\x01\x00
2210169962Sobrien>(0.s+16)    string  \x01\x01
2211169962Sobrien>>&(&0.b+8)  byte    0x42       OpenVMS backup saveset data
2212169962Sobrien>>>40        lelong  x          (block size %d,
2213169962Sobrien>>>49        string  >\0        original name '%s',
2214169962Sobrien>>>2         short   1024       VAX generated)
2215169962Sobrien>>>2         short   2048       AXP generated)
2216169962Sobrien>>>2         short   4096       I64 generated)
2217169962Sobrien
2218186690Sobrien# Summary: Oracle Clustered Filesystem
2219186690Sobrien# Created by: Aaron Botsis <redhat@digitalmafia.org>
2220186690Sobrien8	string		OracleCFS	Oracle Clustered Filesystem,
2221186690Sobrien>4	long		x		rev %d
2222186690Sobrien>0	long		x		\b.%d,
2223186690Sobrien>560	string		x		label: %.64s,
2224186690Sobrien>136	string		x		mountpoint: %.128s
2225186690Sobrien
2226186690Sobrien# Summary: Oracle ASM tagged volume
2227186690Sobrien# Created by: Aaron Botsis <redhat@digitalmafia.org>
2228186690Sobrien32	string		ORCLDISK	Oracle ASM Volume,
2229186690Sobrien>40	string		x		Disk Name: %0.12s
2230186690Sobrien32	string		ORCLCLRD	Oracle ASM Volume (cleared),
2231186690Sobrien>40	string		x		Disk Name: %0.12s
2232186690Sobrien
2233186690Sobrien# Oracle Clustered Filesystem - Aaron Botsis <redhat@digitalmafia.org>
2234186690Sobrien8	string		OracleCFS	Oracle Clustered Filesystem,
2235186690Sobrien>4	long		x		rev %d
2236186690Sobrien>0	long		x		\b.%d,
2237186690Sobrien>560	string		x		label: %.64s,
2238186690Sobrien>136	string		x		mountpoint: %.128s
2239186690Sobrien
2240186690Sobrien# Oracle ASM tagged volume - Aaron Botsis <redhat@digitalmafia.org>
2241186690Sobrien32	string		ORCLDISK	Oracle ASM Volume,
2242186690Sobrien>40	string		x		Disk Name: %0.12s
2243186690Sobrien32	string		ORCLCLRD	Oracle ASM Volume (cleared),
2244186690Sobrien>40	string		x		Disk Name: %0.12s
2245186690Sobrien
2246169962Sobrien# Compaq/HP RILOE floppy image
2247169962Sobrien# From: Dirk Jagdmann <doj@cubic.org>
2248169962Sobrien0	string	CPQRFBLO	Compaq/HP RILOE floppy image
2249169962Sobrien
2250169962Sobrien#------------------------------------------------------------------------------
2251226048Sobrien# Files-11 On-Disk Structure (File system for various RSX-11 and VMS flavours).
2252226048Sobrien# These bits come from LBN 1 (home block) of ODS-1, ODS-2 and ODS-5 volumes,
2253226048Sobrien# which is mapped to VBN 2 of [000000]INDEXF.SYS;1 - gerardo.cacciari@gmail.com
2254169962Sobrien#
2255226048Sobrien1008    string          DECFILE11       Files-11 On-Disk Structure
2256226048Sobrien>525    byte            x               (ODS-%d);
2257226048Sobrien>1017   string          A               RSX-11, VAX/VMS or OpenVMS VAX file system;
2258226048Sobrien>1017   string          B
2259226048Sobrien>>525   byte            2               VAX/VMS or OpenVMS file system;
2260226048Sobrien>>525   byte            5               OpenVMS Alpha or Itanium file system;
2261169962Sobrien>984    string          x               volume label is '%-12.12s'
2262175296Sobrien
2263175296Sobrien# From: Thomas Klausner <wiz@NetBSD.org>
2264354939Sdelphij# https://filext.com/file-extension/DAA
2265175296Sobrien# describes the daa file format. The magic would be:
2266175296Sobrien0	string		DAA\x0\x0\x0\x0\x0	PowerISO Direct-Access-Archive
2267186690Sobrien
2268186690Sobrien# From Albert Cahalan <acahalan@gmail.com>
2269186690Sobrien# really le32 operation,destination,payloadsize (but quite predictable)
2270186690Sobrien# 01 00 00 00 00 00 00 c0 00 02 00 00
2271186690Sobrien0	string		\1\0\0\0\0\0\0\300\0\2\0\0	Marvell Libertas firmware
2272186690Sobrien
2273186690Sobrien# From Eric Sandeen
2274186690Sobrien# GFS2
2275226048Sobrien0x10000         belong          0x01161970
2276226048Sobrien>0x10018        belong          0x0000051d      GFS1 Filesystem
2277226048Sobrien>>0x10024        belong          x               (blocksize %d,
2278226048Sobrien>>0x10060        string          >\0             lockproto %s)
2279226048Sobrien>0x10018        belong          0x00000709      GFS2 Filesystem
2280226048Sobrien>>0x10024        belong          x               (blocksize %d,
2281226048Sobrien>>0x10060        string          >\0             lockproto %s)
2282186690Sobrien
2283288143Sdelphij# Russell Coker <russell@coker.com.au>
2284288143Sdelphij0x10040		string	_BHRfS_M	BTRFS Filesystem
2285288143Sdelphij>0x1012b	string	>\0		label "%s",
2286288143Sdelphij>0x10090	lelong	x		sectorsize %d,
2287288143Sdelphij>0x10094	lelong	x		nodesize %d,
2288288143Sdelphij>0x10098	lelong	x		leafsize %d,
2289298192Sdelphij>0x10020	belong	x		UUID=%08x-
2290298192Sdelphij>0x10024	beshort	x		\b%04x-
2291298192Sdelphij>0x10026	beshort	x		\b%04x-
2292298192Sdelphij>0x10028	beshort	x		\b%04x-
2293298192Sdelphij>0x1002a	beshort	x		\b%04x
2294298192Sdelphij>0x1002c	belong	x		\b%08x,
2295288143Sdelphij>0x10078	lequad	x		%lld/
2296288143Sdelphij>0x10070	lequad	x		\b%lld bytes used,
2297288143Sdelphij>0x10088	lequad	x		%lld devices
2298191736Sobrien
2299186690Sobrien# dvdisaster's .ecc
2300186690Sobrien# From: "Nelson A. de Oliveira" <naoliv@gmail.com>
2301186690Sobrien0	string	*dvdisaster*	dvdisaster error correction file
2302226048Sobrien
2303328874Seadler# xfs metadump image
2304226048Sobrien# mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
2305226048Sobrien# but can we do the << ?  For now it's always 512 (0x200) anyway.
2306226048Sobrien0	string XFSM
2307226048Sobrien>0x200	string XFSB	XFS filesystem metadump image
2308226048Sobrien
2309226048Sobrien# Type:	CROM filesystem
2310226048Sobrien# From:	Werner Fink <werner@suse.de>
2311226048Sobrien0	string	CROMFS	CROMFS
2312226048Sobrien>6	string	>\0	\b version %2.2s,
2313226048Sobrien>8	ulequad	>0	\b block data at %lld,
2314226048Sobrien>16	ulequad	>0	\b fblock table at %lld,
2315226048Sobrien>24	ulequad	>0	\b inode table at %lld,
2316226048Sobrien>32	ulequad	>0	\b root at %lld,
2317267843Sdelphij>40	ulelong	>0	\b fblock size = %d,
2318267843Sdelphij>44	ulelong	>0	\b block size = %d,
2319226048Sobrien>48	ulequad	>0	\b bytes = %lld
2320226048Sobrien
2321226048Sobrien# Type:	xfs metadump image
2322226048Sobrien# From:	Daniel Novotny <dnovotny@redhat.com>
2323226048Sobrien# mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
2324226048Sobrien# but can we do the << ? For now it's always 512 (0x200) anyway.
2325226048Sobrien0	string	XFSM
2326226048Sobrien>0x200	string	XFSB	XFS filesystem metadump image
2327226048Sobrien
2328226048Sobrien# Type:	delta ISO
2329226048Sobrien# From:	Daniel Novotny <dnovotny@redhat.com>
2330226048Sobrien0	string	DISO	Delta ISO data,
2331226048Sobrien>4	belong	x	version %d
2332226048Sobrien
2333226048Sobrien# JFS2 (Journaling File System) image. (Old JFS1 has superblock at 0x1000.)
2334226048Sobrien# See linux/fs/jfs/jfs_superblock.h for layout; see jfs_filsys.h for flags.
2335226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com>
2336226048Sobrien0x8000	string	JFS1
2337226048Sobrien# Because it's text-only magic, check a binary value (version) to be sure.
2338226048Sobrien# Should always be 2, but mkfs.jfs writes it as 1. Needs to be 2 or 1 to be
2339226048Sobrien# mountable.
2340226048Sobrien>&0	lelong	<3	JFS2 filesystem image
2341226048Sobrien# Label is followed by a UUID; we have to limit string length to avoid
2342226048Sobrien# appending the UUID in the case of a 16-byte label.
2343226048Sobrien>>&144	regex	[\x20-\x7E]{1,16}	(label "%s")
2344226048Sobrien>>&0	lequad	x	\b, %lld blocks
2345226048Sobrien>>&8	lelong	x	\b, blocksize %d
2346226048Sobrien>>&32	lelong&0x00000006	>0	(dirty)
2347226048Sobrien>>&36	lelong	>0	(compressed)
2348267843Sdelphij
2349267843Sdelphij# LFS
2350267843Sdelphij0	lelong	0x070162	LFS filesystem image
2351267843Sdelphij>4	lelong	1		version 1,
2352267843Sdelphij>>8	lelong	x		\b blocks %u,
2353267843Sdelphij>>12	lelong	x		\b blocks per segment %u,
2354267843Sdelphij>4	lelong	2		version 2,
2355267843Sdelphij>>8	lelong	x		\b fragments %u,
2356267843Sdelphij>>12	lelong	x		\b bytes per segment %u,
2357267843Sdelphij>16	lelong	x		\b disk blocks %u,
2358267843Sdelphij>20	lelong	x		\b block size %u,
2359267843Sdelphij>24	lelong	x		\b fragment size %u,
2360267843Sdelphij>28	lelong	x		\b fragments per block %u,
2361267843Sdelphij>32	lelong	x		\b start for free list %u,
2362267843Sdelphij>36	lelong	x		\b number of free blocks %d,
2363267843Sdelphij>40	lelong	x		\b number of files %u,
2364267843Sdelphij>44	lelong	x		\b blocks available for writing %d,
2365267843Sdelphij>48	lelong	x		\b inodes in cache %d,
2366267843Sdelphij>52	lelong	x		\b inode file disk address 0x%x,
2367267843Sdelphij>56	lelong	x		\b inode file inode number %u,
2368267843Sdelphij>60	lelong	x		\b address of last segment written 0x%x,
2369267843Sdelphij>64	lelong	x		\b address of next segment to write 0x%x,
2370267843Sdelphij>68	lelong	x		\b address of current segment written 0x%x
2371267843Sdelphij
2372267843Sdelphij0	string	td\000		floppy image data (TeleDisk, compressed)
2373267843Sdelphij0	string	TD\000		floppy image data (TeleDisk)
2374267843Sdelphij
2375328874Seadler0	string	CQ\024		floppy image data (CopyQM,
2376328874Seadler>16	leshort	x		%d sectors,
2377267843Sdelphij>18	leshort	x		%d heads.)
2378267843Sdelphij
2379267843Sdelphij0	string	ACT\020Apricot\020disk\020image\032\004	floppy image data (ApriDisk)
2380267843Sdelphij
2381267843Sdelphij0	beshort	0xAA58		floppy image data (IBM SaveDskF, old)
2382267843Sdelphij0	beshort	0xAA59		floppy image data (IBM SaveDskF)
2383267843Sdelphij0	beshort	0xAA5A		floppy image data (IBM SaveDskF, compressed)
2384267843Sdelphij
2385267843Sdelphij0	string	\074CPM_Disk\076	disk image data (YAZE)
2386267843Sdelphij
2387267843Sdelphij# ReFS
2388267843Sdelphij# Richard W.M. Jones <rjones@redhat.com>
2389267843Sdelphij0	string	\0\0\0ReFS\0	ReFS filesystem image
2390267843Sdelphij
2391267843Sdelphij# EFW encase image file format:
2392267843Sdelphij# Gregoire Passault
2393267843Sdelphij# http://www.forensicswiki.org/wiki/Encase_image_file_format
2394267843Sdelphij0	string	EVF\x09\x0d\x0a\xff\x00	EWF/Expert Witness/EnCase image file format
2395267843Sdelphij
2396267843Sdelphij# UBIfs
2397267843Sdelphij# Linux kernel sources: fs/ubifs/ubifs-media.h
2398273689Sdelphij0	lelong	0x06101831
2399273689Sdelphij>0x16	leshort	0		UBIfs image
2400273689Sdelphij>0x08	lequad	x		\b, sequence number %llu
2401273689Sdelphij>0x10	leshort x		\b, length %u
2402273689Sdelphij>0x04	lelong	x		\b, CRC 0x%08x
2403267843Sdelphij
2404273689Sdelphij0	lelong	0x23494255
2405273689Sdelphij>0x04	leshort	<2
2406273689Sdelphij>0x05	string	\0\0\0
2407273689Sdelphij>0x1c	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
2408273689Sdelphij>0x04	leshort	x		UBI image, version %u
2409273689Sdelphij
2410273689Sdelphij# NEC PC-88 2D disk image
2411273689Sdelphij# From Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net>
2412273689Sdelphij0x20		ulelong&0xFFFFFEFF	0x2A0
2413273689Sdelphij>0x10		string			\0\0\0\0\0\0\0\0\0\0
2414273689Sdelphij>>0x280		string			\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
2415273689Sdelphij>>>0x1A		ubyte&0xEF		0
2416273689Sdelphij>>>>0x1B	ubyte&0x8F		0
2417273689Sdelphij>>>>>0x1B	ubyte&70		<0x40
2418273689Sdelphij>>>>>>0x1C	ulelong			>0x21
2419273689Sdelphij>>>>>>>0	regex	[[:print:]]*	NEC PC-88 disk image, name=%s
2420273689Sdelphij>>>>>>>>0x1B	ubyte	0		\b, media=2D
2421273689Sdelphij>>>>>>>>0x1B	ubyte	0x10		\b, media=2DD
2422273689Sdelphij>>>>>>>>0x1B	ubyte	0x20		\b, media=2HD
2423273689Sdelphij>>>>>>>>0x1B	ubyte	0x30		\b, media=1D
2424273689Sdelphij>>>>>>>>0x1B	ubyte	0x40		\b, media=1DD
2425273689Sdelphij>>>>>>>>0x1A	ubyte	0x10		\b, write-protected
2426328874Seadler
2427328874Seadler# HDD Raw Copy Tool disk image, file extension: .imgc
2428328874Seadler# From Benjamin Vanheuverzwijn <bvanheu@gmail.com>
2429328874Seadler0	pstring	HDD\ Raw\ Copy\ Tool	%s
2430328874Seadler>0x100	pstring	x			%s
2431328874Seadler>0x200	pstring	x			- HD model: %s
2432328874Seadler#>0x300	pstring	x			unknown %s
2433328874Seadler>0x400	pstring	x			serial: %s
2434328874Seadler#>0x500	pstring	x			unknown: %s
2435328874Seadler!:ext	imgc
2436