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