From owner-freebsd-current Wed Aug 21 19:01:55 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA01205 for current-outgoing; Wed, 21 Aug 1996 19:01:55 -0700 (PDT) Received: from ambrisko.roble.com (ambrisko@netcom12.netcom.com [192.100.81.124]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id TAA01173 for ; Wed, 21 Aug 1996 19:01:42 -0700 (PDT) Received: from freebsd.ambrisko.com (freebsd.ambrisko.com [1.1.1.1]) by ambrisko.roble.com (8.7.5/8.6.9) with ESMTP id SAA19445 for ; Wed, 21 Aug 1996 18:36:38 -0700 (PDT) Received: (from ambrisko@localhost) by freebsd.ambrisko.com (8.7.5/8.6.9) id SAA00381 for current@freebsd.org; Wed, 21 Aug 1996 18:35:58 -0700 (PDT) From: Doug Ambrisko Message-Id: <199608220135.SAA00381@freebsd.ambrisko.com> Subject: boot floppy patches To: current@freebsd.org Date: Wed, 21 Aug 1996 18:35:58 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL15 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk The first patch is to make pathes relative incase the tree is not rooted at /usr/src. The second is make sure CVS directories are not copied to the mfs image. Third ensure a min. number of inodes and space left so when the install boot needs to create tmp stuff it can. Final set off patches permits sysinstall to run on a serial console to install FreeBSD and fixes a minor bug of recreating the etc directory in a brand new file system. Doug A. *** release/floppies/boot/crunch/crunch.conf Mon May 20 18:12:34 1996 --- release.mod/floppies/boot/crunch/crunch.conf Wed Aug 7 19:14:46 1996 *************** *** 1,12 **** # $Id: crunch.conf,v 1.1 1996/05/21 01:12:34 julian Exp $ ! srcdirs /usr/src/bin ! srcdirs /usr/src/release ! srcdirs /usr/src/sbin/i386 ! srcdirs /usr/src/sbin ! srcdirs /usr/src/usr.bin ! srcdirs /usr/src/gnu/usr.bin ! srcdirs /usr/src/usr.sbin progs sh find progs pwd ft ppp --- 1,12 ---- # $Id: crunch.conf,v 1.1 1996/05/21 01:12:34 julian Exp $ ! srcdirs ../../../../bin ! srcdirs ../../../../release ! srcdirs ../../../../sbin/i386 ! srcdirs ../../../../sbin ! srcdirs ../../../../usr.bin ! srcdirs ../../../../gnu/usr.bin ! srcdirs ../../../../usr.sbin progs sh find progs pwd ft ppp diff -c -r release/floppies/crunch_fs.mk release.mod/floppies/crunch_fs.mk *** release/floppies/crunch_fs.mk Mon May 20 18:12:21 1996 --- release.mod/floppies/crunch_fs.mk Fri Aug 9 08:39:50 1996*************** *** 73,79 **** step4: step3 .if defined(VERBATIM) A=`pwd`;cd ${.CURDIR}/${VERBATIM}; \ ! find . -print |cpio -pdmuv $$A/tree .endif true || cp ${TOP}/etc/spwd.db tree/etc touch step4 --- 73,79 ---- step4: step3 .if defined(VERBATIM) A=`pwd`;cd ${.CURDIR}/${VERBATIM}; \ ! find . -print | sed '/CVS/d' |cpio -pdmuv $$A/tree .endif true || cp ${TOP}/etc/spwd.db tree/etc touch step4 diff -c -r release/floppies/doFS.sh release.mod/floppies/doFS.sh *** release/floppies/doFS.sh Mon May 20 18:12:22 1996 --- release.mod/floppies/doFS.sh Sat Aug 17 07:26:45 1996 *************** *** 98,112 **** FSINODE=`expr ${FSINODE} + 8192` continue fi ! if [ $4 -gt 32 ] ; then echo "Reducing size" ! FSSIZE=`expr ${FSSIZE} - 4` FSINODE=`expr ${FSINODE} - 1024` continue fi ! if [ $7 -gt 64 ] ; then ! echo "Increasing bytes per inode" ! FSINODE=`expr ${FSINODE} + 8192` continue fi if [ $deadlock -eq 0 ] ; then --- 98,112 ---- FSINODE=`expr ${FSINODE} + 8192` continue fi ! if [ $4 -lt 32 ] ; then echo "Reducing size" ! FSSIZE=`expr ${FSSIZE} + 4` FSINODE=`expr ${FSINODE} - 1024` continue fi ! if [ $7 -lt 64 ] ; then ! echo "Decreasing bytes per inode" ! FSINODE=`expr ${FSINODE} - 8192` continue fi if [ $deadlock -eq 0 ] ; then diff -c -r release/sysinstall/dist.c release.mod/sysinstall/dist.c *** release/sysinstall/dist.c Sat Aug 3 03:10:48 1996 --- release.mod/sysinstall/dist.c Fri Aug 9 12:20:04 1996 *************** *** 459,466 **** seconds = stop.tv_sec + (stop.tv_usec / 1000000.0); if (!seconds) seconds = 1; ! msgInfo("%10d bytes read from %s dist, chunk %2d of %2d @ %.1f KB/sec.", total, dist, chunk + 1, numchunks, (total / seconds) / 1024.0); retval = write(fd2, buf, n); if (retval != n) { mediaDevice->close(mediaDevice, fd); --- 459,468 ---- seconds = stop.tv_sec + (stop.tv_usec / 1000000.0); if (!seconds) seconds = 1; ! if (!serial_mode){ ! msgInfo("%10d bytes read from %s dist, chunk %2d of %2d @ %.1f KB/sec.", total, dist, chunk + 1, numchunks, (total / seconds) / 1024.0); + } retval = write(fd2, buf, n); if (retval != n) { mediaDevice->close(mediaDevice, fd); diff -c -r release/sysinstall/globals.c release.mod/sysinstall/globals.c *** release/sysinstall/globals.c Thu Aug 1 03:58:51 1996 --- release.mod/sysinstall/globals.c Fri Aug 9 12:22:12 1996 *************** *** 41,46 **** --- 41,47 ---- * whatever values we feel are appropriate. */ + Boolean serial_mode; int DebugFD; /* Where diagnostic output goes */ Boolean Fake; /* Only pretend to be useful */ Boolean RunningAsInit; /* Are we running as init? */ *************** *** 59,64 **** --- 60,66 ---- void globalsInit(void) { + serial_mode = FALSE; DebugFD = -1; ColorDisplay = FALSE; Fake = FALSE; diff -c -r release/sysinstall/install.c release.mod/sysinstall/install.c *** release/sysinstall/install.c Sat Aug 3 03:11:00 1996 --- release.mod/sysinstall/install.c Fri Aug 9 19:22:20 1996 *************** *** 860,866 **** } /* Copy the /etc files into their rightful place */ ! if (vsystem("cd /mnt/stand; find etc | cpio %s -pdum /mnt", cpioVerbosity())) { msgConfirm("Couldn't copy up the /etc files!"); return TRUE; } --- 860,866 ---- } /* Copy the /etc files into their rightful place */ ! if (vsystem("cd /; find etc | cpio %s -pdum /mnt", cpioVerbosity())) { msgConfirm("Couldn't copy up the /etc files!"); return TRUE; } diff -c -r release/sysinstall/sysinstall.h release.mod/sysinstall/sysinstall.h *** release/sysinstall/sysinstall.h Thu Aug 1 03:58:53 1996 --- release.mod/sysinstall/sysinstall.h Fri Aug 9 12:21:02 1996 *************** *** 279,284 **** --- 279,285 ---- /*** Externs ***/ + extern Boolean serial_mode; extern int DebugFD; /* Where diagnostic output goes */ extern Boolean Fake; /* Don't actually modify anything - testing */ extern Boolean SystemWasInstalled; /* Did we install it? */ diff -c -r release/sysinstall/system.c release.mod/sysinstall/system.c *** release/sysinstall/system.c Thu Aug 1 03:58:54 1996 --- release.mod/sysinstall/system.c Fri Aug 9 08:25:45 1996 *************** *** 65,71 **** /* Are we running as init? */ if (getpid() == 1) { setsid(); ! close(0); open("/dev/ttyv0", O_RDWR); close(1); dup(0); close(2); dup(0); printf("%s running as init\n", argv[0]); --- 65,74 ---- /* Are we running as init? */ if (getpid() == 1) { setsid(); ! close(0); open("/dev/console", O_RDWR); ! if (ioctl(0, GIO_COLOR, &ColorDisplay) >= 0){ ! close(0); open("/dev/ttyv0", O_RDWR); ! } close(1); dup(0); close(2); dup(0); printf("%s running as init\n", argv[0]); diff -c -r release/sysinstall/termcap.c release.mod/sysinstall/termcap.c *** release/sysinstall/termcap.c Thu Aug 1 06:47:03 1996 --- release.mod/sysinstall/termcap.c Fri Aug 9 12:22:10 1996 *************** *** 50,55 **** --- 50,61 ---- if (setenv("TERMCAP", termcap_vt100, 1) < 0) return -1; } + if (getpid() == 1){ + printf("SERIAL MODE, debug to /dev/null\n"); + serial_mode = TRUE; + close(DebugFD); + DebugFD = open("/dev/null", O_RDWR, 0); + } if (DebugFD == -1) DebugFD = dup(1); }