From owner-freebsd-questions@FreeBSD.ORG Mon May 30 18:54:21 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A28F016A41C for ; Mon, 30 May 2005 18:54:21 +0000 (GMT) (envelope-from ws+freebsd-questions@au.dyndns.ws) Received: from lillith-iv.ovirt.dyndns.ws (ppp103-111.static.internode.on.net [150.101.103.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC17843D54 for ; Mon, 30 May 2005 18:54:20 +0000 (GMT) (envelope-from ws+freebsd-questions@au.dyndns.ws) Received: from [192.168.1.194] ([192.168.1.194]) by lillith-iv.ovirt.dyndns.ws (8.13.3/8.13.3) with ESMTP id j4UIsHcm044144; Tue, 31 May 2005 04:24:18 +0930 (CST) (envelope-from ws+freebsd-questions@au.dyndns.ws) From: Wayne Sierke To: Steven Friedrich In-Reply-To: <200505301101.59780.FreeBSD@InsightBB.com> References: <200505301101.59780.FreeBSD@InsightBB.com> Content-Type: text/plain Date: Tue, 31 May 2005 04:23:23 +0930 Message-Id: <1117479203.714.66.camel@au.dyndns.ws> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Can I mount an ISO image directly with mount? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 18:54:21 -0000 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