Subject: Re: mounting a disk image
To: mike stone <bsdusr@yawp.com>
From: Steven M. Bellovin <smb@research.att.com>
List: netbsd-users
Date: 05/10/2001 21:45:53
In message <200105110133.UAA23673@www.yawp.com>, mike stone writes:
>
>hey all -
>
>i've been reading the mount_* manpages recently, wondering if 
>NetBSD can mount the contents of a binary disk image into the 
>global filesystem namespace.   i haven't found anything 
>conclusive, so i thought i'd ask.
>
>the idea is simple.. if i make a binary disk image of a floppy or CD:
>
>     dd if=/dev/fd0a of=disk.img
>
>i'd like to mount that image as a file tree:
>
>	mount_image disk.img /mnt
>
>without having to write it back to a block-special device, first.
>
>given what mount_null, mount_union, mount_overlay, and mount_mfs 
>can do, it doesn't seem too outrageous to think that we could 
>read and write a binary image as if it were a device.

The vnd device does what you need; see it and vnconfig.


		--Steve Bellovin, http://www.research.att.com/~smb