[svlug] reading files inside ISO without mounting

Tim Utschig tim at tetro.net
Wed Jan 24 16:51:33 PST 2007


This was probably meant for the list...

----- Forwarded message from Graham Cole <diakkaml at gmail.com> -----
Envelope-to: tim at tetro.net
Delivery-date: Wed, 24 Jan 2007 13:53:45 -0800
Subject: Re: [svlug] reading files inside ISO without mounting
From: Graham Cole <diakkaml at gmail.com>
To: Tim Utschig <tim at tetro.net>

You can also do this with isoinfo, which seems to be fairly standard, at
least on fedora and redhat.

Here's a little script I wrote to generate an md5sum file of all the
files within an ISO image.

filelist=$(isoinfo -i $1 -f)
for file in $filelist; do
        sum=$(isoinfo -x $file -i $1 | md5sum | cut -f1 -d' ')
        echo "$sum  ${file##/}"
done >> $mdfile


On Wed, 2007-01-24 at 11:41 -0800, Tim Utschig wrote:
> On Wed, Jan 24, 2007 at 11:15:34AM -0800, Rick Kwan wrote:
> > Is there an easy way to extract a file from an ISO image without
> > mounting it?
> > 
> > I'd like to pull some files out of the image as part of a script
> > without requiring someone to give a root password.  In effect,
> > I'm treating it a bit like a tar archive or zip file.
> 
> $ apt-cache search iso9660
> bsdtar - tar(1) from FreeBSD, using libarchive
> jigdo-file - Download Debian CD images from any Debian mirror
> libarchive-dev - Single library to read/write tar, cpio, pax, zip, iso9660, etc.
> libarchive1 - Single library to read/write tar, cpio, pax, zip, iso9660, etc.
> libiso9660-4 - library to work with ISO9660 filesystems
> libiso9660-dev - library to work with ISO9660 filesystems (development files)
> nrg2iso - Extracts ISO9660 data from Nero ".nrg" files
> sg-utils - utilities for working with generic SCSI devices
> file-roller - an archive manager for GNOME
> 
> $ apt-cache show bsdtar
> Package: bsdtar
> Priority: optional
> Section: universe/utils
> Installed-Size: 120
> Maintainer: John Goerzen <jgoerzen at complete.org>
> Architecture: amd64
> Version: 1.02.036-1
> Depends: libacl1 (>= 2.2.11-1), libarchive1, libbz2-1.0, libc6 (>= 2.3.4-1), zlib1g (>= 1:1.2.1)
> Filename: pool/universe/b/bsdtar/bsdtar_1.02.036-1_amd64.deb
> Size: 37250
> MD5sum: 16400b6de8dafddc9876553b4336dc61
> Description: tar(1) from FreeBSD, using libarchive
>  The bsdtar program has a number of advantages over previous tar
>  implementations:
>  .
>   * Library. Since the core functionality is in a library, it can be
>     used by other tools, such as pkg_add.
>  .
>   * Automatic format detection. Libarchive automatically detects the
>     compression (none/gzip/bzip2) and format (old tar, ustar, gnutar,
>     pax, cpio, iso9660, zip) when reading archives. It does this for
>     any data source.
>  .
>   * Pax Interchange Format Support. This is a POSIX/SUSv3 extension to
>     the old "ustar" tar format that adds arbitrary extended attributes
>     to each entry. Does everything that GNU tar format does, only
>     better.
>  .
>   * Handles file flags, ACLs, arbitrary pathnames, etc. Pax interchange
>     format supports key/value attributes using an easily-extensible
>     technique. Arbitrary pathnames, group names, user names, file sizes
>     are part of the POSIX standard; libarchive extends this with
>     support for file flags, ACLs, and arbitrary device numbers.
>  .
>   * GNU tar support. Libarchive reads most GNU tar archives. If there
>     is demand, this can be improved further.
> 


----- End forwarded message -----

-- 
   - Tim Utschig <tim at tetro.net>




More information about the svlug mailing list