Subject: kern/2759: vnd doesn't support disklabel ioctls
To: None <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 09/16/1996 00:49:52
>Synopsis: vnd doesn't support disklabel ioctls
>Responsible: kern-bug-people (Kernel Bug People)
>Arrival-Date: Mon Sep 16 01:05:01 1996
>Originator: Jonathan Stone
System: NetBSD Cup.DSG.Stanford.EDU 1.2_BETA NetBSD 1.2_BETA (DSG) #47: Mon Jul 29 12:05:57 PDT 1996 jonathan@Cup.DSG.Stanford.EDU:/aga/n1/src/NetBSD/IP-PLUS/src/sys/arch/i386/compile/DSG i386
vnconfig doesn't support the disklabel ioctl suite.
This makes it difficult to use vnd to build distirbution miniroots.
I dont' see any good way to get a disklabel onto a file.
Use vnconfig to configure a local file as a pmax disk image. (e.g.,
something larger than a floppy). Use that disk image (e.g.,
/dev/vnd0c) to build a distribution miniroot.
Ship the miniroot to users. Receive complaints that the miniroot
contains neither label nor bootblock.
I'm using vnd because I don't have a spare disk on which to build
a miniroot, if i did I'd use that to write a label.
Even if I fake up a label on another device, I don't see any good way
(e.g., dd) to overwrite the first 8k of an FFS image once I've built
it. I've tried using dd, but it truncates the output after it's done
It would be useful if the vnconfig and/or vnd man pages at least
mentioned this restriction/bug, and suggested a workaround.
In private e-mail, Jason Thorpe has suggested that the crrect to fix
this is to make the vnd driver support the disklabel ioctl set,
writing a label to the appropriat portion of the file underyling the
Perhaps a workable workaround is to construct the filesystem image
used as vnd backing store *first*, using dd to read out a valid
bootblock and disklabel from a labelled partition, padding from 8k up
to the desired miniroot size, and *then* doing vnconfig.