1 Scan a file for partition tables and print those found. Treats files as collections
2 of 512-byte sectors and treats any 'sector' that has the magic bytes 0x55,0xAA at
3 offset 0x1FE (510) as a valid partition table.
5 Cannot be used with device files because it uses mmap() to map file contents into memory.
10 File: 512 z-part-table.1.sector0.bin
13 Signature found. sector: 0 offset: 0
14 0 A 77 0 0 0 0 0 0 1 1000 (next 1001)
15 1 69 0 0 0 0 0 0 1001 128 (next 1129)
16 2 70 0 0 0 0 0 0 1129 9000 (next 10129)
17 3 5 0 0 0 0 0 0 10129 4544622 (next 4554751)
20 Usage: part-list [-d] -f <needle>
22 Copyright 2010 TJ <linux@tjworld.net>
23 Licensed under the terms of the GNU GPL v3
25 -d print values in decimal not hexadecimal
26 -f path to the file containing the partition table (it is scanned for sectors containing the signature)
28 Information messages are written to stderr and only partition tables are written to stdout.
29 This allows the output to be piped through other filters.
37 = Cross-build for ARM =
39 Assuming the Code Sourcery G++ ARM cross-tools are installed in the path, the program can
40 be built and statically linked to be a self-contained executable to run on ARM-base devices
41 such as Android smart-phones.
43 make LDFLAGS=-static CC=arm-none-linux-gnueabi-gcc