xref: /minix3/external/bsd/file/dist/magic/magdir/linux (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1835f6802SDirk Vogt
2ef01931fSBen Gras#------------------------------------------------------------------------------
3*0a6a1f1dSLionel Sambuc# $File: linux,v 1.59 2014/11/03 21:03:36 christos Exp $
4ef01931fSBen Gras# linux:  file(1) magic for Linux files
5ef01931fSBen Gras#
6ef01931fSBen Gras# Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
7ef01931fSBen Gras# The following basic Linux magic is useful for reference, but using
8ef01931fSBen Gras# "long" magic is a better practice in order to avoid collisions.
9ef01931fSBen Gras#
10ef01931fSBen Gras# 2	leshort		100		Linux/i386
11ef01931fSBen Gras# >0	leshort		0407		impure executable (OMAGIC)
12ef01931fSBen Gras# >0	leshort		0410		pure executable (NMAGIC)
13ef01931fSBen Gras# >0	leshort		0413		demand-paged executable (ZMAGIC)
14ef01931fSBen Gras# >0	leshort		0314		demand-paged executable (QMAGIC)
15ef01931fSBen Gras#
16ef01931fSBen Gras0	lelong		0x00640107	Linux/i386 impure executable (OMAGIC)
17ef01931fSBen Gras>16	lelong		0		\b, stripped
18ef01931fSBen Gras0	lelong		0x00640108	Linux/i386 pure executable (NMAGIC)
19ef01931fSBen Gras>16	lelong		0		\b, stripped
20ef01931fSBen Gras0	lelong		0x0064010b	Linux/i386 demand-paged executable (ZMAGIC)
21ef01931fSBen Gras>16	lelong		0		\b, stripped
22ef01931fSBen Gras0	lelong		0x006400cc	Linux/i386 demand-paged executable (QMAGIC)
23ef01931fSBen Gras>16	lelong		0		\b, stripped
24ef01931fSBen Gras#
25ef01931fSBen Gras0	string		\007\001\000	Linux/i386 object file
26ef01931fSBen Gras>20	lelong		>0x1020		\b, DLL library
27ef01931fSBen Gras# Linux-8086 stuff:
28ef01931fSBen Gras0	string		\01\03\020\04	Linux-8086 impure executable
29ef01931fSBen Gras>28	long		!0		not stripped
30ef01931fSBen Gras0	string		\01\03\040\04	Linux-8086 executable
31ef01931fSBen Gras>28	long		!0		not stripped
32ef01931fSBen Gras#
33ef01931fSBen Gras0	string		\243\206\001\0	Linux-8086 object file
34ef01931fSBen Gras#
35ef01931fSBen Gras0	string		\01\03\020\20	Minix-386 impure executable
36ef01931fSBen Gras>28	long		!0		not stripped
37ef01931fSBen Gras0	string		\01\03\040\20	Minix-386 executable
38ef01931fSBen Gras>28	long		!0		not stripped
3984d9c625SLionel Sambuc0	string		\01\03\04\20	Minix-386 NSYM/GNU executable
4084d9c625SLionel Sambuc>28	long		!0		not stripped
41ef01931fSBen Gras# core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
42ef01931fSBen Gras216	lelong		0421		Linux/i386 core file
43*0a6a1f1dSLionel Sambuc!:strength / 2
44ef01931fSBen Gras>220	string		>\0		of '%s'
45ef01931fSBen Gras>200	lelong		>0		(signal %d)
46ef01931fSBen Gras#
47ef01931fSBen Gras# LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
48ef01931fSBen Gras# this can be overridden by the DOS executable (COM) entry
49ef01931fSBen Gras2	string		LILO		Linux/i386 LILO boot/chain loader
50ef01931fSBen Gras#
51835f6802SDirk Vogt# Linux make config build file, from Ole Aamot <oka@oka.no>
52*0a6a1f1dSLionel Sambuc# Updated by Ken Sharp
53*0a6a1f1dSLionel Sambuc28	string		make\ config		Linux make config build file (old)
54*0a6a1f1dSLionel Sambuc49	search/70	Kernel\ Configuration	Linux make config build file
55*0a6a1f1dSLionel Sambuc
56835f6802SDirk Vogt#
57ef01931fSBen Gras# PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
58835f6802SDirk Vogt# Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
59835f6802SDirk Vogt# See: http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
60835f6802SDirk Vogt0	leshort		0x0436		Linux/i386 PC Screen Font v1 data,
61835f6802SDirk Vogt>2	byte&0x01	0		256 characters,
62835f6802SDirk Vogt>2	byte&0x01	!0		512 characters,
63835f6802SDirk Vogt>2	byte&0x02	0		no directory,
64835f6802SDirk Vogt>2	byte&0x02	!0		Unicode directory,
65ef01931fSBen Gras>3	byte		>0		8x%d
66835f6802SDirk Vogt0	string		\x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data,
67835f6802SDirk Vogt>16	lelong		x		%d characters,
68835f6802SDirk Vogt>12	lelong&0x01	0		no directory,
69835f6802SDirk Vogt>12	lelong&0x01	!0		Unicode directory,
70835f6802SDirk Vogt>24	lelong		x		%d
71835f6802SDirk Vogt>28	lelong		x		\bx%d
72835f6802SDirk Vogt
73ef01931fSBen Gras# Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
74ef01931fSBen Gras4086	string		SWAP-SPACE	Linux/i386 swap file
75ef01931fSBen Gras# From: Jeff Bailey <jbailey@ubuntu.com>
76ef01931fSBen Gras# Linux swap file with swsusp1 image, from Jeff Bailey <jbailey@ubuntu.com>
77ef01931fSBen Gras4076	string		SWAPSPACE2S1SUSPEND	Linux/i386 swap file (new style) with SWSUSP1 image
78835f6802SDirk Vogt# From: James Hunt <james.hunt@ubuntu.com>
79835f6802SDirk Vogt4076    string          SWAPSPACE2LINHIB0001    Linux/i386 swap file (new style) (compressed hibernate)
80ef01931fSBen Gras# according to man page of mkswap (8) March 1999
81835f6802SDirk Vogt# volume label and UUID Russell Coker
82835f6802SDirk Vogt# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
83835f6802SDirk Vogt4086	string		SWAPSPACE2	Linux/i386 swap file (new style),
84835f6802SDirk Vogt>0x400	long		x		version %d (4K pages),
85835f6802SDirk Vogt>0x404	long		x		size %d pages,
86835f6802SDirk Vogt>1052	string		\0		no label,
87835f6802SDirk Vogt>1052	string		>\0		LABEL=%s,
88835f6802SDirk Vogt>0x40c	belong		x		UUID=%08x
89835f6802SDirk Vogt>0x410	beshort		x		\b-%04x
90835f6802SDirk Vogt>0x412	beshort		x		\b-%04x
91835f6802SDirk Vogt>0x414	beshort		x		\b-%04x
92835f6802SDirk Vogt>0x416	belong		x		\b-%08x
93835f6802SDirk Vogt>0x41a	beshort		x		\b%04x
94835f6802SDirk Vogt# From Daniel Novotny <dnovotny@redhat.com>
95835f6802SDirk Vogt# swap file for PowerPC
96835f6802SDirk Vogt65526	string		SWAPSPACE2	Linux/ppc swap file
9784d9c625SLionel Sambuc16374	string		SWAPSPACE2	Linux/ia64 swap file
98ef01931fSBen Gras#
99ef01931fSBen Gras# Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
100ef01931fSBen Gras# and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
10184d9c625SLionel Sambuc# and Nicolas Lichtmaier <nick@debian.org>
102ef01931fSBen Gras# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
103ef01931fSBen Gras# Linux kernel boot images (i386 arch) (Wolfram Kleff)
104ef01931fSBen Gras514	string		HdrS		Linux kernel
105*0a6a1f1dSLionel Sambuc!:strength + 55
106ef01931fSBen Gras>510	leshort		0xAA55		x86 boot executable
107ef01931fSBen Gras>>518	leshort		>0x1ff
108ef01931fSBen Gras>>>529	byte		0		zImage,
109ef01931fSBen Gras>>>529	byte		1		bzImage,
110*0a6a1f1dSLionel Sambuc>>>526	lelong		>0
111*0a6a1f1dSLionel Sambuc>>>>(526.s+0x200) string	>\0	version %s,
112ef01931fSBen Gras>>498	leshort		1		RO-rootFS,
113ef01931fSBen Gras>>498	leshort		0		RW-rootFS,
114ef01931fSBen Gras>>508	leshort		>0		root_dev 0x%X,
115ef01931fSBen Gras>>502	leshort		>0		swap_dev 0x%X,
116ef01931fSBen Gras>>504	leshort		>0		RAMdisksize %u KB,
117ef01931fSBen Gras>>506	leshort		0xFFFF		Normal VGA
118ef01931fSBen Gras>>506	leshort		0xFFFE		Extended VGA
119ef01931fSBen Gras>>506	leshort		0xFFFD		Prompt for Videomode
120ef01931fSBen Gras>>506	leshort		>0		Video mode %d
121ef01931fSBen Gras# This also matches new kernels, which were caught above by "HdrS".
122ef01931fSBen Gras0		belong	0xb8c0078e	Linux kernel
123ef01931fSBen Gras>0x1e3		string	Loading		version 1.3.79 or older
124ef01931fSBen Gras>0x1e9		string	Loading		from prehistoric times
125ef01931fSBen Gras
12684d9c625SLionel Sambuc# System.map files - Nicolas Lichtmaier <nick@debian.org>
127ef01931fSBen Gras8	search/1	\ A\ _text	Linux kernel symbol map text
128ef01931fSBen Gras
12984d9c625SLionel Sambuc# LSM entries - Nicolas Lichtmaier <nick@debian.org>
130ef01931fSBen Gras0	search/1	Begin3	Linux Software Map entry text
131ef01931fSBen Gras0	search/1	Begin4	Linux Software Map entry text (new format)
132ef01931fSBen Gras
133ef01931fSBen Gras# From Matt Zimmerman, enhanced for v3 by Matthew Palmer
134ef01931fSBen Gras0	belong	0x4f4f4f4d	User-mode Linux COW file
135ef01931fSBen Gras>4	belong	<3		\b, version %d
136ef01931fSBen Gras>>8	string	>\0		\b, backing file %s
137ef01931fSBen Gras>4	belong	>2		\b, version %d
138ef01931fSBen Gras>>32	string	>\0		\b, backing file %s
139ef01931fSBen Gras
140ef01931fSBen Gras############################################################################
141ef01931fSBen Gras# Linux kernel versions
142ef01931fSBen Gras
143ef01931fSBen Gras0		string		\xb8\xc0\x07\x8e\xd8\xb8\x00\x90	Linux
144ef01931fSBen Gras>497		leshort		0		x86 boot sector
145ef01931fSBen Gras>>514		belong		0x8e	of a kernel from the dawn of time!
146ef01931fSBen Gras>>514		belong		0x908ed8b4	version 0.99-1.1.42
147ef01931fSBen Gras>>514		belong		0x908ed8b8	for memtest86
148ef01931fSBen Gras
149ef01931fSBen Gras>497		leshort		!0		x86 kernel
150ef01931fSBen Gras>>504		leshort		>0		RAMdisksize=%u KB
151ef01931fSBen Gras>>502		leshort		>0		swap=0x%X
152ef01931fSBen Gras>>508		leshort		>0		root=0x%X
153ef01931fSBen Gras>>>498		leshort		1		\b-ro
154ef01931fSBen Gras>>>498		leshort		0		\b-rw
155ef01931fSBen Gras>>506		leshort		0xFFFF		vga=normal
156ef01931fSBen Gras>>506		leshort		0xFFFE		vga=extended
157ef01931fSBen Gras>>506		leshort		0xFFFD		vga=ask
158ef01931fSBen Gras>>506		leshort		>0		vga=%d
159ef01931fSBen Gras>>514		belong		0x908ed881	version 1.1.43-1.1.45
160ef01931fSBen Gras>>514		belong		0x15b281cd
161ef01931fSBen Gras>>>0xa8e	belong		0x55AA5a5a	version 1.1.46-1.2.13,1.3.0
162ef01931fSBen Gras>>>0xa99	belong		0x55AA5a5a	version 1.3.1,2
163ef01931fSBen Gras>>>0xaa3	belong		0x55AA5a5a	version 1.3.3-1.3.30
164ef01931fSBen Gras>>>0xaa6	belong		0x55AA5a5a	version 1.3.31-1.3.41
165ef01931fSBen Gras>>>0xb2b	belong		0x55AA5a5a	version 1.3.42-1.3.45
166ef01931fSBen Gras>>>0xaf7	belong		0x55AA5a5a	version 1.3.46-1.3.72
167ef01931fSBen Gras>>514		string		HdrS
168ef01931fSBen Gras>>>518		leshort		>0x1FF
169ef01931fSBen Gras>>>>529		byte		0		\b, zImage
170ef01931fSBen Gras>>>>529		byte		1		\b, bzImage
171ef01931fSBen Gras>>>>(526.s+0x200) string 	>\0		\b, version %s
172ef01931fSBen Gras
173ef01931fSBen Gras# Linux boot sector thefts.
174ef01931fSBen Gras0		belong		0xb8c0078e	Linux
175ef01931fSBen Gras>0x1e6		belong		0x454c4b53	ELKS Kernel
176ef01931fSBen Gras>0x1e6		belong		!0x454c4b53	style boot sector
177ef01931fSBen Gras
178ef01931fSBen Gras############################################################################
179835f6802SDirk Vogt# Linux S390 kernel image
180835f6802SDirk Vogt# Created by: Jan Kaluza <jkaluza@redhat.com>
181835f6802SDirk Vogt8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390
182835f6802SDirk Vogt>0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
183835f6802SDirk Vogt# 64bit
184835f6802SDirk Vogt>>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
185835f6802SDirk Vogt>>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
186835f6802SDirk Vogt>>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
187835f6802SDirk Vogt>>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
188835f6802SDirk Vogt# 32bit
189835f6802SDirk Vogt>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
190835f6802SDirk Vogt>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
191835f6802SDirk Vogt>>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
192835f6802SDirk Vogt>>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
193835f6802SDirk Vogt
19408ff44c4SLionel Sambuc# Linux ARM compressed kernel image
19508ff44c4SLionel Sambuc# From: Kevin Cernekee <cernekee@gmail.com>
19608ff44c4SLionel Sambuc36	lelong	0x016f2818	Linux kernel ARM boot executable zImage (little-endian)
19708ff44c4SLionel Sambuc36	belong	0x016f2818	Linux kernel ARM boot executable zImage (big-endian)
19808ff44c4SLionel Sambuc
199835f6802SDirk Vogt############################################################################
200ef01931fSBen Gras# Linux 8086 executable
201ef01931fSBen Gras0	lelong&0xFF0000FF 0xC30000E9	Linux-Dev86 executable, headerless
202ef01931fSBen Gras>5	string		.
203ef01931fSBen Gras>>4	string		>\0		\b, libc version %s
204ef01931fSBen Gras
205ef01931fSBen Gras0	lelong&0xFF00FFFF 0x4000301	Linux-8086 executable
206ef01931fSBen Gras>2	byte&0x01	!0		\b, unmapped zero page
207ef01931fSBen Gras>2	byte&0x20	0		\b, impure
208ef01931fSBen Gras>2	byte&0x20	!0
209ef01931fSBen Gras>>2	byte&0x10	!0		\b, A_EXEC
210ef01931fSBen Gras>2	byte&0x02	!0		\b, A_PAL
211ef01931fSBen Gras>2	byte&0x04	!0		\b, A_NSYM
212ef01931fSBen Gras>2	byte&0x08	!0		\b, A_STAND
213ef01931fSBen Gras>2	byte&0x40	!0		\b, A_PURE
214ef01931fSBen Gras>2	byte&0x80	!0		\b, A_TOVLY
215ef01931fSBen Gras>28     long            !0              \b, not stripped
216ef01931fSBen Gras>37	string		.
217ef01931fSBen Gras>>36	string		>\0		\b, libc version %s
218ef01931fSBen Gras
219ef01931fSBen Gras# 0	lelong&0xFF00FFFF 0x10000301	ld86 I80386 executable
220ef01931fSBen Gras# 0	lelong&0xFF00FFFF 0xB000301	ld86 M68K executable
221ef01931fSBen Gras# 0	lelong&0xFF00FFFF 0xC000301	ld86 NS16K executable
222ef01931fSBen Gras# 0	lelong&0xFF00FFFF 0x17000301	ld86 SPARC executable
223ef01931fSBen Gras
224ef01931fSBen Gras# SYSLINUX boot logo files (from 'ppmtolss16' sources)
22584d9c625SLionel Sambuc# http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:
22684d9c625SLionel Sambuc# file extension .lss .16
227ef01931fSBen Gras0	lelong	=0x1413f33d		SYSLINUX' LSS16 image data
22884d9c625SLionel Sambuc# syslinux-4.05/mime/image/x-lss16.xml
22984d9c625SLionel Sambuc!:mime image/x-lss16
230ef01931fSBen Gras>4	leshort	x			\b, width %d
231ef01931fSBen Gras>6	leshort	x			\b, height %d
232ef01931fSBen Gras
233ef01931fSBen Gras0	string	OOOM			User-Mode-Linux's Copy-On-Write disk image
234ef01931fSBen Gras>4	belong	x			version %d
235ef01931fSBen Gras
236ef01931fSBen Gras# SE Linux policy database
237ef01931fSBen Gras# From: Mike Frysinger <vapier@gentoo.org>
238ef01931fSBen Gras0	lelong	0xf97cff8c		SE Linux policy
239ef01931fSBen Gras>16	lelong	x			v%d
240ef01931fSBen Gras>20	lelong	1			MLS
241ef01931fSBen Gras>24	lelong	x			%d symbols
242ef01931fSBen Gras>28	lelong	x			%d ocons
243ef01931fSBen Gras
244ef01931fSBen Gras# Linux Logical Volume Manager (LVM)
245ef01931fSBen Gras# Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
246ef01931fSBen Gras#
247ef01931fSBen Gras# System ID, UUID and volume group name are 128 bytes long
248ef01931fSBen Gras# but they should never be full and initialized with zeros...
249ef01931fSBen Gras#
250ef01931fSBen Gras# LVM1
251ef01931fSBen Gras#
252ef01931fSBen Gras0x0	string	HM\001		LVM1 (Linux Logical Volume Manager), version 1
253ef01931fSBen Gras>0x12c	string	>\0		, System ID: %s
254ef01931fSBen Gras
255ef01931fSBen Gras0x0	string	HM\002		LVM1 (Linux Logical Volume Manager), version 2
256ef01931fSBen Gras>0x12c	string	>\0		, System ID: %s
257ef01931fSBen Gras
258ef01931fSBen Gras#  LVM2
259ef01931fSBen Gras#
260ef01931fSBen Gras# It seems that the label header can be in one the four first sector
261ef01931fSBen Gras# of the disk... (from _find_labeller in lib/label/label.c of LVM2)
262ef01931fSBen Gras#
263ef01931fSBen Gras# 0x200 seems to be the common case
264ef01931fSBen Gras
265835f6802SDirk Vogt0x218           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
266ef01931fSBen Gras# read the offset to add to the start of the header, and the header
267ef01931fSBen Gras# start in 0x200
268835f6802SDirk Vogt>&(&-12.l-0x21) byte    x
269835f6802SDirk Vogt# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
270835f6802SDirk Vogt>>&0x0          string  >\x2f          \b, UUID: %.6s
271835f6802SDirk Vogt>>&0x6          string  >\x2f          \b-%.4s
272835f6802SDirk Vogt>>&0xa          string  >\x2f          \b-%.4s
273835f6802SDirk Vogt>>&0xe          string  >\x2f          \b-%.4s
274835f6802SDirk Vogt>>&0x12         string  >\x2f          \b-%.4s
275835f6802SDirk Vogt>>&0x16         string  >\x2f          \b-%.4s
276835f6802SDirk Vogt>>&0x1a         string  >\x2f          \b-%.6s
277835f6802SDirk Vogt>>&0x20         lequad  x              \b, size: %lld
278ef01931fSBen Gras
279835f6802SDirk Vogt0x018           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
280835f6802SDirk Vogt>&(&-12.l-0x21) byte    x
281835f6802SDirk Vogt# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
282835f6802SDirk Vogt>>&0x0          string  >\x2f          \b, UUID: %.6s
283835f6802SDirk Vogt>>&0x6          string  >\x2f          \b-%.4s
284835f6802SDirk Vogt>>&0xa          string  >\x2f          \b-%.4s
285835f6802SDirk Vogt>>&0xe          string  >\x2f          \b-%.4s
286835f6802SDirk Vogt>>&0x12         string  >\x2f          \b-%.4s
287835f6802SDirk Vogt>>&0x16         string  >\x2f          \b-%.4s
288835f6802SDirk Vogt>>&0x1a         string  >\x2f          \b-%.6s
289835f6802SDirk Vogt>>&0x20         lequad  x              \b, size: %lld
290ef01931fSBen Gras
291835f6802SDirk Vogt0x418           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
292835f6802SDirk Vogt>&(&-12.l-0x21) byte    x
293835f6802SDirk Vogt# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
294835f6802SDirk Vogt>>&0x0          string  >\x2f          \b, UUID: %.6s
295835f6802SDirk Vogt>>&0x6          string  >\x2f          \b-%.4s
296835f6802SDirk Vogt>>&0xa          string  >\x2f          \b-%.4s
297835f6802SDirk Vogt>>&0xe          string  >\x2f          \b-%.4s
298835f6802SDirk Vogt>>&0x12         string  >\x2f          \b-%.4s
299835f6802SDirk Vogt>>&0x16         string  >\x2f          \b-%.4s
300835f6802SDirk Vogt>>&0x1a         string  >\x2f          \b-%.6s
301835f6802SDirk Vogt>>&0x20         lequad  x              \b, size: %lld
302ef01931fSBen Gras
303835f6802SDirk Vogt0x618           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
304835f6802SDirk Vogt>&(&-12.l-0x21) byte    x
305835f6802SDirk Vogt# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
306835f6802SDirk Vogt>>&0x0          string  >\x2f          \b, UUID: %.6s
307835f6802SDirk Vogt>>&0x6          string  >\x2f          \b-%.4s
308835f6802SDirk Vogt>>&0xa          string  >\x2f          \b-%.4s
309835f6802SDirk Vogt>>&0xe          string  >\x2f          \b-%.4s
310835f6802SDirk Vogt>>&0x12         string  >\x2f          \b-%.4s
311835f6802SDirk Vogt>>&0x16         string  >\x2f          \b-%.4s
312835f6802SDirk Vogt>>&0x1a         string  >\x2f          \b-%.6s
313835f6802SDirk Vogt>>&0x20         lequad  x              \b, size: %lld
314ef01931fSBen Gras
315ef01931fSBen Gras# LVM snapshot
316ef01931fSBen Gras# from Jason Farrel
317ef01931fSBen Gras0	string	SnAp	LVM Snapshot (CopyOnWrite store)
318ef01931fSBen Gras>4	lelong	!0	- valid,
319ef01931fSBen Gras>4	lelong	0	- invalid,
320ef01931fSBen Gras>8	lelong	x	version %d,
321ef01931fSBen Gras>12	lelong	x	chunk_size %d
322ef01931fSBen Gras
323ef01931fSBen Gras# SE Linux policy database
324ef01931fSBen Gras0	lelong	0xf97cff8c		SE Linux policy
325ef01931fSBen Gras>16	lelong	x			v%d
326ef01931fSBen Gras>20	lelong	1			MLS
327ef01931fSBen Gras>24	lelong	x			%d symbols
328ef01931fSBen Gras>28	lelong	x			%d ocons
329ef01931fSBen Gras
330ef01931fSBen Gras# LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
331ef01931fSBen Gras# Anthon van der Neut (anthon@mnt.org)
332ef01931fSBen Gras0	string	LUKS\xba\xbe	LUKS encrypted file,
333ef01931fSBen Gras>6	beshort x		ver %d
334ef01931fSBen Gras>8	string	x		[%s,
335ef01931fSBen Gras>40	string	x		%s,
336ef01931fSBen Gras>72	string	x		%s]
337ef01931fSBen Gras>168	string	x		UUID: %s
338ef01931fSBen Gras
339ef01931fSBen Gras
340ef01931fSBen Gras# Summary: Xen saved domain file
341ef01931fSBen Gras# Created by: Radek Vokal <rvokal@redhat.com>
342ef01931fSBen Gras0	string		LinuxGuestRecord	Xen saved domain
343ef01931fSBen Gras>20	search/256	(name
344ef01931fSBen Gras>>&1	string		x			(name %s)
345ef01931fSBen Gras
346835f6802SDirk Vogt# Type: Xen, the virtual machine monitor
347835f6802SDirk Vogt# From: Radek Vokal <rvokal@redhat.com>
348835f6802SDirk Vogt0	string		LinuxGuestRecord	Xen saved domain
349835f6802SDirk Vogt#>2	regex		\(name\ [^)]*\)		%s
350835f6802SDirk Vogt>20	search/256	(name			(name
351835f6802SDirk Vogt>>&1	string		x			%s...)
352*0a6a1f1dSLionel Sambuc
353*0a6a1f1dSLionel Sambuc# Systemd journald files
354*0a6a1f1dSLionel Sambuc# See http://www.freedesktop.org/wiki/Software/systemd/journal-files/.
355*0a6a1f1dSLionel Sambuc# From: Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>
356*0a6a1f1dSLionel Sambuc
357*0a6a1f1dSLionel Sambuc# check magic
358*0a6a1f1dSLionel Sambuc0	string	LPKSHHRH
359*0a6a1f1dSLionel Sambuc# check that state is one of known values
360*0a6a1f1dSLionel Sambuc>16		ubyte&252	0
361*0a6a1f1dSLionel Sambuc# check that each half of three unique id128s is non-zero
362*0a6a1f1dSLionel Sambuc>>24		ubequad		>0
363*0a6a1f1dSLionel Sambuc>>>32		ubequad		>0
364*0a6a1f1dSLionel Sambuc>>>>40		ubequad		>0
365*0a6a1f1dSLionel Sambuc>>>>>48		ubequad		>0
366*0a6a1f1dSLionel Sambuc>>>>>>56	ubequad		>0
367*0a6a1f1dSLionel Sambuc>>>>>>>64	ubequad		>0	Journal file
368*0a6a1f1dSLionel Sambuc!:mime application/octet-stream
369*0a6a1f1dSLionel Sambuc# provide more info
370*0a6a1f1dSLionel Sambuc>>>>>>>>184	leqdate		0	empty
371*0a6a1f1dSLionel Sambuc>>>>>>>>16	ubyte		0	\b, offline
372*0a6a1f1dSLionel Sambuc>>>>>>>>16	ubyte		1	\b, online
373*0a6a1f1dSLionel Sambuc>>>>>>>>16	ubyte		2	\b, archived
374*0a6a1f1dSLionel Sambuc>>>>>>>>8	ulelong&1	1	\b, sealed
375*0a6a1f1dSLionel Sambuc>>>>>>>>12	ulelong&1	1	\b, compressed
376*0a6a1f1dSLionel Sambuc
377*0a6a1f1dSLionel Sambuc# BCache backing and cache devices
378*0a6a1f1dSLionel Sambuc# From: Gabriel de Perthuis <g2p.code@gmail.com>
379*0a6a1f1dSLionel Sambuc0x1008		lequad		8
380*0a6a1f1dSLionel Sambuc>0x1018		string		\xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81	BCache
381*0a6a1f1dSLionel Sambuc>>0x1010	ulequad		0	cache device
382*0a6a1f1dSLionel Sambuc>>0x1010	ulequad		1	backing device
383*0a6a1f1dSLionel Sambuc>>0x1010	ulequad		3	cache device
384*0a6a1f1dSLionel Sambuc>>0x1010	ulequad		4	backing device
385*0a6a1f1dSLionel Sambuc>>0x1048	string		>0	\b, label "%.32s"
386*0a6a1f1dSLionel Sambuc>>0x1028	ubelong		x	\b, uuid %08x
387*0a6a1f1dSLionel Sambuc>>0x102c	ubeshort	x	\b-%04x
388*0a6a1f1dSLionel Sambuc>>0x102e	ubeshort	x	\b-%04x
389*0a6a1f1dSLionel Sambuc>>0x1030	ubeshort	x	\b-%04x
390*0a6a1f1dSLionel Sambuc>>0x1032	ubelong		x	\b-%08x
391*0a6a1f1dSLionel Sambuc>>0x1036	ubeshort	x	\b%04x
392*0a6a1f1dSLionel Sambuc>>0x1038	ubelong		x	\b, set uuid %08x
393*0a6a1f1dSLionel Sambuc>>0x103c	ubeshort	x	\b-%04x
394*0a6a1f1dSLionel Sambuc>>0x103e	ubeshort	x	\b-%04x
395*0a6a1f1dSLionel Sambuc>>0x1040	ubeshort	x	\b-%04x
396*0a6a1f1dSLionel Sambuc>>0x1042	ubelong		x	\b-%08x
397*0a6a1f1dSLionel Sambuc>>0x1046	ubeshort	x	\b%04x
398*0a6a1f1dSLionel Sambuc
399*0a6a1f1dSLionel Sambuc# Linux device tree:
400*0a6a1f1dSLionel Sambuc# File format description can be found in the Linux kernel sources at
401*0a6a1f1dSLionel Sambuc# Documentation/devicetree/booting-without-of.txt
402*0a6a1f1dSLionel Sambuc# From Christoph Biedl
403*0a6a1f1dSLionel Sambuc0		belong		0xd00dfeed
404*0a6a1f1dSLionel Sambuc# structure and strings must be within blob
405*0a6a1f1dSLionel Sambuc>&(8.L)		byte		x
406*0a6a1f1dSLionel Sambuc>>&(12.L)	byte		x
407*0a6a1f1dSLionel Sambuc>>>20		belong		>1	Device Tree Blob version %d
408*0a6a1f1dSLionel Sambuc>>>>4		belong		x	\b, size=%d
409*0a6a1f1dSLionel Sambuc>>>>20		belong		>1
410*0a6a1f1dSLionel Sambuc>>>>>28		belong		x	\b, boot CPU=%d
411*0a6a1f1dSLionel Sambuc>>>>20		belong		>2
412*0a6a1f1dSLionel Sambuc>>>>>32		belong		x	\b, string block size=%d
413*0a6a1f1dSLionel Sambuc>>>>20		belong		>16
414*0a6a1f1dSLionel Sambuc>>>>>36		belong		x	\b, DT structure block size=%d
415*0a6a1f1dSLionel Sambuc
416*0a6a1f1dSLionel Sambuc# glibc locale archive as defined in glibc locale/locarchive.h
417*0a6a1f1dSLionel Sambuc0		lelong		0xde020109	locale archive
418*0a6a1f1dSLionel Sambuc>24		lelong		x		%d strings
419*0a6a1f1dSLionel Sambuc
420*0a6a1f1dSLionel Sambuc# Summary:     Database file for mlocate
421*0a6a1f1dSLionel Sambuc# Description: A database file as used by mlocate, a fast implementation
422*0a6a1f1dSLionel Sambuc#              of locate/updatedb. It uses merging to reuse the existing
423*0a6a1f1dSLionel Sambuc#              database and avoid rereading most of the filesystem. It's
424*0a6a1f1dSLionel Sambuc#              the default version of locate on Arch Linux (and others).
425*0a6a1f1dSLionel Sambuc# File path:   /var/lib/mlocate/mlocate.db by default (but configurable)
426*0a6a1f1dSLionel Sambuc# Site:        https://fedorahosted.org/mlocate/
427*0a6a1f1dSLionel Sambuc# Format docs: http://linux.die.net/man/5/mlocate.db
428*0a6a1f1dSLionel Sambuc# Type: mlocate database file
429*0a6a1f1dSLionel Sambuc# URL:  https://fedorahosted.org/mlocate/
430*0a6a1f1dSLionel Sambuc# From: Wander Nauta <info@wandernauta.nl>
431*0a6a1f1dSLionel Sambuc0		string		\0mlocate	mlocate database
432*0a6a1f1dSLionel Sambuc>12		byte		x		\b, version %d
433*0a6a1f1dSLionel Sambuc>13		byte		1		\b, require visibility
434*0a6a1f1dSLionel Sambuc>16		string		x		\b, root %s
435