From owner-freebsd-hackers Sun Jun 22 06:17:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA01397 for hackers-outgoing; Sun, 22 Jun 1997 06:17:02 -0700 (PDT) Received: from bsd.fs.bauing.th-darmstadt.de (bsd.fs.bauing.th-darmstadt.de [130.83.63.241]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA01378; Sun, 22 Jun 1997 06:16:52 -0700 (PDT) Received: from campa.panke.de (anonymous216.ppp.cs.tu-berlin.de [130.149.17.216]) by bsd.fs.bauing.th-darmstadt.de (8.8.5/8.8.5) with ESMTP id PAA23464; Sun, 22 Jun 1997 15:16:46 +0200 (MET DST) Received: (from wosch@localhost) by campa.panke.de (8.8.5/8.6.12) id OAA00285; Sun, 22 Jun 1997 14:53:21 +0200 (MET DST) Date: Sun, 22 Jun 1997 14:53:21 +0200 (MET DST) Message-Id: <199706221253.OAA00285@campa.panke.de> From: Wolfram Schneider To: Bruce Evans Cc: hackers@freebsd.org, wosch@apfel.de, joerg@freebsd.org, phk@freebsd.org Subject: Re: vnconfig and MSDOS FS In-Reply-To: <199706220526.PAA21334@godzilla.zeta.org.au> References: <199706220526.PAA21334@godzilla.zeta.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Bruce Evans writes: >>I made a backup of a MSDOS hard disk with dd(1) into >>a single 425 MB large file. Now I want mount this file with vnconfig >>and mount_msdos, but it will not work: >> >># vnconfig -u /dev/vn0c >># vnconfig /dev/vn0c /usr/tmp/adk >># mount_msdos /dev/vn0c /mnt >>mount_msdos: /dev/vn0c: Invalid argument >> >>What's wrong? Does vnconfig not support MSDOS FS? > >Hint: which slices are the DOS partition(s) on? They probably aren't on >the whole disk slice. You need to enable slices using `vnconfig ... -s >slices ...' (-s is documented only in the usage message and the slices >option isn't documented :-(). Thanks, now it works ;-) vnconfig -s labels -c /dev/vn0 /tmp/file mount_msdos /dev/vn0s1 /mnt Here is a patch for vnconfig.8 Index: vnconfig.8 =================================================================== RCS file: /usr/cvs/src/usr.sbin/vnconfig/vnconfig.8,v retrieving revision 1.4 diff -u -r1.4 vnconfig.8 --- vnconfig.8 1997/02/13 18:50:52 1.4 +++ vnconfig.8 1997/06/22 12:46:13 @@ -45,12 +45,16 @@ .Sh SYNOPSIS .Nm vnconfig .Op Fl cdeuv +.Op Fl r Ar flag +.Op Fl s Ar flag .Ar special_file Ar regular_file .Oo Ar feature Oc .Nm vnconfig .Fl a .Op Fl cdeuv .Op Fl f Ar config_file +.Op Fl r Ar flag +.Op Fl s Ar flag .Sh DESCRIPTION The .Nm vnconfig @@ -85,6 +89,12 @@ Disables and ``unconfigures'' the device. .It Fl v Print messages to stdout describing actions taken. +.It Fl r Ar flag +Reset flags in vn driver. +.Ar flag +are labels, follow, debug, io, all, none. +.It Fl s Ar flag +Set flags in vn driver. .El .Pp If no action option is given, @@ -141,26 +151,34 @@ .El .Sh EXAMPLES .Pp -.Dl vnconfig /dev/vn0c /tmp/diskimage +.Dl vnconfig /dev/vn0 /tmp/diskimage .Pp Configures the vnode disk -.Pa vn0c . +.Pa vn0 . .Pp -.Dl vnconfig -e /dev/vn0c /var/swapfile swap +.Dl vnconfig -e /dev/vn0 /var/swapfile swap .Pp Configures -.Pa vn0c +.Pa vn0 and enables swapping on it. .Pp -.Dl vnconfig -d /dev/vn0c myfilesystem mount=/mnt +.Dl vnconfig -d /dev/vn0 myfilesystem mount=/mnt .Pp Unmounts (disables) -.Pa vn0c . +.Pa vn0 . .Pp .Dl vnconfig -ae .Pp Configures and enables all devices specified in .Pa /etc/vntab . +.Pp +.Dl vnconfig -s labels -c /dev/vn0 /tmp/kleinweich +.Dl mount_msdos /dev/vn0s1 /mnt +.Pp +Configures the whole disk device +.Pa vn0 +and mount it +as a MSDOS file system on slice 1. .Sh SEE ALSO .Xr mount 2 , .Xr swapon 2 , -- Wolfram Schneider http://www.apfel.de/~wosch/