View previous topic :: View next topic |
Author |
Message |
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Wed Jun 16, 2004 11:15 pm Post subject: [script]isomount - mount .iso, .cue(bin&.img), & .nr |
|
|
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 |
|
|
syscrash Guru
Joined: 14 Apr 2003 Posts: 541
|
Posted: Wed Jun 16, 2004 11:24 pm Post subject: |
|
|
Sounds cool, thanks! |
|
Back to top |
|
|
semiSfear Guru
Joined: 08 Jul 2003 Posts: 302 Location: Adelaide, SA
|
Posted: Thu Jun 17, 2004 11:49 am Post subject: |
|
|
Thanks, that script will be handy for me _________________ DnB is my religion, Jungle is my church. |
|
Back to top |
|
|
raylpc Guru
Joined: 07 Aug 2003 Posts: 310 Location: Toronto, Canada
|
Posted: Fri Jul 30, 2004 3:04 pm Post subject: |
|
|
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 |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Fri Jul 30, 2004 6:03 pm Post subject: |
|
|
Your right. Not sure what I was thinking. I'll make sure I change that. |
|
Back to top |
|
|
Realmaker l33t
Joined: 17 Sep 2003 Posts: 683 Location: Bremen, Germany
|
Posted: Fri Jul 30, 2004 9:36 pm Post subject: |
|
|
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 |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Fri Jul 30, 2004 9:42 pm Post subject: |
|
|
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 |
|
|
Omega Red n00b
Joined: 17 Jun 2004 Posts: 21
|
Posted: Sun Aug 01, 2004 2:25 am Post subject: |
|
|
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 |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Sun Aug 01, 2004 5:48 pm Post subject: |
|
|
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 |
|
|
Omega Red n00b
Joined: 17 Jun 2004 Posts: 21
|
Posted: Sun Aug 01, 2004 11:12 pm Post subject: |
|
|
i tried it with another .iso and two .nrg files and i get the same results with those |
|
Back to top |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Mon Aug 02, 2004 9:05 am Post subject: |
|
|
Are you sure you have loopback device support enabled in your kernel? |
|
Back to top |
|
|
Omega Red n00b
Joined: 17 Jun 2004 Posts: 21
|
Posted: Wed Aug 04, 2004 11:34 pm Post subject: |
|
|
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 |
|
|
baraka n00b
Joined: 16 Jan 2004 Posts: 3
|
Posted: Sun Aug 22, 2004 2:21 am Post subject: what do i need for mounting .nrg images even manually ? |
|
|
what do i need for mounting .nrg images even manually ? |
|
Back to top |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Sun Aug 22, 2004 7:00 am Post subject: |
|
|
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 |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Sun Aug 22, 2004 7:01 am Post subject: |
|
|
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 |
|
|
eNTi Veteran
Joined: 20 Oct 2002 Posts: 1011 Location: Salzburg, Austria
|
Posted: Fri Oct 08, 2004 10:34 pm Post subject: |
|
|
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 |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Sat Oct 09, 2004 1:04 am Post subject: |
|
|
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 |
|
|
cotu n00b
Joined: 12 Sep 2004 Posts: 35
|
Posted: Sun Oct 10, 2004 1:14 am Post subject: |
|
|
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 |
|
|
perseguidor Apprentice
Joined: 01 Aug 2004 Posts: 278 Location: West Kingdom of Buenos Aires
|
Posted: Sun Oct 10, 2004 5:34 am Post subject: |
|
|
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 |
|
|
Wi1d Apprentice
Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Sun Oct 10, 2004 5:46 am Post subject: |
|
|
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 |
|
|
|