LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   extract files from an ISO w/o mounting (https://www.linuxquestions.org/questions/linux-newbie-8/extract-files-from-an-iso-w-o-mounting-739399/)

r.johnson 07-11-2009 10:43 AM

extract files from an ISO w/o mounting
 
I'm looking for a utility to extract files from an ISO _without_ having to mount it.

Something such as:
- the inverse of mkisofs - to unpack an iso to a directory tree
- an iso -> cpio filter to convert the iso into a cpio stream.

Is there anything available?

--rich

linus72 07-11-2009 10:48 AM

Welcome to LQ!
I use Ubuntu alot, and most of the time I just right-click the iso
and select "extract here", which will extract it to a folder.

other gadgets i use are gmountiso, and isomaster.

r.johnson 07-11-2009 03:05 PM

Thanks, but I should add that I need a utility that can be used from a bash script w/o user interaction. I'm looking for a utility allowing me to treat an iso file as an archive rather than a device. I'm trying to get away from:

a) requiring root privileges
b) consuming scarce /dev/loop devices
c) having to manage mount points.

tredegar 07-11-2009 04:14 PM

Quote:

I'm looking for a utility to extract files from an ISO _without_ having to mount it.
If a filesystem isn't mounted, I don't think you can read it. That's the whole point of mount

Perhaps if you told us more about what, exactly, you are trying to do, we could help you better.

gapan 07-11-2009 04:37 PM

If you're looking for a gui tool, there's isomaster: http://www.littlesvr.ca/isomaster/

lazlow 07-11-2009 05:15 PM

You do know that you can mount and unmount ISOs? Once an ISO is unmounted the loop device is freed. You can also look at the fuse-iso package to give non-root users the ability to mount ISOs. If you are doing this for specific users just build a mount point within their home directory. Personally I just call it mountpoint.

r.johnson 07-12-2009 11:14 AM

Quote:

Originally Posted by tredegar (Post 3604564)
If a filesystem isn't mounted, I don't think you can read it. That's the whole point of mount

Perhaps if you told us more about what, exactly, you are trying to do, we could help you better.

On the first point: one can always read the bytestream...even from a device; and initrd filesystems no longer require mounting to read them--it's just zcat | cpio -i ...
I'd like to use the same pattern against an ISO bytestream as I would with tar, ar, cpio, zip or any other archive format.

On the tasks I'm dealing with:

I'm writing internal support scripts that extract a single file or directory tree from an ISO file. I want to do this requiring neither root privileges, nor special system configuration--mount fails these two criteria. And as I mentioned earlier...no GUI--the scripts are running unattended as part of an automated build process.

Two specific tasks include:
1. Take the ISO constructed by a nightly build and update a yum repository with its contents. In an ideal world I'd be able to something like:
cd repository; iso2cpio? iso-file | cpio -i -u rpm_location_on_iso

2. install a single rpm to a system from a network accessible RHEL5 supplementary ISO along the lines of:
curl url-to-iso | iso2cpio? | cpio -i --to-stdout rpm-location-on-iso >local-file; rpm -Uvh local-file

I'm looking for a utility that'll do the format conversion form ISO-9660 to cpio (or equivalent)

unSpawn 07-12-2009 11:40 AM

No cpio but how about doing extraction as "iso-read -i /path/to/filename.iso -e /path/inside/iso/to/filename -o /path/to/extract/filename"?

r.johnson 07-12-2009 12:30 PM

Quote:

Originally Posted by unSpawn (Post 3605233)
No cpio but how about doing extraction as "iso-read -i /path/to/filename.iso -e /path/inside/iso/to/filename -o /path/to/extract/filename"?

Looks promising...thanks.


All times are GMT -5. The time now is 04:21 AM.