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