sudo mkdir /media/virtual
sudo modprobe loop
sudo mount image.iso /media/virtual -o loop
Now let's proceed.I'm sure you have many times downloaded a CD/DVD image that wasn't standard iso file. The problem with these ones is that you cannot mount them in Ubuntu. There are many bin2iso and similar converter programs but theres a simple way to get these images mounted. It's called cdemu.
Before you continue be aware. If you have download bin/cue image that should contain a video it is possible that it's a svcd image and if this is the case mplayer can natively read this files. Just type
mplayer image.bin
and it should work.
Also, with VLC player you can play iso files. To install vlc type:
sudo apt-get install vlc
If this is not the case download latest cdemu from here. Extract it and navigate to the extracted folder. Feisty users should type:
nano cdemu_core.c
and replace the generic_file_read with do_sync_read. It should be done in two lines as shown on images below.
Now type:
make
sudo make install
sudo gedit /usr/bin/create_cdemu_devs.sh
and replace everything with following:
#!/bin/bash
#if [ -e /dev/.devfs ] ; then
# echo "You have devfs, nodes will be created automagically"
# exit 0
#fi
#if [ -e /dev/.udev ] || [ -e /dev/.udev.tdb ] ; then
# echo "You have udev, nodes will be created automagically"
# exit 0
#fi
#if [ ! -z "${DESTDIR}" ] ; then
# echo "Creating a package, nodes should be created later"
# exit 0
#fi
# find out cdemu device major number
if [ ! -r /proc/devices ]; then
echo "Can't open /proc/devices, make sure /proc is mounted"
exit 0
fi
modprobe cdemu
if [ -z "$(lsmod | grep ^cdemu)" ]; then
echo "Can't load module"
exit 0
fi
cdemumajor=$(grep "^[[:space:]]*[0-9]\+[[:space:]]\+cdemu$" /proc/devices | grep -o "[0-9]\+")
if [ -z "$cdemumajor" ]; then
echo "Can't find cdemu device number in /proc/devices"
exit 0
fi
#modprobe -r cdemu
#
if [ -e /dev/cdemu ]; then
rm -rf /dev/cdemu
fi
if [ -b /dev/cdemu0 ]; then
rm -f /dev/cdemu*
fi
mkdir /dev/cdemu
for drivenumber in `seq -w 0 7` ; do
mknod /dev/cdemu/${drivenumber} b ${cdemumajor} ${drivenumber}
done
#echo "if no error did show up device files created ;-)"
Next type:
sudo nano /etc/rc.local
and before exit 0 you add following:
echo " Creating CDemu devices..."
create_cdemu_devs.sh
Type:
sudo modprobe loop
sudo create_cdemu_devs.sh
And thats it. To mount bin/cue image type:
cdemu X image.cue
mkdir /media/cdemuX
sudo mount -t iso9660 -o -ro /dec/cdemu/X /media/cdemuX
Where X is any integral number between 0 and 7 (X=0,1,2,3,...,7). This is because u get 8 virtual CD-ROMs so you can mount 8 images at the same time.
To unmount image type:
cdemu -u X
where X is the number of drive you wish to unmount.
You can find more tips on configuring your cdemu here. Steps 7. and successive.
No comments:
Post a Comment