ISOs can be opened - Can IMGs be opened, similarly?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
Clarity
Posts: 3837
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1632 times
Been thanked: 524 times

ISOs can be opened - Can IMGs be opened, similarly?

Post by Clarity »

For decade, ISOs can be opened in PUPs to see its contents.

BUT, does PUPPY have a click-able method of opening disk/partitions IMGs? If not, is there a recommended set of steps to follow to see the contents of the IMG?

Thanks in advance for guidance
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: ISOs can opened - Can IMGs be opened, similarly?

Post by JASpup »

I've read they're similar save one (probably .img) can either be compressed or not, and if not, it's possible to just rename it .iso.
Considerations

There is no difference in the structure of ISO and IMG formats if the IMG file is uncompressed. It is possible for an IMG format file to be renamed with the ISO file extension and then opened in software that only recognizes the ISO file format. This is an effective way of accessing disc information in programs that do not handle the IMG format.
https://www.techwalla.com/articles/what ... -img-files

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

TerryH
Posts: 638
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 158 times
Been thanked: 160 times

Re: ISOs can opened - Can IMGs be opened, similarly?

Post by TerryH »

Clarity wrote: Mon Oct 26, 2020 3:51 pm For decade, ISOs can be opened in PUPs to see its contents.

BUT, does PUPPY have a click-able method of opening disk/partitions IMGs? If not, is there a recommended set of steps to follow to see the contents of the IMG?

Thanks in advance for guidance
Yes, programs such as Uextract (probably others also) will extract a .img file.

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

watchdog
Posts: 85
Joined: Fri Dec 13, 2019 4:32 pm
Has thanked: 14 times
Been thanked: 12 times

Re: ISOs can opened - Can IMGs be opened, similarly?

Post by watchdog »

ScPup64 can mount .img files. Just click on it.
User avatar
Jafadmin
Posts: 385
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: ISOs can opened - Can IMGs be opened, similarly?

Post by Jafadmin »

For those who don't mind getting their hands dirty (using a command line) ..
You can use 'losetup' to easily mount an img file. The '--show' parameter will report which loop device it uses:

Code: Select all

losetup -f --show whatever.img
> /dev/loop5
mkdir /tmp/imgmnt
mount /dev/loop5 /tmp/imgmnt
To manually unmount:

Code: Select all

umount /tmp/imgmnt
losetup -d /dev/loop5
Clarity
Posts: 3837
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1632 times
Been thanked: 524 times

Re: ISOs can be opened - Can IMGs be opened, similarly?

Post by Clarity »

Thanks.

Yes, some of the PUPs have a righ-clickable IMG exposure utility that works similar to how ISOs are treated.

Seems the command line approach shown above might suffice until the right-clickable cascades to all 2020 PUPs.

Thanks everyone.
User avatar
garnet
Posts: 66
Joined: Tue Aug 04, 2020 2:21 pm
Location: Alexandria
Has thanked: 6 times
Been thanked: 12 times

Re: ISOs can be opened - Can IMGs be opened, similarly?

Post by garnet »

The problem with .IMG is that they can represent anything, not necessarily a filesystem image.
Whereas .ISO always means a CD/DVD image.

To make it work, one has to detect what's inside the .IMG and then act accordingly.
For example, @Jafadmin's guide, above, won't work if the .IMG is a disk image (which has partitions, etc).

Hope that helps ^_^

User avatar
Jafadmin
Posts: 385
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: ISOs can be opened - Can IMGs be opened, similarly?

Post by Jafadmin »

:roll: :roll: :roll:
garnet wrote: Tue Oct 27, 2020 2:05 am For example, @Jafadmin's guide, above, won't work if the .IMG is a disk image (which has partitions, etc).
Ummm ... There's a "switch" for that. It's called 'P' (for partitions) :lol: :lol:

Code: Select all

losetup -f -P --show whatever.img
> /dev/loop5
ls /dev/loop5*
> /dev/loop5 /dev/loop5p1 /dev/loop5p2
Then you just mount both partitions :shock:
User avatar
garnet
Posts: 66
Joined: Tue Aug 04, 2020 2:21 pm
Location: Alexandria
Has thanked: 6 times
Been thanked: 12 times

Re: ISOs can be opened - Can IMGs be opened, similarly?

Post by garnet »

Jafadmin wrote: Tue Oct 27, 2020 5:23 am Ummm ... There's a "switch" for that. It's called 'P' (for partitions) :lol: :lol:

Code: Select all

losetup -f -P --show whatever.img
> /dev/loop5
ls /dev/loop5*
> /dev/loop5 /dev/loop5p1 /dev/loop5p2
Then you just mount both partitions :shock:
Wonderful. I didn't know that. Thank you. :thumbup2:

Hope that helps ^_^

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: ISOs can be opened - Can IMGs be opened, similarly?

Post by mistfire »

Yes, open with filemnt
filemnt today are capable to open almost any disk image format
User avatar
Jafadmin
Posts: 385
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: ISOs can be opened - Can IMGs be opened, similarly?

Post by Jafadmin »

garnet wrote: Tue Oct 27, 2020 9:00 am Wonderful. I didn't know that. Thank you. :thumbup2:
The Unix/Linux folks anticipated your unawares and created this wonderful method for finding out about these things. It's called "man pages" :thumbup: https://duckduckgo.com/?t=lm&q=man+losetup&ia=web

.
User avatar
Jafadmin
Posts: 385
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: ISOs can be opened - Can IMGs be opened, similarly?

Post by Jafadmin »

Guess what? Yep, another bash utility. "loopimg"
It loops up and mounts disk image files on /mnt. When you're done you disconnect it with "unloop"

Code: Select all

usage:
$ loopimg sdX.img (it will mount all partitions in /mnt)
$ loopimg sdX1.img (mount an image with a simgle partition)
    (both commands will report the base loop device number)

$ unloop <loop number> (ie: '6')

'unloop' is a symlink to 'loopimg'

Put both in your /MyApplications/bin and you are good to go

terminal1.png
terminal1.png (25.2 KiB) Viewed 823 times
terminal2.png
terminal2.png (16.24 KiB) Viewed 823 times
LoopImg.tar.gz
(34.72 KiB) Downloaded 74 times
Post Reply

Return to “Users”