2

I got a raw .img image from the Internet Archive and I would like to mount it on my Linux, or at least convert it to an ISO file.

This image works fine under Windows, when using e.g. MagicDisk to emulate a virtual CD drive.

Under Linux, however, most solutions I found on the net do not work here:

  • Mounting it as an ISO-9660 image (i.e. mount -t iso9660 ...)

    Image is not an ISO-9660 file, so it fails:

    mount: wrong fs type, bad option, bad superblock on /dev/loop1,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    $ dmesg | tail 
    ISOFS: Unable to identify CD-ROM format.
    
  • file provides no useful information:

    `cdrom.img: AIX core file fulldump 32-bit 64-bit`
    
  • fdisk -l/parted, as suggested here, does not help:

    Disk cdrom.img: 124 MB, 124749824 bytes
    255 heads, 63 sectors/track, 15 cylinders, total 243652 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk cdrom.img doesn't contain a valid partition table
    
    $ sudo parted cdrom.img
    GNU Parted 2.3
    Using /tmp/cdrom.img
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) u
    Unit?  [compact]? B
    (parted) print
    Error: /tmp/cdrom.img: unrecognised disk label
    
  • Most tools which I usually apply to ISO files (e. g. Ark to uncompress and read contents) do not work either, since it is not an archive.

How can I mount, or at least convert this kind of file?

anol
  • 713

4 Answers4

1

For this kind of image in particular, AcetoneISO did the job, managing to mount the file and allowing me to read it.

It also allowed me to quickly convert the raw disk image to the ISO format (by installing the free, but non-open-source, PowerISO for Linux).

This Wikipedia page provides suggestions of other tools which might be useful in such cases.

anol
  • 713
  • AcetoneISO didn't help, the menu option to convert IMG to ISO just pointed to downloading Poweriso. Poweriso didn't work, it said that the type of the source and destination were equal, so I just copied the file.img to file.iso... and it worked. – Underverse Feb 13 '17 at 12:33
0

Try raw2iso......................

not-a-user
  • 1,577
  • 2
    You could get around the minimum Answer length requirement by explaining if & how raw2iso meets the requirements, and/or how to use it in the OP's case. – Jeff Schaller Oct 29 '17 at 11:10
  • What mode should I select if I don't have any toc, cue or anything, just a .raw file? – Csaba Toth Aug 18 '22 at 19:28
0

If you use BSD, you might get results with qemu-img doing this (or something like it):

qemu-img convert -O vmdk  'genericOS.iso' 'genericOS.vmdk'

qemu-img convert -f vmdk -O raw 'genericOS.vmdk' 'genericOS.img'

Both ISO and IMG are disk images, you can use vmdk as an intermediary state. You will have an image you can use in ESXI too. You see that I converted an IMG into an ISO, I assume it will work in reverse. Though I have not tried the images the commands worked.

0

Although I haven't converted the file per se, but I used Balena Etcher to burn a bootable pen drive. My problem is that I didn't have any cue, toc or other info to select track mode or subchannel mode for raw2iso.

I downloaded Balena Etcher amd64 deb image from https://github.com/balena-io/etcher/releases, you can also select i686 rpm or whatever fits your need.

See also 2nd method in https://www.wikihow.com/Install-Debian-sid where I got this idea from.