Tutorials > Mounting ISO/IMG/Bin/Cue files in Linux
1 << PrevNext >>
 
This topic has been autolocked for inactivity. If you have something to add, Click Here to request it is re-opened.
 
#357071 by unknown[98028] at 2005-08-29 08:53:39 (7 years ago) - [Report]
What CDemu is: <
There is an easier way to mount ISO files only.
But the easy way works on ISO files only.
With cdemu you can amount bin/cue img iso etc etc
CDemu is just a kernel module.
How to get CDemu:<
If you use Gentoo Linux (as I do) you can simply run: emerge cdemu
If you use debian it's most likely in apt-get. Which you can get via apt-get install cdemu
If you don't have debian or gentoo here's how you get cdemu:
Open a terminal program
Login in as root and wgt the files you need:
$ su -
# cd ~ (just to check if you're in home)
# wget h**p://robert.private.outertech.com/virtualcd/cdemu-0.7.tar.bz2
Now uncompress the files:
# tar -xjvf cdemu-0.7.tar.bz2
Build and Installing CDemu
Side note: If you are fairly new to Linux and you get problems making/installing cdemu due to it not finding your kernel
source, you need to install kernel source. If you use Mandriva Mandrake Redhat or basically any Linux OS you can buy prepackaged at Best Buy, you need to install the kernel source.
Running uname -r will tell you what kernel version you have, and you either need to build your own kernel (which if you're new to Linux isn't going to be fun but it's worth
the learning experience) OR you need to install the kernel source package in whatever package manager you have.
<
# cd cdemu-0.7
# make
# make install
# modprobe cdemu
Doublecheck to see if it loaded:
# lsmod | grep cdemu
Unfortunately we aren't done yet.
Now we have a kernel module installed.
But it won't load on boot.
Here's specific instructions if you run Gentoo Linux ONLY:
(scroll down further for general Linux install instructions)
If you use kernel 2.6:
# echo "cdemu" >> /etc/modules.autoload.d/kernel-2.6
If you use kernel 2.4
# echo "cdemu" >> /etc/modules.autoload.d/kernel-2.4
Then run (as root)
#modules-update
Instructions for generic Linux systems:
See if /etc/rc.d/rc.modules exists:
# ls -l /etc/rc.d/rc.modules
If it does, it will return the filename with permissions etc.
Next add the module to boot
# echo "/sbin/modprobe cdemu" >> /etc/rc.d/rc.modules
If you dont use devfs or udev or something you have to run
# /etc/mkdev cdemu0
# /etc/mkdev cdemu1
Usage <
Okay so now go into to the directory where your cue/img/iso file is:
# cdemu 0 haha.cue
This loads it into cdemu device 0.
Which is /dev/cdemu0
If it's a SVCD or VCD you can run VLC media player and go to File : Open Disc and put the file type and /dev/cdemu0
If it's not SVCD or VCD and is data, you can always:
# mount /dev/cdemu0 /mnt/cdrom
#cd /mnt/cdrom
The cool thing is if you have 2 cds. You can extract both of them and mount one to device 0 and the other to device 1
and just change the disc source from /dev/cdemu0 to /dev/cdemu1.
To unload an image you can run:
# cdemu -u 0
Look for more tutorials by me in the near future.
Enjoy.
#357081 by kyx (Power User) at 2005-08-29 09:15:14 (7 years ago) - [Report]
Thanks for the information, I was looking for something like this
How do you mount a image if you dont have a cue file?
Quote:
Traceback (most recent call last):
File "/usr/bin/cdemu", line 105, in ?
main()
File "/usr/bin/cdemu", line 97, in main
device = libcdemu.get_device_from_drive_number(args[0])
File "/usr/lib/python2.3/site-packages/libcdemu.py", line 316, in get_device_from_drive_number
raise CDEmu_Error, "could't find block device, if you've no devfs make sure you created them"
libcdemu.CDEmu_Error: could't find block device, if you've no devfs make sure you created them
#357445 by unknown[98028] at 2005-08-29 15:44:56 (7 years ago) - [Report]
Look at the contents of a cue file. You can easily create something similiar.
As for that error. Simply make a device (I use udev so I don't have to)
run
#/etc/mkdev cdemu0
etc
I will add this to the tutorial
#357682 by kyx (Power User) at 2005-08-29 19:31:05 (7 years ago) - [Report]
I use udev as well but still no luck
<
Quote:
Linux mad-cricket 2.6.12-gentoo-r9 #1 SMP Fri Aug 26 18:17:23 UTC 2005 i686 AMD Athlon(tm) XP 3200+ AuthenticAMD GNU/Linux
#357809 by unknown[98028] at 2005-08-29 21:32:57 (7 years ago) - [Report]
Nice tutorial mate... ive been running linux for a while and knew how to do this.. where i came unstuck was "unmounting" the iso's when i deleted the source.. when i stopped playing the game or got bored or whatever.. its nice to get the system back to how it was.. perhaps you can add this in your already very good tutorial..
Cheers
CT
#358161 by unknown[98028] at 2005-08-30 03:29:53 (7 years ago) - [Report]
Ah thanks for reminding me.
The command is:
cdemu -u 0