Subject: Re: vnd filesystem on MSDOS drive
To: None <>
From: Brian C. Grayson <>
List: current-users
Date: 07/17/1997 22:08:23
David Brownlee wrote:
> 	Just on the offchance - do you get the same problem if you build
> 	the vnode directly on the msdos partition (rather than copying
> 	from the ffs partition)?

  Yep -- that's what I tried at first.  I don't know if it'll
work under -current, but it doesn't under 1.2D -- see my
transcript below.  

  For those of you who missed the original thread (1 message on
netbsd-help plus mail between Patrick Welche and myself),
here's a quick recap:  I want to create a 4MB file on an MSDOS
partition, use vnd's to create an FFS filesystem image in the
file, and mount it so I can utilize the free space on that
MSDOS partition without repartitioning.  I'm not running
-current:  I need 80MB off the MSDOS disk to have enough space
to track current.  :)  I'm running a circa March 1.2D i386 system.

  Here's a transcript of my attempt creating the vnode directly
on the msdos partition (/dev/wd1e, mounted on /mnt):

14# df .
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/wd1e      239300   156512    82788    65%    /mnt
15# mount | grep wd1e
/dev/wd1e on /mnt type msdos (local)
16# dd if=/dev/zero of=4mbb bs=1024 count=4096
4096+0 records in
4096+0 records out
4194304 bytes transferred in 9 secs (466033 bytes/sec)
17# vnconfig /dev/vnd0c 4mbb
18# newfs /dev/rvnd0c 4mbvnd	<--  an entry in my disktab.
/dev/rvnd0c:    8192 sectors in 16 cylinders of 2 tracks, 256 sectors
        4.0MB in 1 cyl groups (16 c/g, 4.00MB/g, 1920 i/g)
super-block backups (for fsck -b #) at:
19# mount_ffs /dev/vnd0c /mnt2
mount_ffs: /dev/vnd0c on /mnt2: incorrect super block

  Note that this is different from the result Patrick Welche
reported using -current.  Everything worked when the image file
was on an FFS partition, like on my machine, but when it was on
MSDOS, he got bad file descriptor, rather than incorrect super

  Another interesting point is that if I run vnconfig on the
same file on an FFS partition, a cksum on /dev/rvnd0c is
different than when that same image is vnconfig'd from an MSDOS
partition, even though the actual image files have identical
checksums.  I'm not sure if that makes sense.  See my original
netbsd-help post for a better explanation and further background,
including the disktab entry for 4mbvnd.

  Thanks in advance.

  Brian Grayson
Brian Grayson (
Graduate Student, Electrical and Computer Engineering
The University of Texas at Austin
Office:  ENS 406       (512) 471-8011
Finger for PGP key.