Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 09-28-2002, 12:33 PM   #1
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
Mount ISO

How do i mount an ISO image with 'mount_cd9660'?
It keeps complaining about proper usage.
xJay is offline   Reply With Quote
Old 09-28-2002, 02:24 PM   #2
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
why don't you provide some samples of what you've tried and the results?
__________________
On a clear disk, you can seek forever.
mervTormel is offline   Reply With Quote
Old 09-28-2002, 09:46 PM   #3
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
[Jay:~] jay% mount_cd9660 -o loop,unhide -t iso9660 -r diskImages/linkin_park.iso mnt/linkin_park/
usage: mount_cd9660 [-egjr] [-o options] [-s startsector] special node

[Jay:~] jay% mount_cd9660 -o loop,unhide -t iso9660 diskImages/linkin_park.iso mnt/linkin_park/
usage: mount_cd9660 [-egjr] [-o options] [-s startsector] special node
[Jay:~] jay% mount_cd9660 -o loop,unhide -r diskImages/linkin_park.iso mnt/linkin_park/
usage: mount_cd9660 [-egjr] [-o options] [-s startsector] special node
[Jay:~] jay% mount_cd9660 -o loop -t iso9660 -r diskImages/linkin_park.iso mnt/linkin_park/
usage: mount_cd9660 [-egjr] [-o options] [-s startsector] special node
[Jay:~] jay% mount_cd9660 -o unhide -t iso9660 -r diskImages/linkin_park.iso mnt/linkin_park/
usage: mount_cd9660 [-egjr] [-o options] [-s startsector] special node
[Jay:~] jay% mount_cd9660 -t iso9660 -r diskImages/linkin_park.iso mnt/linkin_park/
mount_cd9660: illegal option -- t
usage: mount_cd9660 [-egjr] [-o options] [-s startsector] special node
[Jay:~] jay% mount_cd9660 diskImages/linkin_park.iso mnt/linkin_park/
mount_cd9660: Block device required

[Jay:~] jay% mount -o loop,unhide -t iso9660 -r diskImages/linkin_park.iso mnt/linkin_park/
mount: exec /usr/sbin/mount_iso9660 for /Users/jay/mnt/linkin_park: No such file or directory
[Jay:~] jay%

The file 'diskImages/linkin_park.iso' and the directory mnt/linkin_park/ exist in /Users/jay/ which was the directory i did the commands from. The last command in that list works on linux.
xJay is offline   Reply With Quote
Old 09-28-2002, 10:15 PM   #4
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
try omitting trailing slash

Try omitting the trailing slash on the last argument.
I.e. use mnt/linkin_park insteqad of mnt/linkin_park/
hayne is offline   Reply With Quote
Old 09-29-2002, 12:31 AM   #5
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
[Jay:~] jay% mount_cd9660 -o loop,unhide -t iso9660 -r diskImages/linkin_park.iso mnt/linkin_park
usage: mount_cd9660 [-egjr] [-o options] [-s startsector] special node
[Jay:~] jay%
xJay is offline   Reply With Quote
Old 09-29-2002, 02:04 AM   #6
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
no -t option

I don't see a -t option in that "usage" message, nor do I see one in the man page. Why do you think there is a -t option?
hayne is offline   Reply With Quote
Old 09-29-2002, 02:48 PM   #7
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
Check the third command in that list. I tryed it without the -t option and it still didn't work.
xJay is offline   Reply With Quote
Old 09-29-2002, 03:32 PM   #8
blb
All Star
 
Join Date: Jan 2002
Location: CO, USA
Posts: 908
The error Block device required is one of the more important ones here; mount requires a block device (eg, /dev/disk2), not a file. I'm guessing you want to mount the image, but not under /Volumes, as Disk Copy could do that quite simply. If you want to customize where it mounts, this should work (at least on 10.1.x):
Code:
hdid -nomount /path/to/linkin_park.iso
This will create an hdid process which maps your image to a /dev entry. When this is run, it should output which device it created. You then use that with mount (or mount_cd9660):
Code:
mount -t cd9660 /dev/disk2 /path/to/mnt/linkin_park
You don't need the -t option to any mount_ commands, as the base mount uses that option to know which to really run (eg, mount -t cd9660 will run mount_cd9660).
blb is offline   Reply With Quote
Old 09-29-2002, 07:55 PM   #9
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
[Jay:~] jay% hdid -nomount diskImages/linkin_park.iso
/dev/disk2
[Jay:~] jay% mount -t cd9600 /dev/disk2 mnt/linkin_park/
mount: exec /usr/sbin/mount_cd9600 for /Users/jay/mnt/linkin_park: No such file or directory
[Jay:~] jay% ls mnt/linkin_park/
[Jay:~] jay%

That doesn't work either.
Do i need to be root?
xJay is offline   Reply With Quote
Old 09-29-2002, 09:43 PM   #10
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
try omitting trailing slash

Quote:
Originally posted by xJay
[Jay:~] jay% mount -t cd9600 /dev/disk2 mnt/linkin_park/

Try again without the trailing slash. I don't know if this is causing the problem but it might well be. Don't put it there unless you know you need it. (Probably it is filename completion on tcsh that is adding this - so delete it before you press return.)
hayne is offline   Reply With Quote
Old 09-29-2002, 10:33 PM   #11
blb
All Star
 
Join Date: Jan 2002
Location: CO, USA
Posts: 908
Quote:
Originally posted by xJay
...
[Jay:~] jay% mount -t cd9600 /dev/disk2 mnt/linkin_park/
mount: exec /usr/sbin/mount_cd9600 for /Users/jay/mnt/linkin_park: No such file or directory
...
That doesn't work either.
Do i need to be root?

A little typo there, try -t cd9660. Note how it complains from exec, namely, it can't find mount_cd9600, since it doesn't exist...gotta love those subtle error messages (and, for that matter, errors).
blb is offline   Reply With Quote
Old 09-30-2002, 08:00 AM   #12
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
[Jay:~] jay% mount -t cd9660 /dev/disk2 mnt/linkin_park
/sbin/mount_cd9660: Invalid argument
[Jay:~]
xJay is offline   Reply With Quote
Old 09-30-2002, 09:25 AM   #13
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
try it with sudo

Try using 'sudo' when you do the mount command.
I suspect that the "Invalid argument" was a spurious error message and the problem might really be that you need admin privileges.

So try:
sudo mount -t cd9660 /dev/disk2 mnt/linkin_park

(added afterwards: )
I just went and looked at the Darwin source for the mount command. The error message seems to be due to a failure of the 'mount' system call.
man 2 mount
tells me that you can get an "Invalid argument" error [EINVAL] if there is a non-standard character in the 'node' filepath or if the filesystem's super block has a bad magic number or an out of range block size.

Last edited by hayne; 09-30-2002 at 09:44 AM.
hayne is offline   Reply With Quote
Old 09-30-2002, 10:09 AM   #14
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
[Jay:~] jay% sudo mount_cd9660 /dev/disk2 mnt/lp
Password:
mount_cd9660: Invalid argument
[Jay:~] jay%
xJay is offline   Reply With Quote
Old 09-30-2002, 10:22 AM   #15
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
check the ISO file is good

Before going too much further, you should check that the ISO file is good by burning it to a CD and then letting the Finder mount it in the usual way.

Or, if you want to avoid burning a CD, you probably can make a disk image out of it by using the Disk Copy utility.
hayne is offline   Reply With Quote
Old 09-30-2002, 10:30 AM   #16
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
how about throwing some diag options in there?
Code:
     -d      Causes everything to be done except for the actual system call.
             This option is useful in conjunction with the -v flag to deter-
             mine what the mount command is trying to do.

     -v      Verbose mode.
and reducing the form to:
Code:
% sudo mount -dv -t cd9660
and show us your device table:
Code:
% df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/disk1s9           7326256   2153740   5099256  30% /
devfs                        1         1         0 100% /dev
fdesc                        1         1         0 100% /dev
<volfs>                    512       512         0 100% /.vol
/dev/disk1s10          7326256   3439436   3886820  47% /Volumes/banshee
...
__________________
On a clear disk, you can seek forever.
mervTormel is offline   Reply With Quote
Old 09-30-2002, 05:43 PM   #17
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
[Jay:~] jay% sudo mount -dv -t cd9660 diskImages/linkin_park.iso mnt/linkin_park/
Password:
exec: mount_cd9660 diskImages/linkin_park.iso /Users/jay/mnt/linkin_park
[Jay:~] jay% ls mnt/linkin_park/
[Jay:~] jay%

[Jay:~] jay% df
Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/disk0s5 120093120 27112784 92468336 22% /
devfs 181 181 0 100% /dev
fdesc 2 2 0 100% /dev
<volfs> 1024 1024 0 100% /.vol
automount -fstab [334] 0 0 0 100% /Network/Servers
automount -static [334] 0 0 0 100% /automount
[Jay:~] jay%

Quote:
Before going too much further, you should check that the ISO file is good by burning it to a CD and then letting the Finder mount it in the usual way.

The whole point of this is to see if the image is okay before i waste a cd trying to burn it. Also, i haven't figured out how to use the cd burner yet, and i might have to give the disks back before i can figure out how to burn an ISO. I did check sum the images and they were okay.

Quote:
Or, if you want to avoid burning a CD, you probably can make a disk image out of it by using the Disk Copy utility.

I'll try that now, but i do prefer ISOs since they are exact copies of the disk. How does a dmg differ from an iso anyway?
xJay is offline   Reply With Quote
Old 09-30-2002, 05:58 PM   #18
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
The disk copy utility won't copy from my CD-ROM so i made it copy from /dev/disk2 which was created when i did 'hdid diskImages/linkin_park.iso'. When i asked disk copy to mount the .dmg it made it said "'lpdmg.dmg' failed to mount due to error 95. (no mountable file systems)"

In linux this is so simple.

# dd if=/dev/scd0 of=diskImage.iso
# mount -o loop,unhide -t iso9660 -r diskImage.iso /mnt/p1/

Unfortunatly my linux box is messed up and it refuses to do anything now.
xJay is offline   Reply With Quote
Old 09-30-2002, 11:30 PM   #19
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
checksum

Could you please verify the checksum again?
I read something on a MkLinux page which seems strange but they said that attempting to mount an ISO might modify the file.
hayne is offline   Reply With Quote
Old 10-01-2002, 10:42 AM   #20
xJay
Prospect
 
Join Date: Sep 2002
Location: Canada
Posts: 30
[Jay:~] jay% cksum diskImages/linkin_park.iso
2707754099 400627920 diskImages/linkin_park.iso
[Jay:~] jay% cksum /dev/disk1
2707754099 400627920 /dev/disk1
[Jay:~] jay%

its still good
xJay is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.