1158d2fcdSBenno Rice.\" Copyright (c) 2018 iXsystems, Inc 2158d2fcdSBenno Rice.\" All rights reserved. 3158d2fcdSBenno Rice.\" 4158d2fcdSBenno Rice.\" Redistribution and use in source and binary forms, with or without 5158d2fcdSBenno Rice.\" modification, are permitted provided that the following conditions 6158d2fcdSBenno Rice.\" are met: 7158d2fcdSBenno Rice.\" 1. Redistributions of source code must retain the above copyright 8158d2fcdSBenno Rice.\" notice, this list of conditions and the following disclaimer. 9158d2fcdSBenno Rice.\" 2. Redistributions in binary form must reproduce the above copyright 10158d2fcdSBenno Rice.\" notice, this list of conditions and the following disclaimer in the 11158d2fcdSBenno Rice.\" documentation and/or other materials provided with the distribution. 12158d2fcdSBenno Rice.\" 13158d2fcdSBenno Rice.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14158d2fcdSBenno Rice.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15158d2fcdSBenno Rice.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16158d2fcdSBenno Rice.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17158d2fcdSBenno Rice.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18158d2fcdSBenno Rice.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19158d2fcdSBenno Rice.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20158d2fcdSBenno Rice.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21158d2fcdSBenno Rice.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22158d2fcdSBenno Rice.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23158d2fcdSBenno Rice.\" SUCH DAMAGE. 24158d2fcdSBenno Rice.\" 25*5ee52e15SBenno Rice.Dd April 25, 2018 26158d2fcdSBenno Rice.Dt ETDUMP 8 27158d2fcdSBenno Rice.Os 28158d2fcdSBenno Rice.Sh NAME 29158d2fcdSBenno Rice.Nm etdump 30158d2fcdSBenno Rice.Nd Dump El Torito boot catalog information from ISO images 31158d2fcdSBenno Rice.Sh SYNOPSIS 32158d2fcdSBenno Rice.Nm 33158d2fcdSBenno Rice.Op Fl f Ar format 34158d2fcdSBenno Rice.Op Fl o Ar file 35158d2fcdSBenno Rice.Ar 36158d2fcdSBenno Rice.Sh DESCRIPTION 37158d2fcdSBenno RiceThis program reads El Torito boot catalog information from an ISO image and 38158d2fcdSBenno Riceoutputs it in various formats. 39158d2fcdSBenno RiceIt can be used to check the catalog in an image or to output catalog data in 40158d2fcdSBenno Ricea format that can be used by other tools such as shell scripts. 41158d2fcdSBenno Rice.Pp 42158d2fcdSBenno RiceSupported options are: 43158d2fcdSBenno Rice.Bl -tag -width flag 44158d2fcdSBenno Rice.It Fl f Ar format Fl -format Ar format 45158d2fcdSBenno RiceSelect the output format. 46158d2fcdSBenno RiceSupported output formats are: 47158d2fcdSBenno Rice.Bl -tag -width shell -offset indent 48158d2fcdSBenno Rice.It Sy text 49158d2fcdSBenno RiceHuman-readable text (default) 50158d2fcdSBenno Rice.It Sy shell 51158d2fcdSBenno RiceEach boot entry is emitted as a string suitable for passing to a sh-compatible 52158d2fcdSBenno Riceeval command. 53158d2fcdSBenno RiceThe variables emitted are: 54158d2fcdSBenno Rice.Bl -tag -width et_platform -offset indent 55158d2fcdSBenno Rice.It et_platform 56158d2fcdSBenno RiceThe platform ID from the section header. 57158d2fcdSBenno RiceSet to 'default' for the initial (default) entry. 58158d2fcdSBenno Rice.It et_system 59158d2fcdSBenno RiceThe system ID from the boot entry. 60158d2fcdSBenno Rice.It et_lba 61158d2fcdSBenno RiceThe starting LBA (2048-byte blocks) of the boot image. 62158d2fcdSBenno Rice.It et_sectors 63158d2fcdSBenno RiceThe number of sectors (512-byte sectors) that comprise the boot image. 64158d2fcdSBenno Rice.El 65158d2fcdSBenno Rice.El 66158d2fcdSBenno Rice.It Fl o Ar file Fl -output Ar file 67158d2fcdSBenno RiceWrite output to 68158d2fcdSBenno Rice.Ar file . 69158d2fcdSBenno RiceIf '-' is specified then standard out is used. 70158d2fcdSBenno Rice.El 71158d2fcdSBenno Rice.Sh EXAMPLES 72158d2fcdSBenno RiceTo see what entries are in a given boot catalog run 73158d2fcdSBenno Rice.Nm 74158d2fcdSBenno Ricepassing the filename of the image as an argument like so: 75158d2fcdSBenno Rice.Bd -literal -offset indent 76158d2fcdSBenno Rice% etdump bootonly.iso 77158d2fcdSBenno RiceImage in bootonly.iso 78158d2fcdSBenno RiceDefault entry 79158d2fcdSBenno Rice System i386 80158d2fcdSBenno Rice Start LBA 420 (0x1a4), sector count 4 (0x4) 81158d2fcdSBenno Rice Media type: no emulation 82158d2fcdSBenno Rice 83158d2fcdSBenno RiceSection header: efi, final 84158d2fcdSBenno Rice Section entry 85158d2fcdSBenno Rice System i386 86158d2fcdSBenno Rice Start LBA 20 (0x14), sector count 1600 (0x640) 87158d2fcdSBenno Rice Media type: no emulation 88158d2fcdSBenno Rice.Ed 89158d2fcdSBenno Rice.Pp 90158d2fcdSBenno RiceTo use the output in a shell script a for loop can be used to iterate over the 91158d2fcdSBenno Riceentries returned using eval: 92158d2fcdSBenno Rice.Bd -literal -offset indent 93158d2fcdSBenno Ricefor entry in `etdump --format shell bootonly.iso`; do 94158d2fcdSBenno Rice eval $entry 95158d2fcdSBenno Rice echo $et_platform $et_system $et_lba $et_sectors 96158d2fcdSBenno Ricedone 97158d2fcdSBenno Rice.Ed 98158d2fcdSBenno Rice.Sh HISTORY 99158d2fcdSBenno RiceThe 100158d2fcdSBenno Rice.Nm 101158d2fcdSBenno Riceutility first appeared in 102*5ee52e15SBenno Rice.Fx 11.2 103