ISOs can be opened - Can IMGs be opened, similarly?
Moderator: Forum moderators
-
- Posts: 3837
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1632 times
- Been thanked: 525 times
ISOs can be opened - Can IMGs be opened, similarly?
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
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
- 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?
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.
https://www.techwalla.com/articles/what ... -img-filesConsiderations
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.
On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.
Re: ISOs can opened - Can IMGs be opened, similarly?
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
Re: ISOs can opened - Can IMGs be opened, similarly?
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:
To manually unmount:
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
Code: Select all
umount /tmp/imgmnt
losetup -d /dev/loop5
-
- Posts: 3837
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1632 times
- Been thanked: 525 times
Re: ISOs can be opened - Can IMGs be opened, similarly?
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.
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.
- 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?
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).
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 ^_^
Re: ISOs can be opened - Can IMGs be opened, similarly?
Ummm ... There's a "switch" for that. It's called 'P' (for partitions)
Code: Select all
losetup -f -P --show whatever.img
> /dev/loop5
ls /dev/loop5*
> /dev/loop5 /dev/loop5p1 /dev/loop5p2
- 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?
Wonderful. I didn't know that. Thank you.Jafadmin wrote: ↑Tue Oct 27, 2020 5:23 am Ummm ... There's a "switch" for that. It's called 'P' (for partitions)Then you just mount both partitionsCode: Select all
losetup -f -P --show whatever.img > /dev/loop5 ls /dev/loop5* > /dev/loop5 /dev/loop5p1 /dev/loop5p2
Hope that helps ^_^
Re: ISOs can be opened - Can IMGs be opened, similarly?
The Unix/Linux folks anticipated your unawares and created this wonderful method for finding out about these things. It's called "man pages" https://duckduckgo.com/?t=lm&q=man+losetup&ia=web
.
Re: ISOs can be opened - Can IMGs be opened, similarly?
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