Subject: port-i386/3822: cannot create i386 distribution boot disks
To: None <gnats-bugs@gnats.netbsd.org>
From: None <andreas@planix.com>
List: netbsd-bugs
Date: 07/01/1997 16:56:05
>Number: 3822
>Category: port-i386
>Synopsis: Geometry support in the vnode disk driver broke i386 boot disk creation
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 1 14:05:02 1997
>Last-Modified:
>Originator: Andreas Wrede
>Organization:
Andreas Wrede Planix, Inc.
andreas@planix.com Networking, System Administration, Consulting
http://www.planix.com Toronto, Ontario, Canada
>Release: <NetBSD-current source date>NetBSD-current July 1, 1997
>Environment:
System: NetBSD woffi 1.2G NetBSD 1.2G (WOFFI) #2: Tue Jul 1 10:13:43 EDT 1997 root@woffi:/local1/src/netbsd-current/src/sys/arch/i386/compile/WOFFI i386
>Description:
The geometry support added to the vnode disk driver apparently requires
that vnconfig be run on the full disk partition d, not on the first
partiton, which does result in:
vnconfig: /dev/rvnd0a: Device not configured
In addition, newfs expects a proper disk label on the vnode disk:
newfs: ioctl (WDINFO): No such process
newfs: /dev/rvnd0a: can't rewrite disk label
>How-To-Repeat:
try to build the distribution floppies:
$ cd /usr/src/distrib/i386/floppies
$ make
>Fix:
The patch below is probably not the correct way to fix this problem, but
it allowed me to create a working boot floppy. I am not happy about the mods
to /etc/disktab, there must be a better way.
*** src/distrib/i386/floppies/ramdisk/Makefile.orig Tue Jun 24 07:07:37 1997
--- src/distrib/i386/floppies/ramdisk/Makefile Tue Jul 1 15:47:57 1997
***************
*** 13,18 ****
--- 13,19 ----
MOUNT_POINT?= /mnt
VND?= vnd0
VND_DEV= /dev/${VND}a
+ VND_BDEV= /dev/${VND}d
VND_RDEV= /dev/r${VND}a
IMAGE?= xxx-${REV}.fs
MDEC= ${DESTDIR}/usr/mdec
***************
*** 34,40 ****
all: ${AUXTARGETS} ${CBIN}
dd if=/dev/zero of=${IMAGE} count=2880
! vnconfig -t ${DISKTYPE} -v -c ${VND_DEV} ${IMAGE}
newfs -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
mount ${VND_DEV} ${MOUNT_POINT}
mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
--- 35,42 ----
all: ${AUXTARGETS} ${CBIN}
dd if=/dev/zero of=${IMAGE} count=2880
! vnconfig -t ${DISKTYPE} -v -c ${VND_BDEV} ${IMAGE}
! disklabel -w -r ${VND} ${DISKTYPE}
newfs -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
mount ${VND_DEV} ${MOUNT_POINT}
mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
*** src/distrib/i386/floppies/bootfloppy-common/Makefile.inc.orig Tue Jun 24 07:07:31 1997
--- src/distrib/i386/floppies/bootfloppy-common/Makefile.inc Tue Jul 1 15:57:50 1997
***************
*** 7,12 ****
--- 7,13 ----
MOUNT_POINT?= /mnt
VND?= vnd0
VND_DEV= /dev/${VND}a
+ VND_BDEV= /dev/r${VND}d
VND_RDEV= /dev/r${VND}a
IMAGE?= xxx-${REV}.fs
KERN?= netbsd-xxx
***************
*** 23,29 ****
all: netbsd.ram.gz
dd if=/dev/zero of=${IMAGE} bs=100k count=12
! vnconfig -t ${DISKTYPE} -v -c ${VND_DEV} ${IMAGE}
newfs -m 0 -o space -i 6144 -c 80 ${VND_RDEV} ${DISKTYPE}
mount ${VND_DEV} ${MOUNT_POINT}
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
--- 24,31 ----
all: netbsd.ram.gz
dd if=/dev/zero of=${IMAGE} bs=100k count=12
! vnconfig -t ${DISKTYPE} -v -c ${VND_BDEV} ${IMAGE}
! disklabel -w -r ${VND} ${DISKTYPE}
newfs -m 0 -o space -i 6144 -c 80 ${VND_RDEV} ${DISKTYPE}
mount ${VND_DEV} ${MOUNT_POINT}
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
*** src/etc/etc.i386/disktab.orig Tue Jul 1 16:13:23 1997
--- src/etc/etc.i386/disktab Tue Jul 1 16:14:49 1997
***************
*** 76,88 ****
floppy|floppy3|3in|3.5in High Density Floppy:\
:ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\
! :pa#2880:oa#0:ba#4096:fa#512:\
:pb#2880:ob#0:\
:pc#2880:oc#0:
floppy5|5in|5.25in High Density Floppy:\
:ty=floppy:se#512:nt#2:rm#300:ns#15:nc#80:\
! :pa#2400:oa#0:ba#4096:fa#512:\
:pb#2400:ob#0:bb#4096:fb#512:\
:pc#2400:oc#0:bc#4096:fc#512:
--- 76,88 ----
floppy|floppy3|3in|3.5in High Density Floppy:\
:ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\
! :pa#2880:oa#0:ta=4.2BSD:ba#4096:fa#512:\
:pb#2880:ob#0:\
:pc#2880:oc#0:
floppy5|5in|5.25in High Density Floppy:\
:ty=floppy:se#512:nt#2:rm#300:ns#15:nc#80:\
! :pa#2400:oa#0:ta=4.2BSD:ba#4096:fa#512:
:pb#2400:ob#0:bb#4096:fb#512:\
:pc#2400:oc#0:bc#4096:fc#512:
>Audit-Trail:
>Unformatted: