How do I extract an ISO on Linux without root access

23

3

I have a large ISO file on a server, and I need to access the file in it, without having root access. Thus, I can't simply mount it. What should I do to be able to extract an ISO on LInux without root access?

sergiu

Posted 2010-08-25T21:59:34.990

Reputation:

Answers

24

If 7zip is installed this one is really easy:

7z x Your.iso -oWhere/You/Want/It/Extracted/To

to extract the whole iso.

API-Beast

Posted 2010-08-25T21:59:34.990

Reputation: 366

3Since the OP's question has a "linux" tag it's important to state this won't work with 7za (CentOS); 7za does not support ISO archives. You can check supported formats with 7za i. – Jongosi – 2015-08-05T23:18:47.883

FYI 7z seems smart enough to extract directly off media: 7z x /dev/cdrom. I have very stupid issue, that my files show up 0 bytes when mounted. So extracting was a workaround. – akostadinov – 2016-05-02T11:54:11.033

Just to enforce, -o should be without space – PYK – 2020-01-20T04:55:42.400

17

Many of the GUI tools like file roller will use isoinfo in the background.

You can extract a single file from an ISO like so:

isoinfo -i image.iso -x /isolinux/initrd.img > initrd.img

The redirection is required as -x extracts to stdout.

If you'd like to list contents of a folder in the ISO:

isoinfo -i image.iso -l

example output:

Directory listing of /
d---------   0    0    0            2048      0 1900 [     26 02]  .
d---------   0    0    0            2048      0 1900 [     26 02]  ..
d---------   0    0    0            2048 Feb  6 2010 [     27 02]  i386
...

John T

Posted 2010-08-25T21:59:34.990

Reputation: 149 037

To use isoread to extract all the files, try this script: https://github.com/goblinhack/isoread

– Neil McGill – 2014-09-29T15:22:13.480

@NeilMcGill Doesn't work here. Lots of errors. – MewX – 2017-02-20T06:15:57.210

ISO with Rock Ridge extensions will require uppercase filenames with ";1" appended at the end. Use -Rl to list the files in this form. – lzap – 2018-06-04T08:53:03.210

6

I found a new best way: using xorriso!

No need to have root access. I've tried 7z and file-roller, both of them don't work here.

xorriso is an open-source program, so you can download the source codes if you don't have it installed by default.

If you haven't installed it, please download the source codes here: https://www.gnu.org/software/xorriso/

The steps are:

tar zxvf xorriso-1.4.6.tar.gz
cd xorriso-1.4.6
./configure
make
cd xorriso
pwd

Add the output directory into environment variable PATH.


Then, you can use it to extract an iso file:

xorriso -osirrox on -indev image.iso -extract / extracted_path

You just need to modify image.iso and extracted_path to make it work on your system.


Referred: https://blog.sleeplessbeastie.eu/2014/08/26/how-to-extract-an-iso-image/

MewX

Posted 2010-08-25T21:59:34.990

Reputation: 161

4

If you have GUI access, right click the iso, and choose "Open with Archive Manager..." or simply run:

file-roller -e /path/to/extract/to /path/to/iso

BloodPhilia

Posted 2010-08-25T21:59:34.990

Reputation: 27 374

1

Most of the above solutions make you extract the iso content, but if the content is large it will take lot of space.

A better solution would be to do the actual mounting of the iso image, and thanks to FuseISO that is possible without root access (but you would still need to ask the admin to install FuseISO if it is not already installed, in ubuntu sudo apt-get install fuseiso)

Once you have FuseISO installed in the machine you can:

# For user to mount an iso file:
mkdir ~/iso
fuseiso ~/my_iso.iso ~/iso
# For user to unmount an iso file:
fusermount -u ~/iso

Antonello

Posted 2010-08-25T21:59:34.990

Reputation: 141

1

If you have 7-zip or unrar installed you can use to either extract iso's.

Nifle

Posted 2010-08-25T21:59:34.990

Reputation: 31 337

What's the syntax for unrar? I think that's for Winrar only – golimar – 2016-03-17T14:21:36.347

1

If you can mount FUSE filesystems, FuseISO is an option for mounting the image.

Ryan C. Thompson

Posted 2010-08-25T21:59:34.990

Reputation: 10 085

0

You don't need to mount it. ISO is just like any other storage file, like a .zip. There are a lot of iso specific tools to do the trick which you should be able to compile as a user, but the easiest way should be to do:

file-roller -h filename.iso

Jarvin

Posted 2010-08-25T21:59:34.990

Reputation: 6 712