*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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:
-- OR --
(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...
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
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:
# 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.