Subject: port-vax/4677: Making a NetBSD/Vax distribution fails.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jarle@runit.sintef.no>
List: netbsd-bugs
Date: 12/12/1997 17:11:08
>Number:         4677
>Category:       port-vax
>Synopsis:       Making a NetBSD/Vax distribution fails.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 12 08:20:00 1997
>Last-Modified:
>Originator:     Jarle F. Greipsland
>Organization:
Runit Retrocomputing Center
>Release:        1997-12-03
>Environment:
	
System: NetBSD rrcvax.runit.sintef.no 1.3_BETA NetBSD 1.3_BETA (RRCVAX) #1: Wed Dec 3 16:41:30 MET 1997 jarle@rrcvax.runit.sintef.no:/local/netbsd/sys/arch/vax/compile/RRCVAX vax


>Description:
After having built "the world" (> 55 hours wall time sans games :-) I decided
to try and make a distribution out of it.  However, there seems to be a few
problems with the NetBSD/Vax distrib configuration files:

o First, "more" is no longer a program in the source tree.  Instead "less"
  should be installed, and "more" made a link to that program.  Also, due to
  the layout of the less source tree, the directory src/usr.bin/less need to
  be added to crunchgen's searchlist.
o The rmt library is not part of the list of libraries to link against when
  building the crunched binary.  This causes the linkage to fail.
o For some reason the size of the boot program is no longer a multiple of 512
  bytes.  Is this a bug?  Anyway, trying to dd something not a multiple of 512
  out onto a rvnd-partition fails.  This is fixed by specifing conf=osync to
  dd.
o The miniroot "fake" disktab entry has the partition sizes listed as 4096
  sectors, while the "ns" field (number of sectors) claims it only has 2048.
  This caused the newfs to (silently) use 2048 sectors only.  The miniroot
  file system thus became too small.

I haven't tried the resulting files yet, so there may be more bugs in there...
>How-To-Repeat:
# cd /usr/src/distrib/vax && make
>Fix:
First the diffs for the distrib/vax directory:

diff -rc vax.orig/inst-common/Makefile.inc vax/inst-common/Makefile.inc
*** vax.orig/inst-common/Makefile.inc	Tue Jun 24 13:08:12 1997
--- vax/inst-common/Makefile.inc	Fri Dec 12 15:52:00 1997
***************
*** 38,44 ****
  	dd if=/dev/zero of=${BOOTSYS} bs=64k count=4
  	vnconfig -t ${BOOTDISKTYPE} -v -c ${VND_DEV} ${BOOTSYS}
  	newfs -O -m 0 -o space -i 8192 ${VND_RDEV} ${BOOTDISKTYPE}
! 	dd if=xxboot of=/dev/rvnd0a count=16
  	mount ${VND_DEV} ${MOUNT_POINT}
  	cp edlabel copy boot ${MOUNT_POINT}
  	umount -f ${MOUNT_POINT}
--- 38,44 ----
  	dd if=/dev/zero of=${BOOTSYS} bs=64k count=4
  	vnconfig -t ${BOOTDISKTYPE} -v -c ${VND_DEV} ${BOOTSYS}
  	newfs -O -m 0 -o space -i 8192 ${VND_RDEV} ${BOOTDISKTYPE}
! 	dd if=xxboot of=/dev/rvnd0a count=16 conv=osync
  	mount ${VND_DEV} ${MOUNT_POINT}
  	cp edlabel copy boot ${MOUNT_POINT}
  	umount -f ${MOUNT_POINT}
diff -rc vax.orig/inst-common/instbin.conf vax/inst-common/instbin.conf
*** vax.orig/inst-common/instbin.conf	Sat Oct 14 00:50:28 1995
--- vax/inst-common/instbin.conf	Fri Dec 12 15:56:59 1997
***************
*** 3,18 ****
  # $Id: instbin.conf,v 1.1 1995/10/01 21:22:33 ragge Exp $	
  #
  
! srcdirs /usr/src/bin /usr/src/sbin /usr/src/usr.bin /usr/src/usr.sbin
! srcdirs /usr/src/gnu/usr.bin
  
  progs gawk cat chmod chown chroot cp df disklabel ed expr fsck ftp 
! progs gzip ifconfig init ln ls mkdir mknod more mount mt dd
  progs mount_ffs mount_nfs mv newfs reboot rm route sed sh shutdown
  progs slattach strings stty sync tar test umount update
  
  ln chown chgrp
  ln gzip gzcat gunzip
  ln mount_ffs ffs
  ln mount_nfs nfs
  ln gawk awk
--- 3,19 ----
  # $Id: instbin.conf,v 1.1 1995/10/01 21:22:33 ragge Exp $	
  #
  
! srcdirs /usr/src/bin /usr/src/sbin /usr/src/usr.bin/less /usr/src/usr.bin
! srcdirs /usr/src/usr.sbin /usr/src/gnu/usr.bin
  
  progs gawk cat chmod chown chroot cp df disklabel ed expr fsck ftp 
! progs gzip ifconfig init less ln ls mkdir mknod mount mt dd
  progs mount_ffs mount_nfs mv newfs reboot rm route sed sh shutdown
  progs slattach strings stty sync tar test umount update
  
  ln chown chgrp
  ln gzip gzcat gunzip
+ ln less more
  ln mount_ffs ffs
  ln mount_nfs nfs
  ln gawk awk
***************
*** 20,23 ****
  ln test [
  ln reboot halt
  
! libs -ledit -lutil -ltermcap -lcrypt -ll -lm
--- 21,24 ----
  ln test [
  ln reboot halt
  
! libs -ledit -lutil -ltermcap -lrmt -lcrypt -ll -lm

And then the diff for the disktab entry:

*** /usr/src/etc/etc.vax/disktab	Tue Mar  5 13:10:56 1996
--- /etc/disktab	Fri Dec 12 15:35:54 1997
***************
*** 498,504 ****
  	:pc#512:oc#0:bc#4096:fc#512:
  
  miniroot|fake-type used when installation:\
! 	:ty=fake:se#512:nt#1:rm#3600:ns#2048:nc#1:\
  	:pa#4096:oa#0:ba#4096:fa#512:\
  	:pb#4096:ob#0:bb#4096:fb#512:\
  	:pc#4096:oc#0:bc#4096:fc#512:
--- 498,504 ----
  	:pc#512:oc#0:bc#4096:fc#512:
  
  miniroot|fake-type used when installation:\
! 	:ty=fake:se#512:nt#1:rm#3600:ns#4096:nc#1:\
  	:pa#4096:oa#0:ba#4096:fa#512:\
  	:pb#4096:ob#0:bb#4096:fb#512:\
  	:pc#4096:oc#0:bc#4096:fc#512:

						-jarle
-- 
Q: What's the difference between programming and bug collecting?
A: None.
>Audit-Trail:
>Unformatted: