]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/etdump/etdump.1
Make linux_ptrace() use linux_msg() instead of printf().
[FreeBSD/FreeBSD.git] / usr.bin / etdump / etdump.1
1 .\" Copyright (c) 2018 iXsystems, Inc
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd April 25, 2018
28 .Dt ETDUMP 8
29 .Os
30 .Sh NAME
31 .Nm etdump
32 .Nd Dump El Torito boot catalog information from ISO images
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl f Ar format
36 .Op Fl o Ar file
37 .Ar
38 .Sh DESCRIPTION
39 This program reads El Torito boot catalog information from an ISO image and
40 outputs it in various formats.
41 It can be used to check the catalog in an image or to output catalog data in
42 a format that can be used by other tools such as shell scripts.
43 .Pp
44 Supported options are:
45 .Bl -tag -width flag
46 .It Fl f Ar format Fl -format Ar format
47 Select the output format.
48 Supported output formats are:
49 .Bl -tag -width shell -offset indent
50 .It Sy text
51 Human-readable text (default)
52 .It Sy shell
53 Each boot entry is emitted as a string suitable for passing to a sh-compatible
54 eval command.
55 The variables emitted are:
56 .Bl -tag -width et_platform -offset indent
57 .It et_platform
58 The platform ID from the section header.
59 Set to 'default' for the initial (default) entry.
60 .It et_system
61 The system ID from the boot entry.
62 .It et_lba
63 The starting LBA (2048-byte blocks) of the boot image.
64 .It et_sectors
65 The number of sectors (512-byte sectors) that comprise the boot image.
66 .El
67 .El
68 .It Fl o Ar file Fl -output Ar file
69 Write output to
70 .Ar file .
71 If '-' is specified then standard out is used.
72 .El
73 .Sh EXAMPLES
74 To see what entries are in a given boot catalog run
75 .Nm
76 passing the filename of the image as an argument like so:
77 .Bd -literal -offset indent
78 % etdump bootonly.iso
79 Image in bootonly.iso
80 Default entry
81         System i386
82         Start LBA 420 (0x1a4), sector count 4 (0x4)
83         Media type: no emulation
84
85 Section header: efi, final
86         Section entry
87                 System i386
88                 Start LBA 20 (0x14), sector count 1600 (0x640)
89                 Media type: no emulation
90 .Ed
91 .Pp
92 To use the output in a shell script a for loop can be used to iterate over the
93 entries returned using eval:
94 .Bd -literal -offset indent
95 for entry in `etdump --format shell bootonly.iso`; do
96         eval $entry
97         echo $et_platform $et_system $et_lba $et_sectors
98 done
99 .Ed
100 .Sh HISTORY
101 The
102 .Nm
103 utility first appeared in
104 .Fx 11.2