Date: Tue, 31 May 2005 04:23:23 +0930 From: Wayne Sierke <ws+freebsd-questions@au.dyndns.ws> To: Steven Friedrich <FreeBSD@InsightBB.com> Cc: freebsd-questions@freebsd.org Subject: Re: Can I mount an ISO image directly with mount? Message-ID: <1117479203.714.66.camel@au.dyndns.ws> In-Reply-To: <200505301101.59780.FreeBSD@InsightBB.com> References: <200505301101.59780.FreeBSD@InsightBB.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2005-05-30 at 11:01 -0400, Steven Friedrich wrote: > I believe I read a posting over a year ago, that stated that you could mount > an ISO file directly with mount. > > I searched the archives but couldn't find it. > I searched the FAQ and handbook as well. > > I do see a section in the handbook about doing it with vn, but I want to know > if it's possible with mount alone. This works for me on 5.4... mount_cd9660 -o ro /dev/`mdconfig -a -t vnode -f /path/to/file.iso` /mount-point and hopefully won't have dramatic consequences if the mdconfig fails! I don't have any 4.x systems so you'd have to compare the options for vnconfig(?) if that's what you have. I don't have the script-fu to suggest how you might set about undoing it all in one line, since you'd have to do an unmount before you could perform the required mdconfig -d, and hence lose the chance to do something like: mdconfig -d -u`mount | grep "/mount-point" | cut ... ` so you'd probably have to script it. Although ... set mdvar=`mount | grep "/mount-point" | cut -c 8-8` && umount /mount-point && mdconfig -d -u $mdvar && unset mdvar seems to work (but comes with a multitude of disclaimers about fitness for purpose and possible health risks!). Hopefully you're not looking for command-line shortcuts. Wayne
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1117479203.714.66.camel>