Howto convert file .nrg to .iso

Asked by jcervilla on 2007-05-02


     I'm trying to burn a .nrg image file with k3b in kubuntu (Feisty). I convert the .nrg file to .iso file with nrg2iso. It seems to work fine, but when I try to read the generated .iso file with k3b, it says to me it's not a valid .iso file. I have tried it with various generated .iso files, but it never works. Have you tried it? Does somene know what's the problem?


Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
Rodrigo Donado (frezeeer) said : #1

you need to get a program named nrg2iso
    sudo apt-get install nrg2iso
then do:
    nrg2iso image.nrg image.iso
I hope that helps

jcervilla (jcervilla) said : #2

I use nrg2iso as I said before, but the generated .iso fails with k3b, because k3b don't recognize the generated .iso file as a valid .iso image.

Rodrigo Donado (frezeeer) said : #3

Try to mount the .iso, and see if you can access the files,
    sudo mkdir /mnt/iso
    mount isoname.iso /mnt/iso/ -t iso9660 -o ro,loop=/dev/loop0
where isoname is the name of your iso.
It could be that the iso is corrupted.

Try to mount the ISO:

sudo mkdir /media/iso
sudo mount -o loop /pathto/myiso.iso /media/iso

If the ISO in mountable you can burn it using K3B. If your ISO is a special protected CD/DVD ISO this method can fail for your pourpose.

jcervilla (jcervilla) said : #5

Hi again:

    When I try to mount the generated .iso file it doesn't work. When I see dmesg messages, this are the lines with the mount error:

28820[57299.364000] cdrom: This disc doesn't have any tracks I recognize!
[82453.028000] loop: loaded (max 8 devices)
[82453.576000] cramfs: wrong magic
[82453.580000] VFS: Can't find ext3 filesystem on dev loop0.
[82453.580000] printk: 7 messages suppressed.
[82453.580000] NTFS-fs error (device loop0): read_ntfs_boot_sector(): Primary boot sector is invalid.
[82453.580000] NTFS-fs error (device loop0): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[82453.580000] NTFS-fs error (device loop0): ntfs_fill_super(): Not an NTFS volume.
[82453.620000] Unable to identify CD-ROM format.
[82552.628000] Unable to identify CD-ROM format.

Must I suppose nrg2iso has a bug? When the .iso file is generated I don't see any error.

Thanks for your support.

Giovanni Condello (nanomad) said : #6

(From the readme)
Warning: This program can not convert audio CDs.
Does this apply to your case?

Does burning the ISO-generated image under another OS (like Windows or MacOS) works?

What does the command file say about the generated file?

archdrone (archdrone) said : #7

I have the same problem: a bunch of nrg images which work fine in daemon tools under WinXP and even in Magic ISO under Wine. When I use nrg2iso it creates iso file without errors but the iso file cant be mounted using -o loop. I have also tried some simple single-purposed tools (under Wine) to convert nrg images to iso ones but all of them dont seem to work as the iso they create is not valid. Nevertheless I have come across to *some* nrg images which *can* be mounted with mount -o loop without converting to iso and these nrg images can be also flawlessly converted by those simple tools. This situation really annoys me as I cant find any tool like nrg2iso for linux which *can* convert *all* nrg variants.
and please note none of the "invalid" nrg images contained more tracks than one (which also perhaps could be problem because afaik iso format doesnt support mixed mode cd but nrg does). I would be very grateful if anyone could solve the problem:)

Tom Hansen (tomh-uwm) said : #8

I have successfully mounted several .NRG files under Linux. The key: it appears that an .NRG file has 300KB (75x4096) = 307200 bytes pre-pended to the ISO image.

So I was able to do this as root:

    mkdir /media/loop_cd
    mount -o norock,map=off,loop,offset=307200 imagefile.nrg /media/loop_cd

and it worked. (the norock,map-off options are optional)

One could then easily convert NRG to ISO by using dd like this:

   dd if=imagefile.nrg of=isofile.iso bs=4096 skip=75

I'm not sure if the offset is always 4096x75 bytes, but it has been in all the .NRG files that I've tried.


If you do this on an .NRG file:

linuxprompt$ od -Ad -c file.nrg | more

you see output like this:

0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0339968 001 C D 0 0 1 001 \0

while on an ISO you see this:

0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0032768 001 C D 0 0 1 001 \0 W i n 3 2

Note that the line with the CD001 signature is at address 32768 on the real .ISO file, while it is at address 339968 in the .NRG file. A simple calculation then reveals the offset:

    339968 - 32768 = 307200.

So, if the offset of 307200 doesn't work for you on an .NRG file, just try the "od" command above on the file to see the offset is the same. It might be that on multisession images, or on other types of source discs (DVD, etc), or maybe even different versions of Nero, that the offset changes.

archdrone (archdrone) said : #9

There is a nrg4iso which should be able to convert DAO/TAO nrg images to iso ones. I have successfuly compiled it but the programs seems not to work correcty (it only creates empty iso file and prints info about detected nrg image on stdout). Let's hope it'll work ok eventually.

Anselmo (anselmo) said : #10

I use iat.

$ iat --help
Iso9660 Analyzer Tool v0.1.3

and it works perfectly when nrg2iso fails.

$ iat some.nrg some.iso

Sebastian Muniz (d0lapevich) said : #11

Same here. iat worked where nrg2iso didn't.

user@host:~/tmp$ sudo apt-get install iat
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 7,598 B of archives.
After this operation, 65.5 kB of additional disk space will be used.
Get:1 trusty/universe iat amd64 0.1.3-7 [7,598 B]
Fetched 7,598 B in 0s (11.0 kB/s)
Selecting previously unselected package iat.
(Reading database ... 323270 files and directories currently installed.)
Preparing to unpack .../archives/iat_0.1.3-7_amd64.deb ...
Unpacking iat (0.1.3-7) ...
Processing triggers for man-db ( ...
Setting up iat (0.1.3-7) ...

Iso9660 Analyzer Tool v0.1.3 by Salvatore Santagati
Licensed under GPL v2 or later

Detect Signature RAW 2 at 16
Detect Signature RAW at 2344
Detect Signature RAW 2 at 2368
Detect Signature RAW at 4696
Detect Signature RAW 2 at 4720
Detect Signature RAW at 7048
Detect Signature RAW 2 at 7072
Detect Signature RAW at 9400
Detect Signature RAW 2 at 9424
Detect Signature RAW at 11752
Detect Signature RAW 2 at 11776
Detect Signature RAW at 14104
Detect Signature RAW 2 at 14128
Detect Signature RAW at 16456
Detect Signature RAW 2 at 16480
Detect Signature RAW at 18808
Detect Signature RAW 2 at 18832
Detect Signature RAW at 21160
Detect Signature RAW 2 at 21184
Detect Signature RAW at 23512
Detect Signature RAW 2 at 23536
Detect Signature RAW at 25864
Detect Signature RAW 2 at 25888
Detect Signature RAW at 28216
Detect Signature RAW 2 at 28240
Detect Signature RAW at 30568
Detect Signature RAW 2 at 30592
Detect Signature RAW at 32920
Detect Signature RAW 2 at 32944
Detect Signature RAW at 35272
Detect Signature RAW 2 at 35296
Detect Signature RAW at 37624
Detect Signature RAW 2 at 37648
Detect Signature ISO9660 START at 37656
Detect Signature RAW at 39976
Detect Signature RAW 2 at 40000
Detect Signature RAW at 42328
Detect Signature RAW 2 at 42352
Detect Signature ISO9660 END at 42360

 Image offset start at 0
 Sector header 24 bit
 Sector ECC 280 bit
 Block 2352

INSURRECTION.NRG: AIX core file fulldump 32-bit 64-bit

Notice what being an NRG file, its magic shows AIX core dump.

Can you help with this problem?

Provide an answer of your own, or ask jcervilla for more information if necessary.

To post a message you must log in.