Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[script]isomount - mount .iso, .cue(bin&.img), & .nr
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Wed Jun 16, 2004 11:15 pm    Post subject: [script]isomount - mount .iso, .cue(bin&.img), & .nr Reply with quote

Here's a little script I wrote to mount images such as .iso, .cue (.bin & .img), and .nrg from the command-line. Obviously you can do all this without the script, but mounting images with 'cdemu' takes more steps than I liked and is what got me started on the scripts. I figured it might be nice to share in case someone else might find it useful.

get it here
Back to top
View user's profile Send private message
syscrash
Guru
Guru


Joined: 14 Apr 2003
Posts: 541

PostPosted: Wed Jun 16, 2004 11:24 pm    Post subject: Reply with quote

Sounds cool, thanks!
Back to top
View user's profile Send private message
semiSfear
Guru
Guru


Joined: 08 Jul 2003
Posts: 302
Location: Adelaide, SA

PostPosted: Thu Jun 17, 2004 11:49 am    Post subject: Reply with quote

Thanks, that script will be handy for me :D
_________________
DnB is my religion, Jungle is my church.
Back to top
View user's profile Send private message
raylpc
Guru
Guru


Joined: 07 Aug 2003
Posts: 310
Location: Toronto, Canada

PostPosted: Fri Jul 30, 2004 3:04 pm    Post subject: Reply with quote

Thanks, Wi1d. The script is pretty handy. But the install.sh adds a very unsafe line to /etc/sudoers
Code:
echo "$user ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers

It would be better if you only adds the necessary commands.
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Fri Jul 30, 2004 6:03 pm    Post subject: Reply with quote

Your right. Not sure what I was thinking. I'll make sure I change that.
Back to top
View user's profile Send private message
Realmaker
l33t
l33t


Joined: 17 Sep 2003
Posts: 683
Location: Bremen, Germany

PostPosted: Fri Jul 30, 2004 9:36 pm    Post subject: Reply with quote

Why do you need a script for mounting isos?
I just do
Code:
#mount -o loop CD.iso /mnt/cdrom

_________________
Athlon 2600+ Barton, Asus A7N8x-X, nForce2, Asus Geforce FX5700 256mb, TwinMos 512ddr-sdram cl 2.5

Wer andern eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Fri Jul 30, 2004 9:42 pm    Post subject: Reply with quote

As can anyone else but I wrote it because when mounting bin/cue images with cdemu theres more typing involved than I personally like. Later I added a flag for .iso and .nrg since I was already at it.
Back to top
View user's profile Send private message
Omega Red
n00b
n00b


Joined: 17 Jun 2004
Posts: 21

PostPosted: Sun Aug 01, 2004 2:25 am    Post subject: Reply with quote

Okay ... tried using your script and manually mounting my iso and both ways gives me errors.

Code:
isomount -i Anchorman1.iso

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)


Code:
mount -o loop Anchorman1.iso /mnt/cdrom
mount: you must specify the filesystem type


I've also tried specifing the FS Type using -t but in the end I just get the same error that I get when using the script. Any ideas?
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sun Aug 01, 2004 5:48 pm    Post subject: Reply with quote

Omega Red wrote:
Okay ... tried using your script and manually mounting my iso and both ways gives me error

Can you mount any other iso images or can you do a checksum? Maybe it's corrupt?
Back to top
View user's profile Send private message
Omega Red
n00b
n00b


Joined: 17 Jun 2004
Posts: 21

PostPosted: Sun Aug 01, 2004 11:12 pm    Post subject: Reply with quote

i tried it with another .iso and two .nrg files and i get the same results with those
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Mon Aug 02, 2004 9:05 am    Post subject: Reply with quote

Are you sure you have loopback device support enabled in your kernel?
Back to top
View user's profile Send private message
Omega Red
n00b
n00b


Joined: 17 Jun 2004
Posts: 21

PostPosted: Wed Aug 04, 2004 11:34 pm    Post subject: Reply with quote

im not really sure if it is ... but i do remember something i installed checking for it and it was there ... just to make sure how would i check to see if I have it enabled?
Back to top
View user's profile Send private message
baraka
n00b
n00b


Joined: 16 Jan 2004
Posts: 3

PostPosted: Sun Aug 22, 2004 2:21 am    Post subject: what do i need for mounting .nrg images even manually ? Reply with quote

what do i need for mounting .nrg images even manually ?
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sun Aug 22, 2004 7:00 am    Post subject: Reply with quote

Omega Red wrote:
im not really sure if it is ... but i do remember something i installed checking for it and it was there ... just to make sure how would i check to see if I have it enabled?

Sorry for the late response. Somehow I got unsubscribed to the post. There are simplier ways check if loopback is enabled but why not just look at your kernel.

as root:
Code:
% cd /usr/src/linux
% make menuconfig

Go to and check that loopback device support is enabled:
(for 2.6 kernels)
Code:
Device Drivers  --->
     Block devices  --->
         <*> Loopback device support

(for 2.4 kernel)
Code:
Block Devices ->
     <*> Loopback device support

If it wasn't enabled and you do enable it, then you would need to compile it into your kernel:
(for 2.6 kernels)
Code:
make && make modules_install

(for 2.4 kernels)
Code:
make dep && make clean bzImage modules modules_install

then move the new image to boot:
Code:
 mount /boot
 mv /boot/bzImage /boot/bzImage.old
 cp /usr/src/linux/arch/i386/boot/bzImage /boot/

reboot and then try it out:
mount -t iso9660 -o loop image.iso ./dir/
or
isomount -i image.iso
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sun Aug 22, 2004 7:01 am    Post subject: Reply with quote

baraka wrote:
what do i need for mounting .nrg images even manually ?

Nothing other than loopback support in your kernel.

mount -t iso9660 -o loop,offset=307200 image.nrg ./dir/
Back to top
View user's profile Send private message
eNTi
Veteran
Veteran


Joined: 20 Oct 2002
Posts: 1011
Location: Salzburg, Austria

PostPosted: Fri Oct 08, 2004 10:34 pm    Post subject: Reply with quote

Code:
make -C /usr/src/linux SUBDIRS=/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_be                                               
ta modules
make[1]: Entering directory `/usr/src/linux-2.6.9-rc2-love4'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule                                               
.
  CC [M]  /var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.o
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c: In function `cdemu_                                               
read_actor':
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:160: error: structur                                               
e has no member named `buf'
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:160: error: structur                                               
e has no member named `buf'
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:165: error: structur                                               
e has no member named `buf'
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c: In function `cdemu_                                               
transfer':
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:212: error: structur                                               
e has no member named `buf'
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c: In function `cdemu_                                               
block_ioctl':
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:705: warning: passin                                               
g arg 1 of `cdrom_ioctl' from incompatible pointer type
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:705: warning: passin                                               
g arg 2 of `cdrom_ioctl' from incompatible pointer type
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:705: warning: passin                                               
g arg 3 of `cdrom_ioctl' makes pointer from integer without a cast
/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.c:705: error: too few                                               
arguments to function `cdrom_ioctl'
distcc[1629] ERROR: compile /var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/                                               
cdemu.c on localhost failed
make[2]: *** [/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta/cdemu.o] Error                                               
 1
make[1]: *** [_module_/var/tmp/portage/cdemu-0.6_beta/work/cdemu-0.6_beta] Error                                               
 2
make[1]: Leaving directory `/usr/src/linux-2.6.9-rc2-love4'
make: *** [all] Error 2

what could be wrong here? do i neet something special in the kernel?
_________________
If you fall off a cliff, you might as well try to fly. After all, you got nothing to lose.

-- John Sheridan - Babylon 5, Season 4
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sat Oct 09, 2004 1:04 am    Post subject: Reply with quote

Not that I know or read about but I've guessing maybe it's because your using love maybe? I'm noticing I'm getting errors to now with nitro-sources. Maybe its a 2.6.9 problem. I still have a 2.6.8 image that I will boot w/ next time I reboot and try to install. I
Back to top
View user's profile Send private message
cotu
n00b
n00b


Joined: 12 Sep 2004
Posts: 35

PostPosted: Sun Oct 10, 2004 1:14 am    Post subject: Reply with quote

I'm getting the same error as Omega Red:
Code:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)

According to this forum discussion if ext2 is used loopback device is disabled. Is this true, and if so do they mean if the iso is on an ext2 partition or if you have support enabled? Can anyone else with ext2 file system support enabled in their kernel mount iso's? Would like to hear if others are able to before I go reformat my boot partition..

*edit: problem for me was my images, i just made an iso with mkisofs and mounted fine, can't mount any of my .nrg's though, or any other of my other iso's for that matter.. o well
Back to top
View user's profile Send private message
perseguidor
Apprentice
Apprentice


Joined: 01 Aug 2004
Posts: 278
Location: West Kingdom of Buenos Aires

PostPosted: Sun Oct 10, 2004 5:34 am    Post subject: Reply with quote

Wi1d wrote:
baraka wrote:
what do i need for mounting .nrg images even manually ?

Nothing other than loopback support in your kernel.

mount -t iso9660 -o loop,offset=307200 image.nrg ./dir/


Didn't know of 'offset', I'll give it a try next time I bump into a .nrg and don't want to convert it to iso.

Thanks.
_________________
O make me a mask!
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sun Oct 10, 2004 5:46 am    Post subject: Reply with quote

cotu wrote:
I'm getting the same error as Omega Red:
Code:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)

According to this forum discussion if ext2 is used loopback device is disabled. Is this true, and if so do they mean if the iso is on an ext2 partition or if you have support enabled? Can anyone else with ext2 file system support enabled in their kernel mount iso's? Would like to hear if others are able to before I go reformat my boot partition..

*edit: problem for me was my images, i just made an iso with mkisofs and mounted fine, can't mount any of my .nrg's though, or any other of my other iso's for that matter.. o well


My boot partition is ext2 and I have no problems. Maybe you meant your root partition? In that case I use reiserfs. Are you sure you have loopback support compiled in your kernel?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum