How To: Mount ISO image in Linux

0

Did you know that most of the DVDs and CDs have the same filesystem type? Regardless of the actual OS you’re hoping to install, that installer DVD image you downloaded is likely to be readable in both Linux and Windows.

Today I’ll show you how simple it is to mount ISO image in Linux in case you want to inspect the CD/DVD contents before burning the ISO image onto USB or DVD disc.

Here’s the image:

root@cybernationalsecurity:/ # ls -al /dist/OI-hipster-text-20180427.iso
-rw-r–r– 1 root root 696750080 Apr 28 2018 /dist/OI-hipster-text-20180427.iso

Let’s mount it under the /mnt directory:

root@cybernationalsecurity:/ # mount /dist/OI-hipster-text-20180427.iso -o loop /mnt
mount: /dev/loop0 is write-protected, mounting read-only

If we check, /mnt now has the disc mounted:

root@cybernationalsecurity:/ # df -h /mnt
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 665M 665M 0 100% /mnt

The files listing confirms it’s the OpenIndiana Solaris installer I’m planning to research:

root@cybernationalsecurity:/ # ls -la /mnt
total 504603
drwxr-xr-x 16 root root 4096 Apr 27 2018 .
drwxr-xr-x 24 root root 4096 Jan 5 16:27 ..
lrwxrwxrwx 1 root root 9 Apr 27 2018 bin -> ./usr/bin
drwxr-xr-x 10 root sys 4096 Apr 27 2018 boot
-r–r–r– 1 root root 2048 Apr 27 2018 .catalog
drwxr-xr-x 2 root sys 2048 Apr 27 2018 .cdrom
drwxr-xr-x 14 root sys 6144 Apr 27 2018 dev
drwxr-xr-x 3 root sys 2048 Apr 27 2018 devices
drwxr-xr-x 2 root sys 2048 Apr 27 2018 export
dr-xr-xr-x 2 root root 2048 Apr 27 2018 home
-rw-r–r– 1 root root 19 Apr 27 2018 .image_info
drwxr-xr-x 5 65432 wheel 2048 Apr 27 2018 jack
-rw-r–r– 1 root root 6707 Apr 27 2018 .livecd-cdrom-content
drwxr-xr-x 3 root sys 2048 Apr 27 2018 mnt
drwxr-xr-x 5 root sys 2048 Apr 27 2018 platform
dr-xr-xr-x 2 root root 2048 Apr 27 2018 proc
-rw-r–r– 1 root root 0 Apr 27 2018 reconfigure
drwx—— 2 root root 2048 Apr 27 2018 root
drwxr-xr-x 3 root root 2048 Apr 27 2018 save
-rw-r–r– 1 root root 21997056 Apr 27 2018 solarismisc.zlib
-rw-r–r– 1 root root 494662656 Apr 27 2018 solaris.zlib
drwxr-xr-x 5 root root 2048 Apr 27 2018 system
drwxrwxrwt 2 root sys 2048 Apr 27 2018 tmp
-r–r–r– 1 root root 37 Apr 27 2018 .volsetid

You can’t edit ISO image directly

If you look closer, you’ll see that /mnt is actually mounted read-only:

root@cybernationalsecurity:/ # mount | grep /mnt
/dist/OI-hipster-text-20180427.iso on /mnt type iso9660 (ro,relatime)

LEAVE A REPLY

Please enter your comment!
Please enter your name here