Image Files

From Gentoo Linux Wiki
Jump to: navigation, search
This article is not very long. You could help Gentoo-Wiki by editing this article.

Filesystems TOC

Filesystem.png


If you own some Image files, those files that can be used by software like k3b to burn CDs or DVDs, you may want to be able to just browse them, without or before to burn them. This can be quite time consuming to find its way trough all the informations on that matter, so here is this kind of Howto.

Contents

[edit] What Software Should I Use

All depend on what you really want to do and which image format you want to deal with.

Some common image format are handled by:

Image Type Handler
ISO kernel loop driver and mount
BIN/CUE bchunk or bin2iso
NRG nrg2iso
MDF/MDS mdf2iso
IMG ccd2iso
B5I b5i2iso

[edit] Mount an ISO file

You need the loop module to be loaded:

modprobe loop

The following command will mount the file archive.iso at /media/image

sudo mount -t iso9660 -o loop archive.iso /media/image
To unmount it issue
sudo umount /media/image

[edit] Convert other image files to ISO

The other image formats need to be converted to ISO before mounting.

[edit] Convert BIN images to ISO

First emerge bchunk:
emerge bchunk
You need both the .bin and the .cue files. Issue
bchunk archive.bin archive.cue archive.iso

[edit] Convert NRG images to ISO

emerge nrg2iso
nrg2iso archive.nrg newarchive.iso

[edit] Convert MDF images to ISO

You can get mdf2iso from here. If you try it, please complete this article with the steps to install it.

mdf2iso archive.mdf newarchive.iso

[edit] Convert IMG images to ISO

emerge ccd2iso
ccd2iso archive.img newarchive.iso

[edit] AcetoneIso

AcetoneIso claim to be able to do all that the above softwares can do. With NRG image of audio CDs, it doesn't give me a better result: the failure was total.

emerge acetoneiso
Before running it, you may want or need to load the loop device as explained before, and also the fuse module with
modprobe fuse

[edit] CDemu

Finally, CDemu let me do what I wanted to do with my NRG image files of audio CDs.

[edit] CDemu installation and configuration

emerge cdemu

CDemu run in 2 parts: a daemon and the user space program. Before to start the daemon, you may want to adjust its configuration file:

File: /etc/conf.d/cdemud
CDEMUD_DEVICES="4"
...
CDEMUD_AUDIO_DRIVER="ALSA"

The first setting will let you choose the number of devices you want to be able to open at the same time, each open device will correspond to one image file. The second setting is the audio driver that cdemud will use.

You must also load the fuse and vhba modules before starting the daemon:

modprobe fuse
modprobe vhba
/etc/init.d/cdemud start

The loop device will be useful too:

modprobe loop

In order to make this permanent:

File: /etc/conf.d/modules
modules="loop fuse vhba"
and
rc-update add cdemud default
You also need to add your user to the cdemu group
gpasswd -a your_user cdemu

You must logout and login again for this to work.

Now, you can begin to use CDemu.

[edit] CDemu utilisation

Get some help:
cdemu -b system --help
Get information about the supported parsers:
cdemu -b system enum-supported-parsers
 PARSER-NRG: NRG (Nero Burning Rom) images
 PARSER-B6T: BlindWrite 5/6 images
 PARSER-ISO: ISO images
 PARSER-C2D: C2D (CeQuadrat WinOnCD) images
 PARSER-CDI: CDI (DiscJuggler) images
 PARSER-TOC: Cdrdao TOC files
 PARSER-CIF: CIF (Adaptec Easy CD Creator) images
 PARSER-CCD: CCD (CloneCD) images
 PARSER-MDS: MDS (Media descriptor) images
 PARSER-XCDROAST: X-CD-Roast TOC files
 PARSER-CUE: CUE images
 PARSER-DAA: PowerISO direct access archives
Show the status of the devices:
cdemu -b system status
Status des périphériques:
DEV   VIDÉ      NOM DE FICHIER
0     0          N/A
1     0          N/A
2     0          N/A
3     0          N/A
Mount an image file:
cdemu -b system load 0 "CD 4.nrg"

Your desktop automounter must do the rest.

cdemu -b system status
Status des périphériques:
DEV   VIDÉ      NOM DE FICHIER
0     1          /mnt/usb3/Musique/Beethoven/CD 4.nrg
1     0          N/A
2     0          N/A
3     0          N/A
Unmount the "disk":
cdemu -b system unload 0

It is also a script on the forum for easy image mounting with CDemu and Nautilus, but it look like to be broken at that time.

[edit] References

El Bloguenn: Mounting .iso .bin .nrg .cue .dmf and .img in Linux

Personal tools