xref: /freebsd/contrib/file/magic/Magdir/linux (revision c293113327da098a3ce92f3bc75ee69d5f2392eb)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*c2931133SXin LI# $File: linux,v 1.59 2014/11/03 21:03:36 christos Exp $
4b6cee71dSXin LI# linux:  file(1) magic for Linux files
5b6cee71dSXin LI#
6b6cee71dSXin LI# Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
7b6cee71dSXin LI# The following basic Linux magic is useful for reference, but using
8b6cee71dSXin LI# "long" magic is a better practice in order to avoid collisions.
9b6cee71dSXin LI#
10b6cee71dSXin LI# 2	leshort		100		Linux/i386
11b6cee71dSXin LI# >0	leshort		0407		impure executable (OMAGIC)
12b6cee71dSXin LI# >0	leshort		0410		pure executable (NMAGIC)
13b6cee71dSXin LI# >0	leshort		0413		demand-paged executable (ZMAGIC)
14b6cee71dSXin LI# >0	leshort		0314		demand-paged executable (QMAGIC)
15b6cee71dSXin LI#
16b6cee71dSXin LI0	lelong		0x00640107	Linux/i386 impure executable (OMAGIC)
17b6cee71dSXin LI>16	lelong		0		\b, stripped
18b6cee71dSXin LI0	lelong		0x00640108	Linux/i386 pure executable (NMAGIC)
19b6cee71dSXin LI>16	lelong		0		\b, stripped
20b6cee71dSXin LI0	lelong		0x0064010b	Linux/i386 demand-paged executable (ZMAGIC)
21b6cee71dSXin LI>16	lelong		0		\b, stripped
22b6cee71dSXin LI0	lelong		0x006400cc	Linux/i386 demand-paged executable (QMAGIC)
23b6cee71dSXin LI>16	lelong		0		\b, stripped
24b6cee71dSXin LI#
25b6cee71dSXin LI0	string		\007\001\000	Linux/i386 object file
26b6cee71dSXin LI>20	lelong		>0x1020		\b, DLL library
27b6cee71dSXin LI# Linux-8086 stuff:
28b6cee71dSXin LI0	string		\01\03\020\04	Linux-8086 impure executable
29b6cee71dSXin LI>28	long		!0		not stripped
30b6cee71dSXin LI0	string		\01\03\040\04	Linux-8086 executable
31b6cee71dSXin LI>28	long		!0		not stripped
32b6cee71dSXin LI#
33b6cee71dSXin LI0	string		\243\206\001\0	Linux-8086 object file
34b6cee71dSXin LI#
35b6cee71dSXin LI0	string		\01\03\020\20	Minix-386 impure executable
36b6cee71dSXin LI>28	long		!0		not stripped
37b6cee71dSXin LI0	string		\01\03\040\20	Minix-386 executable
38b6cee71dSXin LI>28	long		!0		not stripped
39b6cee71dSXin LI0	string		\01\03\04\20	Minix-386 NSYM/GNU executable
40b6cee71dSXin LI>28	long		!0		not stripped
41b6cee71dSXin LI# core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
42b6cee71dSXin LI216	lelong		0421		Linux/i386 core file
43b6cee71dSXin LI!:strength / 2
44b6cee71dSXin LI>220	string		>\0		of '%s'
45b6cee71dSXin LI>200	lelong		>0		(signal %d)
46b6cee71dSXin LI#
47b6cee71dSXin LI# LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
48b6cee71dSXin LI# this can be overridden by the DOS executable (COM) entry
49b6cee71dSXin LI2	string		LILO		Linux/i386 LILO boot/chain loader
50b6cee71dSXin LI#
51b6cee71dSXin LI# Linux make config build file, from Ole Aamot <oka@oka.no>
52b6cee71dSXin LI# Updated by Ken Sharp
53b6cee71dSXin LI28	string		make\ config		Linux make config build file (old)
54b6cee71dSXin LI49	search/70	Kernel\ Configuration	Linux make config build file
55b6cee71dSXin LI
56b6cee71dSXin LI#
57b6cee71dSXin LI# PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
58b6cee71dSXin LI# Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
59b6cee71dSXin LI# See: http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
60b6cee71dSXin LI0	leshort		0x0436		Linux/i386 PC Screen Font v1 data,
61b6cee71dSXin LI>2	byte&0x01	0		256 characters,
62b6cee71dSXin LI>2	byte&0x01	!0		512 characters,
63b6cee71dSXin LI>2	byte&0x02	0		no directory,
64b6cee71dSXin LI>2	byte&0x02	!0		Unicode directory,
65b6cee71dSXin LI>3	byte		>0		8x%d
66b6cee71dSXin LI0	string		\x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data,
67b6cee71dSXin LI>16	lelong		x		%d characters,
68b6cee71dSXin LI>12	lelong&0x01	0		no directory,
69b6cee71dSXin LI>12	lelong&0x01	!0		Unicode directory,
70b6cee71dSXin LI>24	lelong		x		%d
71b6cee71dSXin LI>28	lelong		x		\bx%d
72b6cee71dSXin LI
73b6cee71dSXin LI# Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
74b6cee71dSXin LI4086	string		SWAP-SPACE	Linux/i386 swap file
75b6cee71dSXin LI# From: Jeff Bailey <jbailey@ubuntu.com>
76b6cee71dSXin LI# Linux swap file with swsusp1 image, from Jeff Bailey <jbailey@ubuntu.com>
77b6cee71dSXin LI4076	string		SWAPSPACE2S1SUSPEND	Linux/i386 swap file (new style) with SWSUSP1 image
78b6cee71dSXin LI# From: James Hunt <james.hunt@ubuntu.com>
79b6cee71dSXin LI4076    string          SWAPSPACE2LINHIB0001    Linux/i386 swap file (new style) (compressed hibernate)
80b6cee71dSXin LI# according to man page of mkswap (8) March 1999
81b6cee71dSXin LI# volume label and UUID Russell Coker
82b6cee71dSXin LI# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
83b6cee71dSXin LI4086	string		SWAPSPACE2	Linux/i386 swap file (new style),
84b6cee71dSXin LI>0x400	long		x		version %d (4K pages),
85b6cee71dSXin LI>0x404	long		x		size %d pages,
86b6cee71dSXin LI>1052	string		\0		no label,
87b6cee71dSXin LI>1052	string		>\0		LABEL=%s,
88b6cee71dSXin LI>0x40c	belong		x		UUID=%08x
89b6cee71dSXin LI>0x410	beshort		x		\b-%04x
90b6cee71dSXin LI>0x412	beshort		x		\b-%04x
91b6cee71dSXin LI>0x414	beshort		x		\b-%04x
92b6cee71dSXin LI>0x416	belong		x		\b-%08x
93b6cee71dSXin LI>0x41a	beshort		x		\b%04x
94b6cee71dSXin LI# From Daniel Novotny <dnovotny@redhat.com>
95b6cee71dSXin LI# swap file for PowerPC
96b6cee71dSXin LI65526	string		SWAPSPACE2	Linux/ppc swap file
97b6cee71dSXin LI16374	string		SWAPSPACE2	Linux/ia64 swap file
98b6cee71dSXin LI#
99b6cee71dSXin LI# Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
100b6cee71dSXin LI# and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
101b6cee71dSXin LI# and Nicolas Lichtmaier <nick@debian.org>
102b6cee71dSXin LI# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
103b6cee71dSXin LI# Linux kernel boot images (i386 arch) (Wolfram Kleff)
104b6cee71dSXin LI514	string		HdrS		Linux kernel
105b6cee71dSXin LI!:strength + 55
106b6cee71dSXin LI>510	leshort		0xAA55		x86 boot executable
107b6cee71dSXin LI>>518	leshort		>0x1ff
108b6cee71dSXin LI>>>529	byte		0		zImage,
109b6cee71dSXin LI>>>529	byte		1		bzImage,
110b6cee71dSXin LI>>>526	lelong		>0
111b6cee71dSXin LI>>>>(526.s+0x200) string	>\0	version %s,
112b6cee71dSXin LI>>498	leshort		1		RO-rootFS,
113b6cee71dSXin LI>>498	leshort		0		RW-rootFS,
114b6cee71dSXin LI>>508	leshort		>0		root_dev 0x%X,
115b6cee71dSXin LI>>502	leshort		>0		swap_dev 0x%X,
116b6cee71dSXin LI>>504	leshort		>0		RAMdisksize %u KB,
117b6cee71dSXin LI>>506	leshort		0xFFFF		Normal VGA
118b6cee71dSXin LI>>506	leshort		0xFFFE		Extended VGA
119b6cee71dSXin LI>>506	leshort		0xFFFD		Prompt for Videomode
120b6cee71dSXin LI>>506	leshort		>0		Video mode %d
121b6cee71dSXin LI# This also matches new kernels, which were caught above by "HdrS".
122b6cee71dSXin LI0		belong	0xb8c0078e	Linux kernel
123b6cee71dSXin LI>0x1e3		string	Loading		version 1.3.79 or older
124b6cee71dSXin LI>0x1e9		string	Loading		from prehistoric times
125b6cee71dSXin LI
126b6cee71dSXin LI# System.map files - Nicolas Lichtmaier <nick@debian.org>
127b6cee71dSXin LI8	search/1	\ A\ _text	Linux kernel symbol map text
128b6cee71dSXin LI
129b6cee71dSXin LI# LSM entries - Nicolas Lichtmaier <nick@debian.org>
130b6cee71dSXin LI0	search/1	Begin3	Linux Software Map entry text
131b6cee71dSXin LI0	search/1	Begin4	Linux Software Map entry text (new format)
132b6cee71dSXin LI
133b6cee71dSXin LI# From Matt Zimmerman, enhanced for v3 by Matthew Palmer
134b6cee71dSXin LI0	belong	0x4f4f4f4d	User-mode Linux COW file
135b6cee71dSXin LI>4	belong	<3		\b, version %d
136b6cee71dSXin LI>>8	string	>\0		\b, backing file %s
137b6cee71dSXin LI>4	belong	>2		\b, version %d
138b6cee71dSXin LI>>32	string	>\0		\b, backing file %s
139b6cee71dSXin LI
140b6cee71dSXin LI############################################################################
141b6cee71dSXin LI# Linux kernel versions
142b6cee71dSXin LI
143b6cee71dSXin LI0		string		\xb8\xc0\x07\x8e\xd8\xb8\x00\x90	Linux
144b6cee71dSXin LI>497		leshort		0		x86 boot sector
145b6cee71dSXin LI>>514		belong		0x8e	of a kernel from the dawn of time!
146b6cee71dSXin LI>>514		belong		0x908ed8b4	version 0.99-1.1.42
147b6cee71dSXin LI>>514		belong		0x908ed8b8	for memtest86
148b6cee71dSXin LI
149b6cee71dSXin LI>497		leshort		!0		x86 kernel
150b6cee71dSXin LI>>504		leshort		>0		RAMdisksize=%u KB
151b6cee71dSXin LI>>502		leshort		>0		swap=0x%X
152b6cee71dSXin LI>>508		leshort		>0		root=0x%X
153b6cee71dSXin LI>>>498		leshort		1		\b-ro
154b6cee71dSXin LI>>>498		leshort		0		\b-rw
155b6cee71dSXin LI>>506		leshort		0xFFFF		vga=normal
156b6cee71dSXin LI>>506		leshort		0xFFFE		vga=extended
157b6cee71dSXin LI>>506		leshort		0xFFFD		vga=ask
158b6cee71dSXin LI>>506		leshort		>0		vga=%d
159b6cee71dSXin LI>>514		belong		0x908ed881	version 1.1.43-1.1.45
160b6cee71dSXin LI>>514		belong		0x15b281cd
161b6cee71dSXin LI>>>0xa8e	belong		0x55AA5a5a	version 1.1.46-1.2.13,1.3.0
162b6cee71dSXin LI>>>0xa99	belong		0x55AA5a5a	version 1.3.1,2
163b6cee71dSXin LI>>>0xaa3	belong		0x55AA5a5a	version 1.3.3-1.3.30
164b6cee71dSXin LI>>>0xaa6	belong		0x55AA5a5a	version 1.3.31-1.3.41
165b6cee71dSXin LI>>>0xb2b	belong		0x55AA5a5a	version 1.3.42-1.3.45
166b6cee71dSXin LI>>>0xaf7	belong		0x55AA5a5a	version 1.3.46-1.3.72
167b6cee71dSXin LI>>514		string		HdrS
168b6cee71dSXin LI>>>518		leshort		>0x1FF
169b6cee71dSXin LI>>>>529		byte		0		\b, zImage
170b6cee71dSXin LI>>>>529		byte		1		\b, bzImage
171b6cee71dSXin LI>>>>(526.s+0x200) string 	>\0		\b, version %s
172b6cee71dSXin LI
173b6cee71dSXin LI# Linux boot sector thefts.
174b6cee71dSXin LI0		belong		0xb8c0078e	Linux
175b6cee71dSXin LI>0x1e6		belong		0x454c4b53	ELKS Kernel
176b6cee71dSXin LI>0x1e6		belong		!0x454c4b53	style boot sector
177b6cee71dSXin LI
178b6cee71dSXin LI############################################################################
179b6cee71dSXin LI# Linux S390 kernel image
180b6cee71dSXin LI# Created by: Jan Kaluza <jkaluza@redhat.com>
181b6cee71dSXin LI8 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
182b6cee71dSXin LI>0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
183b6cee71dSXin LI# 64bit
184b6cee71dSXin LI>>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
185b6cee71dSXin LI>>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
186b6cee71dSXin LI>>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
187b6cee71dSXin LI>>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
188b6cee71dSXin LI# 32bit
189b6cee71dSXin LI>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
190b6cee71dSXin LI>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
191b6cee71dSXin LI>>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
192b6cee71dSXin LI>>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
193b6cee71dSXin LI
194b6cee71dSXin LI# Linux ARM compressed kernel image
195b6cee71dSXin LI# From: Kevin Cernekee <cernekee@gmail.com>
196b6cee71dSXin LI36	lelong	0x016f2818	Linux kernel ARM boot executable zImage (little-endian)
197b6cee71dSXin LI36	belong	0x016f2818	Linux kernel ARM boot executable zImage (big-endian)
198b6cee71dSXin LI
199b6cee71dSXin LI############################################################################
200b6cee71dSXin LI# Linux 8086 executable
201b6cee71dSXin LI0	lelong&0xFF0000FF 0xC30000E9	Linux-Dev86 executable, headerless
202b6cee71dSXin LI>5	string		.
203b6cee71dSXin LI>>4	string		>\0		\b, libc version %s
204b6cee71dSXin LI
205b6cee71dSXin LI0	lelong&0xFF00FFFF 0x4000301	Linux-8086 executable
206b6cee71dSXin LI>2	byte&0x01	!0		\b, unmapped zero page
207b6cee71dSXin LI>2	byte&0x20	0		\b, impure
208b6cee71dSXin LI>2	byte&0x20	!0
209b6cee71dSXin LI>>2	byte&0x10	!0		\b, A_EXEC
210b6cee71dSXin LI>2	byte&0x02	!0		\b, A_PAL
211b6cee71dSXin LI>2	byte&0x04	!0		\b, A_NSYM
212b6cee71dSXin LI>2	byte&0x08	!0		\b, A_STAND
213b6cee71dSXin LI>2	byte&0x40	!0		\b, A_PURE
214b6cee71dSXin LI>2	byte&0x80	!0		\b, A_TOVLY
215b6cee71dSXin LI>28     long            !0              \b, not stripped
216b6cee71dSXin LI>37	string		.
217b6cee71dSXin LI>>36	string		>\0		\b, libc version %s
218b6cee71dSXin LI
219b6cee71dSXin LI# 0	lelong&0xFF00FFFF 0x10000301	ld86 I80386 executable
220b6cee71dSXin LI# 0	lelong&0xFF00FFFF 0xB000301	ld86 M68K executable
221b6cee71dSXin LI# 0	lelong&0xFF00FFFF 0xC000301	ld86 NS16K executable
222b6cee71dSXin LI# 0	lelong&0xFF00FFFF 0x17000301	ld86 SPARC executable
223b6cee71dSXin LI
224b6cee71dSXin LI# SYSLINUX boot logo files (from 'ppmtolss16' sources)
225b6cee71dSXin LI# http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:
226b6cee71dSXin LI# file extension .lss .16
227b6cee71dSXin LI0	lelong	=0x1413f33d		SYSLINUX' LSS16 image data
228b6cee71dSXin LI# syslinux-4.05/mime/image/x-lss16.xml
229b6cee71dSXin LI!:mime image/x-lss16
230b6cee71dSXin LI>4	leshort	x			\b, width %d
231b6cee71dSXin LI>6	leshort	x			\b, height %d
232b6cee71dSXin LI
233b6cee71dSXin LI0	string	OOOM			User-Mode-Linux's Copy-On-Write disk image
234b6cee71dSXin LI>4	belong	x			version %d
235b6cee71dSXin LI
236b6cee71dSXin LI# SE Linux policy database
237b6cee71dSXin LI# From: Mike Frysinger <vapier@gentoo.org>
238b6cee71dSXin LI0	lelong	0xf97cff8c		SE Linux policy
239b6cee71dSXin LI>16	lelong	x			v%d
240b6cee71dSXin LI>20	lelong	1			MLS
241b6cee71dSXin LI>24	lelong	x			%d symbols
242b6cee71dSXin LI>28	lelong	x			%d ocons
243b6cee71dSXin LI
244b6cee71dSXin LI# Linux Logical Volume Manager (LVM)
245b6cee71dSXin LI# Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
246b6cee71dSXin LI#
247b6cee71dSXin LI# System ID, UUID and volume group name are 128 bytes long
248b6cee71dSXin LI# but they should never be full and initialized with zeros...
249b6cee71dSXin LI#
250b6cee71dSXin LI# LVM1
251b6cee71dSXin LI#
252b6cee71dSXin LI0x0	string	HM\001		LVM1 (Linux Logical Volume Manager), version 1
253b6cee71dSXin LI>0x12c	string	>\0		, System ID: %s
254b6cee71dSXin LI
255b6cee71dSXin LI0x0	string	HM\002		LVM1 (Linux Logical Volume Manager), version 2
256b6cee71dSXin LI>0x12c	string	>\0		, System ID: %s
257b6cee71dSXin LI
258b6cee71dSXin LI#  LVM2
259b6cee71dSXin LI#
260b6cee71dSXin LI# It seems that the label header can be in one the four first sector
261b6cee71dSXin LI# of the disk... (from _find_labeller in lib/label/label.c of LVM2)
262b6cee71dSXin LI#
263b6cee71dSXin LI# 0x200 seems to be the common case
264b6cee71dSXin LI
265b6cee71dSXin LI0x218           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
266b6cee71dSXin LI# read the offset to add to the start of the header, and the header
267b6cee71dSXin LI# start in 0x200
268b6cee71dSXin LI>&(&-12.l-0x21) byte    x
269b6cee71dSXin LI# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
270b6cee71dSXin LI>>&0x0          string  >\x2f          \b, UUID: %.6s
271b6cee71dSXin LI>>&0x6          string  >\x2f          \b-%.4s
272b6cee71dSXin LI>>&0xa          string  >\x2f          \b-%.4s
273b6cee71dSXin LI>>&0xe          string  >\x2f          \b-%.4s
274b6cee71dSXin LI>>&0x12         string  >\x2f          \b-%.4s
275b6cee71dSXin LI>>&0x16         string  >\x2f          \b-%.4s
276b6cee71dSXin LI>>&0x1a         string  >\x2f          \b-%.6s
277b6cee71dSXin LI>>&0x20         lequad  x              \b, size: %lld
278b6cee71dSXin LI
279b6cee71dSXin LI0x018           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
280b6cee71dSXin LI>&(&-12.l-0x21) byte    x
281b6cee71dSXin LI# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
282b6cee71dSXin LI>>&0x0          string  >\x2f          \b, UUID: %.6s
283b6cee71dSXin LI>>&0x6          string  >\x2f          \b-%.4s
284b6cee71dSXin LI>>&0xa          string  >\x2f          \b-%.4s
285b6cee71dSXin LI>>&0xe          string  >\x2f          \b-%.4s
286b6cee71dSXin LI>>&0x12         string  >\x2f          \b-%.4s
287b6cee71dSXin LI>>&0x16         string  >\x2f          \b-%.4s
288b6cee71dSXin LI>>&0x1a         string  >\x2f          \b-%.6s
289b6cee71dSXin LI>>&0x20         lequad  x              \b, size: %lld
290b6cee71dSXin LI
291b6cee71dSXin LI0x418           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
292b6cee71dSXin LI>&(&-12.l-0x21) byte    x
293b6cee71dSXin LI# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
294b6cee71dSXin LI>>&0x0          string  >\x2f          \b, UUID: %.6s
295b6cee71dSXin LI>>&0x6          string  >\x2f          \b-%.4s
296b6cee71dSXin LI>>&0xa          string  >\x2f          \b-%.4s
297b6cee71dSXin LI>>&0xe          string  >\x2f          \b-%.4s
298b6cee71dSXin LI>>&0x12         string  >\x2f          \b-%.4s
299b6cee71dSXin LI>>&0x16         string  >\x2f          \b-%.4s
300b6cee71dSXin LI>>&0x1a         string  >\x2f          \b-%.6s
301b6cee71dSXin LI>>&0x20         lequad  x              \b, size: %lld
302b6cee71dSXin LI
303b6cee71dSXin LI0x618           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
304b6cee71dSXin LI>&(&-12.l-0x21) byte    x
305b6cee71dSXin LI# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
306b6cee71dSXin LI>>&0x0          string  >\x2f          \b, UUID: %.6s
307b6cee71dSXin LI>>&0x6          string  >\x2f          \b-%.4s
308b6cee71dSXin LI>>&0xa          string  >\x2f          \b-%.4s
309b6cee71dSXin LI>>&0xe          string  >\x2f          \b-%.4s
310b6cee71dSXin LI>>&0x12         string  >\x2f          \b-%.4s
311b6cee71dSXin LI>>&0x16         string  >\x2f          \b-%.4s
312b6cee71dSXin LI>>&0x1a         string  >\x2f          \b-%.6s
313b6cee71dSXin LI>>&0x20         lequad  x              \b, size: %lld
314b6cee71dSXin LI
315b6cee71dSXin LI# LVM snapshot
316b6cee71dSXin LI# from Jason Farrel
317b6cee71dSXin LI0	string	SnAp	LVM Snapshot (CopyOnWrite store)
318b6cee71dSXin LI>4	lelong	!0	- valid,
319b6cee71dSXin LI>4	lelong	0	- invalid,
320b6cee71dSXin LI>8	lelong	x	version %d,
321b6cee71dSXin LI>12	lelong	x	chunk_size %d
322b6cee71dSXin LI
323b6cee71dSXin LI# SE Linux policy database
324b6cee71dSXin LI0	lelong	0xf97cff8c		SE Linux policy
325b6cee71dSXin LI>16	lelong	x			v%d
326b6cee71dSXin LI>20	lelong	1			MLS
327b6cee71dSXin LI>24	lelong	x			%d symbols
328b6cee71dSXin LI>28	lelong	x			%d ocons
329b6cee71dSXin LI
330b6cee71dSXin LI# LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
331b6cee71dSXin LI# Anthon van der Neut (anthon@mnt.org)
332b6cee71dSXin LI0	string	LUKS\xba\xbe	LUKS encrypted file,
333b6cee71dSXin LI>6	beshort x		ver %d
334b6cee71dSXin LI>8	string	x		[%s,
335b6cee71dSXin LI>40	string	x		%s,
336b6cee71dSXin LI>72	string	x		%s]
337b6cee71dSXin LI>168	string	x		UUID: %s
338b6cee71dSXin LI
339b6cee71dSXin LI
340b6cee71dSXin LI# Summary: Xen saved domain file
341b6cee71dSXin LI# Created by: Radek Vokal <rvokal@redhat.com>
342b6cee71dSXin LI0	string		LinuxGuestRecord	Xen saved domain
343b6cee71dSXin LI>20	search/256	(name
344b6cee71dSXin LI>>&1	string		x			(name %s)
345b6cee71dSXin LI
346b6cee71dSXin LI# Type: Xen, the virtual machine monitor
347b6cee71dSXin LI# From: Radek Vokal <rvokal@redhat.com>
348b6cee71dSXin LI0	string		LinuxGuestRecord	Xen saved domain
349b6cee71dSXin LI#>2	regex		\(name\ [^)]*\)		%s
350b6cee71dSXin LI>20	search/256	(name			(name
351b6cee71dSXin LI>>&1	string		x			%s...)
352b6cee71dSXin LI
353b6cee71dSXin LI# Systemd journald files
354b6cee71dSXin LI# See http://www.freedesktop.org/wiki/Software/systemd/journal-files/.
355b6cee71dSXin LI# From: Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>
356b6cee71dSXin LI
357b6cee71dSXin LI# check magic
358b6cee71dSXin LI0	string	LPKSHHRH
359b6cee71dSXin LI# check that state is one of known values
360b6cee71dSXin LI>16		ubyte&252	0
361b6cee71dSXin LI# check that each half of three unique id128s is non-zero
362b6cee71dSXin LI>>24		ubequad		>0
363b6cee71dSXin LI>>>32		ubequad		>0
364b6cee71dSXin LI>>>>40		ubequad		>0
365b6cee71dSXin LI>>>>>48		ubequad		>0
366b6cee71dSXin LI>>>>>>56	ubequad		>0
367b6cee71dSXin LI>>>>>>>64	ubequad		>0	Journal file
368b6cee71dSXin LI!:mime application/octet-stream
369b6cee71dSXin LI# provide more info
370b6cee71dSXin LI>>>>>>>>184	leqdate		0	empty
371b6cee71dSXin LI>>>>>>>>16	ubyte		0	\b, offline
372b6cee71dSXin LI>>>>>>>>16	ubyte		1	\b, online
373b6cee71dSXin LI>>>>>>>>16	ubyte		2	\b, archived
374b6cee71dSXin LI>>>>>>>>8	ulelong&1	1	\b, sealed
375b6cee71dSXin LI>>>>>>>>12	ulelong&1	1	\b, compressed
376b6cee71dSXin LI
377b6cee71dSXin LI# BCache backing and cache devices
378b6cee71dSXin LI# From: Gabriel de Perthuis <g2p.code@gmail.com>
379b6cee71dSXin LI0x1008		lequad		8
380b6cee71dSXin LI>0x1018		string		\xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81	BCache
381b6cee71dSXin LI>>0x1010	ulequad		0	cache device
382b6cee71dSXin LI>>0x1010	ulequad		1	backing device
383b6cee71dSXin LI>>0x1010	ulequad		3	cache device
384b6cee71dSXin LI>>0x1010	ulequad		4	backing device
385b6cee71dSXin LI>>0x1048	string		>0	\b, label "%.32s"
386b6cee71dSXin LI>>0x1028	ubelong		x	\b, uuid %08x
387b6cee71dSXin LI>>0x102c	ubeshort	x	\b-%04x
388b6cee71dSXin LI>>0x102e	ubeshort	x	\b-%04x
389b6cee71dSXin LI>>0x1030	ubeshort	x	\b-%04x
390b6cee71dSXin LI>>0x1032	ubelong		x	\b-%08x
391b6cee71dSXin LI>>0x1036	ubeshort	x	\b%04x
392b6cee71dSXin LI>>0x1038	ubelong		x	\b, set uuid %08x
393b6cee71dSXin LI>>0x103c	ubeshort	x	\b-%04x
394b6cee71dSXin LI>>0x103e	ubeshort	x	\b-%04x
395b6cee71dSXin LI>>0x1040	ubeshort	x	\b-%04x
396b6cee71dSXin LI>>0x1042	ubelong		x	\b-%08x
397b6cee71dSXin LI>>0x1046	ubeshort	x	\b%04x
398b6cee71dSXin LI
399b6cee71dSXin LI# Linux device tree:
400b6cee71dSXin LI# File format description can be found in the Linux kernel sources at
401b6cee71dSXin LI# Documentation/devicetree/booting-without-of.txt
402b6cee71dSXin LI# From Christoph Biedl
403b6cee71dSXin LI0		belong		0xd00dfeed
404b6cee71dSXin LI# structure and strings must be within blob
405b6cee71dSXin LI>&(8.L)		byte		x
406b6cee71dSXin LI>>&(12.L)	byte		x
407b6cee71dSXin LI>>>20		belong		>1	Device Tree Blob version %d
408b6cee71dSXin LI>>>>4		belong		x	\b, size=%d
409b6cee71dSXin LI>>>>20		belong		>1
410b6cee71dSXin LI>>>>>28		belong		x	\b, boot CPU=%d
411b6cee71dSXin LI>>>>20		belong		>2
412b6cee71dSXin LI>>>>>32		belong		x	\b, string block size=%d
413b6cee71dSXin LI>>>>20		belong		>16
414b6cee71dSXin LI>>>>>36		belong		x	\b, DT structure block size=%d
415b6cee71dSXin LI
416*c2931133SXin LI# glibc locale archive as defined in glibc locale/locarchive.h
417*c2931133SXin LI0		lelong		0xde020109	locale archive
418*c2931133SXin LI>24		lelong		x		%d strings
419*c2931133SXin LI
420*c2931133SXin LI# Summary:     Database file for mlocate
421*c2931133SXin LI# Description: A database file as used by mlocate, a fast implementation
422*c2931133SXin LI#              of locate/updatedb. It uses merging to reuse the existing
423*c2931133SXin LI#              database and avoid rereading most of the filesystem. It's
424*c2931133SXin LI#              the default version of locate on Arch Linux (and others).
425*c2931133SXin LI# File path:   /var/lib/mlocate/mlocate.db by default (but configurable)
426*c2931133SXin LI# Site:        https://fedorahosted.org/mlocate/
427*c2931133SXin LI# Format docs: http://linux.die.net/man/5/mlocate.db
428*c2931133SXin LI# Type: mlocate database file
429*c2931133SXin LI# URL:  https://fedorahosted.org/mlocate/
430*c2931133SXin LI# From: Wander Nauta <info@wandernauta.nl>
431*c2931133SXin LI0		string		\0mlocate	mlocate database
432*c2931133SXin LI>12		byte		x		\b, version %d
433*c2931133SXin LI>13		byte		1		\b, require visibility
434*c2931133SXin LI>16		string		x		\b, root %s
435