LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
LinkBack Search this Thread
Old 02-09-2003, 07:52 AM   #1
rafaelcl
LQ Newbie
 
Registered: Feb 2003
Posts: 2

Rep: Reputation: 0
Mount ISO file


How to mount ISO file on FreeBSD-4.7?
 
Old 02-13-2003, 06:54 AM   #2
williamwbishop
Member
 
Registered: Feb 2003
Location: god's judge
Posts: 376

Rep: Reputation: 30
is it not the same as other linuxes? It works in solaris even.

mount -v -o ro, loop=/dev/loop0 test.iso /mnt/Test
 
Old 02-13-2003, 10:15 AM   #3
llama_meme
Member
 
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
It doesn't seem to work on FreeBSD. Found this solution by googling:

# Mounting
vnconfig -c /dev/vn0 image.iso
mount -t cd9660 /dev/vn0c /mnt/whatever

# Unmounting
umount /mnt/whatever
vnconfig -u /dev/vn0

Alex
 
Old 02-13-2003, 01:48 PM   #4
rafaelcl
LQ Newbie
 
Registered: Feb 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks, but i found this infomation in:
http://www.freebsd.org/cgi/man.cgi?q...le&format=html
 
Old 02-15-2003, 12:01 PM   #5
5amYan
Member
 
Registered: Apr 2002
Location: The District
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291

Rep: Reputation: 30
Here's the optical media page from the hand book.
How to make and mount..

http://www.freebsd.org/doc/en_US.ISO...ating-cds.html
 
Old 02-16-2003, 08:07 AM   #6
Sparky
Member
 
Registered: Feb 2003
Location: Denver
Posts: 68

Rep: Reputation: 15
I hope you're not confused since ISO files are used in conjunction with whatever "burner" program you have (like Nero or Roxio CD Creator) to "make" a CD (sorry, I don't know what's available for the Linux/BSD world although I'm sure there's something available that will let you "burn" CD's too). You DON'T actually "mount" an ISO file as you seem to be wanting to do. ISO files are similar to ZIP, RPM, GZ, etc. but differ because you actually "use" an ISO file to burn a complete CD with (rather than simply compress and archive a lot of files into one big file or extract a lot of files from one big file as is the case with ZIP, RPM, GZ, etc.). To be able to make an ISO file would be great if you had deveoped a new version of Linux/BSD and wanted to distribute it over the Internet. However, most people obtain ISO files to create entire CD's and those CD's are usually used to boot a machine with -- and that's the reverse process than what the link that was provided explains. Almost every distribution of Linux that's available on the Internet has ISO files available which can be download and used to burn CD's with (even Debian, but it's a much more complex process since Debian more or less makes you assemble the final ISO file that will in turn be used to make your CD or CD's with). The point is that ISO "files" are NOT used for anything except making a CD with.

If all you need help with is "mounting" a CD so that you can access the files on the CD then that's a TOTALLY DIFFERENT MATTER! (sorry for the shouting, but I don't seem to have italics). Mounting a CD or floppy disk (or even a hard drive for that matter) which may be ISO9660 compliant is a simple thing and can sometimes even be "automatically" done for you! Mandrake springs to mind in cases of "auto mounting". Understanding and being able to use the "mount" utility (some folks would call it a "command") is critical since EVERYTHING in BSD/Linux/UNIX/etc. is treated as a sub-directory (no drive letters like DOS or MS Windows) so "mounting" a device like a CD to your file system is very necessary in order to access the contents (and this is true for every removeable "disk" or "tape" or ??? you have too). If you installed the help files when you installed BSD then you should already have help available on this topic. In order to see that "help" try typing in the following:

man --mount

-- OR --

help --mount

(Notice the two-dashes too!). If you didn't get any help then read on.

In most BSD systems, you may have a directory called /cdrom which is usually empty (that's good when there's nothing mounted too). Sometimes this directory is deeper and is located in /mnt/cdrom, but you should have something empty somewhere. Therefore, in order to mount a CD to the /cdrom directory (since I recall that's where BSD "defaults" to) try typing in the following:

mount /dev/cdrom /cdrom

When you next do a listing of the /cdrom directory (type in: ls /cdrom) you will really see the contents of the CD! If the CD is "weird" somehow you may have to modify the command, but that example should work with most data CD's. To avoid this possability, most text instructions say to properly mount a CD that's ISO9660 compliant you should use the the following:

mount -t iso9660 /dev/cdrom /cdrom

(the "-t" specifies the filetype which in this case is ISO9660). If your empty /cdrom directory is not there (and I got it wrong), you may want to create it. However, note that it can often times be located in the /dev directory which would then read: /dev/cdrom. So the command to mount the CD to that area would then read:

mount /dev/cdrom /mnt/cdrom

It really doesn't matter where you place the cdrom directory OR what you call it even, but it DOES have to exist and there shouldn't be ANYTHING in it before mounting. Also, always note where the cdrom "device" driver is and 99% of the time the device files are located in /dev. You may have to extract the CDROM driver if it isn't located in /dev, but that almost never happens (more likely it's been renamed or called something slightly different if you can't find it -- "/dev/cdrom" that is).

I hope I didn't insult you too much if this had NOTHTING to do with your request and is somehow "beneath" your expertise. I've been known to make mistakes, but this seemed to be pretty straight forward even though the answer was pretty long...
 
Old 02-16-2003, 10:56 AM   #7
llama_meme
Member
 
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
It is possible to mount an ISO file (see the posts above)...This can be useful if you want to view its contents without actually burning a CD.

Alex
 
Old 02-16-2003, 01:30 PM   #8
5amYan
Member
 
Registered: Apr 2002
Location: The District
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291

Rep: Reputation: 30
iso is an image of a disk

A disk image can be treated just like a disk.
YOU CAN YES CAN MOUNT AN IMAGE. EVEN AN ISO IMAGE.
from the hand book;
sysutils/mkisofs produces an ISO 9660 file system that is an image of a directory tree in the Unix file system name space. The simplest usage is:

# mkisofs -o imagefile.iso /path/to/tree

This command will create an imagefile.iso containing an ISO 9660 file system that is a copy of the tree at /path/to/tree. In the process, it will map the file names to names that fit the limitations of the standard ISO 9660 file system, and will exclude files that have names uncharacteristic of ISO file systems.

A number of options are available to overcome those restrictions. In particular, -R enables the Rock Ridge extensions common to Unix systems, -J enables Joliet extensions used by Microsoft systems, and -hfs can be used to create HFS file systems used by MacOS.

For CDs that are going to be used only on FreeBSD systems, -U can be used to disable all filename restrictions. When used with -R, it produces a file system image that is identical to the FreeBSD tree you started from, though it may violate the ISO 9660 standard in a number of ways.

The last option of general use is -b. This is used to specify the location of the boot image for use in producing an ``El Torito'' bootable CD. This option takes an argument which is the path to a boot image from the top of the tree being written to the CD. So, given that /tmp/myboot holds a bootable FreeBSD system with the boot image in /tmp/myboot/boot/cdboot, you could produce the image of an ISO 9660 file system in /tmp/bootable.iso like so:

# mkisofs -U -R -b boot/cdboot -o /tmp/bootable.iso /tmp/myboot

Having done that, if you have vn (FreeBSD 4.X), or md (FreeBSD 5.X) configured in your kernel, you can mount the file system with:

# vnconfig -e vn0c /tmp/bootable.iso
# mount -t cd9660 /dev/vn0c /mnt

for FreeBSD 4.X, and for FreeBSD 5.X:

# mdconfig -a -t vnode -f /tmp/bootable.iso -u 0
# mount -t cd9660 /dev/md0 /mnt

At which point you can verify that /mnt and /tmp/myboot are identical.

There are many other options you can use with sysutils/mkisofs to fine-tune its behavior. In particular: modifications to an ISO 9660 layout and the creation of Joliet and HFS discs. See the mkisofs(8) manual page for details.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount as a device: mount dvd-iso file in /dev/dvd sadarax Linux - General 21 02-02-2011 11:59 PM
mount a ISO file Kabuto Linux - General 18 03-28-2005 01:48 AM
How to mount ISO file not as root? Starch Linux - Newbie 1 01-29-2005 05:15 PM
cant mount iso file lemuel Linux - Newbie 9 01-27-2005 01:03 AM
Could not mount .iso file subaruwrx Linux - General 2 12-30-2004 09:20 AM


All times are GMT -5. The time now is 02:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration