xref: /freebsd/usr.bin/etdump/etdump.1 (revision c697fb7f)
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
39This program reads El Torito boot catalog information from an ISO image and
40outputs it in various formats.
41It can be used to check the catalog in an image or to output catalog data in
42a format that can be used by other tools such as shell scripts.
43.Pp
44Supported options are:
45.Bl -tag -width flag
46.It Fl f Ar format Fl -format Ar format
47Select the output format.
48Supported output formats are:
49.Bl -tag -width shell -offset indent
50.It Sy text
51Human-readable text (default)
52.It Sy shell
53Each boot entry is emitted as a string suitable for passing to a sh-compatible
54eval command.
55The variables emitted are:
56.Bl -tag -width et_platform -offset indent
57.It et_platform
58The platform ID from the section header.
59Set to 'default' for the initial (default) entry.
60.It et_system
61The system ID from the boot entry.
62.It et_lba
63The starting LBA (2048-byte blocks) of the boot image.
64.It et_sectors
65The 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
69Write output to
70.Ar file .
71If '-' is specified then standard out is used.
72.El
73.Sh EXAMPLES
74To see what entries are in a given boot catalog run
75.Nm
76passing the filename of the image as an argument like so:
77.Bd -literal -offset indent
78% etdump bootonly.iso
79Image in bootonly.iso
80Default entry
81	System i386
82	Start LBA 420 (0x1a4), sector count 4 (0x4)
83	Media type: no emulation
84
85Section 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
92To use the output in a shell script a for loop can be used to iterate over the
93entries returned using eval:
94.Bd -literal -offset indent
95for entry in `etdump --format shell bootonly.iso`; do
96	eval $entry
97	echo $et_platform $et_system $et_lba $et_sectors
98done
99.Ed
100.Sh HISTORY
101The
102.Nm
103utility first appeared in
104.Fx 11.2
105