Add prep installer
This commit is contained in:
parent
58acc910af
commit
8492c6a9e8
|
@ -0,0 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:54:00 nonaka Exp $
|
||||
|
||||
SUBDIR= floppies
|
||||
|
||||
TARGETS+= release
|
||||
|
||||
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,11 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:53:59 nonaka Exp $
|
||||
|
||||
SUBDIR= ramdisk
|
||||
SUBDIR+= kernel-generic
|
||||
SUBDIR+= kernel-ramdisk
|
||||
SUBDIR+= bootfloppy.generic bootfloppy_com0.generic
|
||||
SUBDIR+= bootfloppy.sysinst bootfloppy_com0.sysinst
|
||||
|
||||
TARGETS+= release
|
||||
|
||||
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2001/01/16 16:53:59 nonaka Exp $
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
|
||||
# REV is revision without dots, as in "15Q"
|
||||
# VER is revision with dots, as in "1.5Q"
|
||||
REV!=sh ${KERNSRCDIR}/conf/osrelease.sh -s
|
||||
VER!=sh ${KERNSRCDIR}/conf/osrelease.sh
|
|
@ -0,0 +1,36 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
IMAGE?= boot.fs
|
||||
KERNDIR?= cd ${.CURDIR}/../kernel-ramdisk && ${PRINTOBJDIR}
|
||||
KERN?= ${KERNDIR}/netbsd.INSTALL.gz
|
||||
|
||||
MDEC?= ${DESTDIR}/usr/mdec
|
||||
MKBOOTIMAGE?= ${MDEC}/mkbootimage
|
||||
BOOTLOADER?= ${MDEC}/boot_com0
|
||||
MDSETIMAGE?= mdsetimage
|
||||
|
||||
realall: ${IMAGE}
|
||||
|
||||
${IMAGE}: ${KERN}
|
||||
${MKBOOTIMAGE} ${BOOTLOADER} ${.TARGET} ${KERN}
|
||||
|
||||
.ifndef RELEASEDIR
|
||||
release:
|
||||
@echo set RELEASEDIR first!
|
||||
@false
|
||||
.else
|
||||
release:
|
||||
-mkdir -p ${RELEASEDIR}/installation/floppy
|
||||
cp -p ${IMAGE} ${RELEASEDIR}/installation/floppy
|
||||
gzip -9c ${IMAGE} > ${RELEASEDIR}/installation/floppy/${IMAGE}.gz
|
||||
.endif
|
||||
|
||||
clean cleandir distclean:
|
||||
rm -f *.core ${IMAGE} ${CLEANFILES}
|
||||
|
||||
.include <bsd.obj.mk>
|
|
@ -0,0 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
|
||||
IMAGE= generic.fs
|
||||
BOOTLOADER= ${MDEC}/boot
|
||||
|
||||
.include <bsd.own.mk>
|
||||
KERNDIR!= cd ${.CURDIR}/../kernel-generic && ${PRINTOBJDIR}
|
||||
KERN= ${KERNDIR}/netbsd.GENERIC.gz
|
||||
|
||||
.include "../bootfloppy-common/Makefile.inc"
|
|
@ -0,0 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:54:00 nonaka Exp $
|
||||
|
||||
IMAGE= sysinst.fs
|
||||
BOOTLOADER= ${MDEC}/boot
|
||||
|
||||
.include <bsd.own.mk>
|
||||
KERNDIR!= cd ${.CURDIR}/../kernel-ramdisk && ${PRINTOBJDIR}
|
||||
KERN= ${KERNDIR}/netbsd.INSTALL.gz
|
||||
|
||||
.include "../bootfloppy-common/Makefile.inc"
|
|
@ -0,0 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:54:00 nonaka Exp $
|
||||
|
||||
IMAGE= generic_com0.fs
|
||||
BOOTLOADER= ${MDEC}/boot_com0
|
||||
|
||||
.include <bsd.own.mk>
|
||||
KERNDIR!= cd ${.CURDIR}/../kernel-generic && ${PRINTOBJDIR}
|
||||
KERN= ${KERNDIR}/netbsd.GENERIC.gz
|
||||
|
||||
.include "../bootfloppy-common/Makefile.inc"
|
|
@ -0,0 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:54:00 nonaka Exp $
|
||||
|
||||
IMAGE= sysinst_com0.fs
|
||||
BOOTLOADER= ${MDEC}/boot_com0
|
||||
|
||||
.include <bsd.own.mk>
|
||||
KERNDIR!= cd ${.CURDIR}/../kernel-ramdisk && ${PRINTOBJDIR}
|
||||
KERN= ${KERNDIR}/netbsd.INSTALL.gz
|
||||
|
||||
.include "../bootfloppy-common/Makefile.inc"
|
|
@ -0,0 +1,34 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:54:00 nonaka Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
.include <bsd.kernobj.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
KERN= ${KERNOBJDIR}/GENERIC/netbsd
|
||||
KERNEL= netbsd.GENERIC.gz
|
||||
|
||||
CLEANFILES+= ${KERNEL} netbsd.tmp netbsd.tmp.gz
|
||||
|
||||
all: ${KERNEL}
|
||||
|
||||
${KERNEL}: ${KERN}
|
||||
cp ${KERN} netbsd.tmp
|
||||
gzip -9 netbsd.tmp
|
||||
mv netbsd.tmp.gz ${.TARGET}
|
||||
|
||||
.ifndef RELEASEDIR
|
||||
release:
|
||||
@echo set RELEASEDIR first!
|
||||
@false
|
||||
.else
|
||||
release:
|
||||
-mkdir -p ${RELEASEDIR}/binary/kernel
|
||||
cp -p ${KERNEL} ${RELEASEDIR}/binary/kernel
|
||||
.endif
|
||||
|
||||
clean cleandir distclean:
|
||||
rm -f *.core ${CLEANFILES}
|
||||
|
||||
.include <bsd.obj.mk>
|
|
@ -0,0 +1,37 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:53:59 nonaka Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
.include <bsd.kernobj.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
KERN= ${KERNOBJDIR}/INSTALL/netbsd
|
||||
RAMDISKDIR!= cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
|
||||
RAMDISK= ${RAMDISKDIR}/ramdisk.fs
|
||||
KERNEL= netbsd.INSTALL.gz
|
||||
|
||||
CLEANFILES+= ${KERNEL} netbsd.tmp netbsd.tmp.gz
|
||||
|
||||
all: ${KERNEL}
|
||||
|
||||
${KERNEL}: ${KERN} ${RAMDISK}
|
||||
cp ${KERN} netbsd.tmp
|
||||
mdsetimage -v netbsd.tmp ${RAMDISK}
|
||||
gzip -9 netbsd.tmp
|
||||
mv netbsd.tmp.gz ${.TARGET}
|
||||
|
||||
.ifndef RELEASEDIR
|
||||
release:
|
||||
@echo set RELEASEDIR first!
|
||||
@false
|
||||
.else
|
||||
release:
|
||||
-mkdir -p ${RELEASEDIR}/binary/kernel
|
||||
cp -p ${KERNEL} ${RELEASEDIR}/binary/kernel
|
||||
.endif
|
||||
|
||||
clean cleandir distclean:
|
||||
rm -f *.core ${CLEANFILES}
|
||||
|
||||
.include <bsd.obj.mk>
|
|
@ -0,0 +1,55 @@
|
|||
# $NetBSD: list2sh.awk,v 1.1 2001/01/16 16:53:59 nonaka Exp $
|
||||
|
||||
BEGIN {
|
||||
printf("cd ${CURDIR}\n");
|
||||
printf("\n");
|
||||
}
|
||||
/^$/ || /^#/ {
|
||||
print $0;
|
||||
next;
|
||||
}
|
||||
$1 == "COPY" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("rm -f ${TARGDIR}/%s\n", $3);
|
||||
printf("cp %s ${TARGDIR}/%s\n", $2, $3);
|
||||
next;
|
||||
}
|
||||
$1 == "LINK" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("rm -f ${TARGDIR}/%s\n", $3);
|
||||
printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
|
||||
next;
|
||||
}
|
||||
$1 == "SYMLINK" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("rm -f ${TARGDIR}/%s\n", $3);
|
||||
printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
|
||||
next;
|
||||
}
|
||||
$1 == "COPYDIR" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n",
|
||||
$3);
|
||||
printf("(cd %s && find . ! -name . | cpio -pdamu ${TARGDIR}/%s)\n", $2,
|
||||
$3);
|
||||
next;
|
||||
}
|
||||
$1 == "SPECIAL" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("(cd ${TARGDIR};");
|
||||
for (i = 2; i <= NF; i++)
|
||||
printf(" %s", $i);
|
||||
printf(")\n");
|
||||
next;
|
||||
}
|
||||
{
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("echo 'Unknown keyword \"%s\" at line %d of input.'\n", $1, NR);
|
||||
printf("exit 1\n");
|
||||
exit 1;
|
||||
}
|
||||
END {
|
||||
printf("\n");
|
||||
printf("exit 0\n");
|
||||
exit 0;
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
IMAGE= ramdisk.fs
|
||||
|
||||
AUXDEPENDS= disktab.preinstall dot.profile termcap.src
|
||||
|
||||
CBIN= ramdiskbin
|
||||
|
||||
MOUNT_POINT?= /mnt
|
||||
# DEV/RDEV file system device, CDEV/RCDEV vnconfig device
|
||||
VND?= vnd0
|
||||
VND_DEV= /dev/${VND}a
|
||||
VND_RDEV= /dev/r${VND}a
|
||||
VND_CDEV= /dev/${VND}c
|
||||
VND_CRDEV= /dev/r${VND}c
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
|
||||
LISTS= list
|
||||
CRUNCHCONF= ${CBIN}.conf
|
||||
MTREE= mtree.conf
|
||||
|
||||
CRUNCHGEN?= crunchgen
|
||||
|
||||
SIZE= 2048k
|
||||
DISKTYPE= floppyinstfs
|
||||
DBG= -Os -mmultiple
|
||||
|
||||
all: ${IMAGE}
|
||||
|
||||
${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS}
|
||||
rm -f ${IMAGE}.tmp
|
||||
dd if=/dev/zero of=${IMAGE}.tmp bs=${SIZE} count=1
|
||||
vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}.tmp
|
||||
disklabel -f ${.CURDIR}/disktab -rw ${VND_CDEV} ${DISKTYPE}
|
||||
newfs -B be -m 0 -o space -i 6144 -c 128 ${VND_RDEV}
|
||||
mount ${VND_DEV} ${MOUNT_POINT}
|
||||
mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
|
||||
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
||||
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
|
||||
@echo ""
|
||||
@df -i ${MOUNT_POINT}
|
||||
@echo ""
|
||||
umount ${MOUNT_POINT}
|
||||
vnconfig -u ${VND_CDEV}
|
||||
mv -f ${IMAGE}.tmp ${IMAGE}
|
||||
|
||||
unconfig:
|
||||
-umount -f ${MOUNT_POINT}
|
||||
-vnconfig -u ${VND_CDEV}
|
||||
-/bin/rm -f ${IMAGE}
|
||||
|
||||
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||
${CRUNCHGEN} -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
|
||||
|
||||
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c libhack.o
|
||||
make -f ${CBIN}.mk DBG="${DBG}" all
|
||||
|
||||
HACKSRC= ${TOP}/../../utils/libhack
|
||||
.include "${HACKSRC}/Makefile.inc"
|
||||
HACKOBJS= gethost.o getnet.o getpwent.o localeconv.o perror.o \
|
||||
setlocale.o strerror.o strsignal.o utmp.o yplib.o
|
||||
|
||||
release:
|
||||
|
||||
clean cleandir distclean:
|
||||
rm -f ${IMAGE} ${IMAGE}.tmp ${CBIN} ${CBIN}.mk ${CBIN}.cache
|
||||
rm -f *.core *.o *.cro *.c
|
||||
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,36 @@
|
|||
# $NetBSD: disktab,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
#
|
||||
# Disk geometry and partition layout tables.
|
||||
# Key:
|
||||
# dt controller type
|
||||
# ty type of disk (fixed, removeable, simulated)
|
||||
# d[0-4] drive-type-dependent parameters
|
||||
# ns #sectors/track
|
||||
# nt #tracks/cylinder
|
||||
# nc #cylinders/disk
|
||||
# sc #sectors/cylinder, ns*nt default
|
||||
# su #sectors/unit, sc*nc default
|
||||
# se sector size, DEV_BSIZE default
|
||||
# rm rpm, 3600 default
|
||||
# sf supports bad144-style bad sector forwarding
|
||||
# sk sector skew per track, default 0
|
||||
# cs sector skew per cylinder, default 0
|
||||
# hs headswitch time, default 0
|
||||
# ts one-cylinder seek time, default 0
|
||||
# il sector interleave (n:1), 1 default
|
||||
# bs boot block size, default BBSIZE
|
||||
# sb superblock size, default SBSIZE
|
||||
# o[a-h] partition offsets in sectors
|
||||
# p[a-h] partition sizes in sectors
|
||||
# b[a-h] partition block sizes in bytes
|
||||
# f[a-h] partition fragment sizes in bytes
|
||||
# t[a-h] partition types (filesystem, swap, etc)
|
||||
#
|
||||
# All partition sizes reserve space for bad sector tables.
|
||||
# (5 cylinders needed for maintenance + replacement sectors)
|
||||
#
|
||||
|
||||
floppyinstfs|NetBSD floppy install filesystem:\
|
||||
:ty=floppy:se#512:nt#1:rm#300:ns#64:nc#64:\
|
||||
:pa#4096:oa#0:ba#4096:fa#512:ta=4.2BSD:\
|
||||
:pc#4096:oc#0:
|
|
@ -0,0 +1,29 @@
|
|||
# $NetBSD: disktab.preinstall,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
#
|
||||
# Disk geometry and partition layout tables.
|
||||
# Key:
|
||||
# dt controller type
|
||||
# ty type of disk (fixed, removeable, simulated)
|
||||
# d[0-4] drive-type-dependent parameters
|
||||
# ns #sectors/track
|
||||
# nt #tracks/cylinder
|
||||
# nc #cylinders/disk
|
||||
# sc #sectors/cylinder, ns*nt default
|
||||
# su #sectors/unit, sc*nc default
|
||||
# se sector size, DEV_BSIZE default
|
||||
# rm rpm, 3600 default
|
||||
# sf supports bad144-style bad sector forwarding
|
||||
# sk sector skew per track, default 0
|
||||
# cs sector skew per cylinder, default 0
|
||||
# hs headswitch time, default 0
|
||||
# ts one-cylinder seek time, default 0
|
||||
# il sector interleave (n:1), 1 default
|
||||
# bs boot block size, default BBSIZE
|
||||
# sb superblock size, default SBSIZE
|
||||
# o[a-h] partition offsets in sectors
|
||||
# p[a-h] partition sizes in sectors
|
||||
# b[a-h] partition block sizes in bytes
|
||||
# f[a-h] partition fragment sizes in bytes
|
||||
# t[a-h] partition types (filesystem, swap, etc)
|
||||
#
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
# $NetBSD: dot.profile,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
#
|
||||
# Copyright (c) 1995 Jason R. Thorpe
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
|
||||
export PATH
|
||||
TERM=vt100
|
||||
export TERM
|
||||
HOME=/
|
||||
export HOME
|
||||
|
||||
umask 022
|
||||
|
||||
if [ "X${DONEPROFILE}" = "X" ]; then
|
||||
DONEPROFILE=YES
|
||||
export DONEPROFILE
|
||||
|
||||
# set up some sane defaults
|
||||
echo 'erase ^H, werase ^W, kill ^U, intr ^C, status ^T'
|
||||
stty newcrt werase ^W intr ^C kill ^U erase ^H status ^T 9600
|
||||
|
||||
# mount root read-write
|
||||
mount -u /dev/md0a /
|
||||
|
||||
# mount a /tmp on mfs, to avoid filling the md
|
||||
mount -t mfs swap /tmp
|
||||
|
||||
# get the terminal type
|
||||
_forceloop=""
|
||||
while [ "X${_forceloop}" = X"" ]; do
|
||||
eval `tset -s -m ":?$TERM"`
|
||||
if [ "X${TERM}" != X"unknown" ]; then
|
||||
_forceloop="done"
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing or upgrading?
|
||||
_forceloop=""
|
||||
while [ "X${_forceloop}" = X"" ]; do
|
||||
echo -n '(I)nstall, (S)hell or (H)alt ? '
|
||||
read _forceloop
|
||||
case "$_forceloop" in
|
||||
i*|I*)
|
||||
/sysinst
|
||||
;;
|
||||
|
||||
s*|S*)
|
||||
/bin/sh
|
||||
;;
|
||||
|
||||
h*|H*)
|
||||
/sbin/halt
|
||||
;;
|
||||
|
||||
*)
|
||||
_forceloop=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
|
@ -0,0 +1,86 @@
|
|||
# $NetBSD: list,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
|
||||
# copy the crunched binary, link to it, and kill it
|
||||
COPY ${OBJDIR}/ramdiskbin ramdiskbin
|
||||
LINK ramdiskbin sysinst
|
||||
LINK ramdiskbin bin/cat
|
||||
LINK ramdiskbin bin/chmod
|
||||
LINK ramdiskbin bin/cp
|
||||
LINK ramdiskbin bin/dd
|
||||
LINK ramdiskbin bin/df
|
||||
LINK ramdiskbin bin/ed
|
||||
LINK ramdiskbin bin/ln
|
||||
LINK ramdiskbin bin/ls
|
||||
LINK ramdiskbin bin/mkdir
|
||||
LINK ramdiskbin bin/mv
|
||||
LINK ramdiskbin bin/pax
|
||||
LINK ramdiskbin bin/pwd
|
||||
LINK ramdiskbin bin/rcmd
|
||||
LINK ramdiskbin bin/rcp
|
||||
LINK ramdiskbin bin/rm
|
||||
LINK ramdiskbin bin/sh
|
||||
LINK ramdiskbin bin/stty
|
||||
LINK ramdiskbin bin/sync
|
||||
LINK ramdiskbin bin/test
|
||||
LINK ramdiskbin bin/[
|
||||
LINK ramdiskbin sbin/disklabel
|
||||
LINK ramdiskbin sbin/dmesg
|
||||
LINK ramdiskbin sbin/fsck
|
||||
LINK ramdiskbin sbin/fsck_ffs
|
||||
LINK ramdiskbin sbin/halt
|
||||
LINK ramdiskbin sbin/ifconfig
|
||||
LINK ramdiskbin sbin/init
|
||||
LINK ramdiskbin sbin/mknod
|
||||
LINK ramdiskbin sbin/mount
|
||||
LINK ramdiskbin sbin/mount_cd9660
|
||||
LINK ramdiskbin sbin/mount_ffs
|
||||
LINK ramdiskbin sbin/mount_kernfs
|
||||
LINK ramdiskbin sbin/mount_mfs
|
||||
LINK ramdiskbin sbin/mount_msdos
|
||||
LINK ramdiskbin sbin/mount_nfs
|
||||
LINK ramdiskbin sbin/newfs
|
||||
LINK ramdiskbin sbin/ping
|
||||
LINK ramdiskbin sbin/reboot
|
||||
LINK ramdiskbin sbin/restore
|
||||
LINK ramdiskbin sbin/route
|
||||
LINK ramdiskbin sbin/rrestore
|
||||
LINK ramdiskbin sbin/shutdown
|
||||
LINK ramdiskbin sbin/umount
|
||||
LINK ramdiskbin usr/bin/chgrp
|
||||
LINK ramdiskbin usr/bin/ftp
|
||||
LINK ramdiskbin usr/bin/gunzip
|
||||
LINK ramdiskbin usr/bin/gzcat
|
||||
LINK ramdiskbin usr/bin/gzip
|
||||
LINK ramdiskbin usr/bin/more
|
||||
LINK ramdiskbin usr/bin/sed
|
||||
LINK ramdiskbin usr/bin/tar
|
||||
LINK ramdiskbin usr/bin/tset
|
||||
LINK ramdiskbin usr/sbin/chown
|
||||
LINK ramdiskbin usr/sbin/chroot
|
||||
SPECIAL /bin/rm ramdiskbin
|
||||
|
||||
# copy the MAKEDEV script and make some devices
|
||||
COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
|
||||
SPECIAL cd dev; sh MAKEDEV ramdisk
|
||||
SPECIAL /bin/rm dev/MAKEDEV
|
||||
|
||||
# and the termcap file
|
||||
COPY ${CURDIR}/termcap.src usr/share/misc/termcap
|
||||
|
||||
# various files that we need in /etc for the install
|
||||
COPY ${CURDIR}/../../../../etc/group etc/group
|
||||
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
|
||||
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
|
||||
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
|
||||
COPY ${CURDIR}/../../../../etc/services etc/services
|
||||
SPECIAL pwd_mkdb -p -d . etc/master.passwd
|
||||
SPECIAL rm etc/pwd.db etc/spwd.db
|
||||
|
||||
# the disktab explanation file
|
||||
COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall
|
||||
|
||||
# and the installation scripts
|
||||
COPY ${CURDIR}/dot.profile .profile
|
||||
|
||||
# Minimize use of MFS
|
||||
SYMLINK /tmp var/tmp
|
|
@ -0,0 +1,82 @@
|
|||
# $NetBSD: mtree.conf,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
|
||||
/set type=dir uname=root gname=wheel mode=0755
|
||||
# .
|
||||
.
|
||||
|
||||
# ./bin
|
||||
bin
|
||||
# ./bin
|
||||
..
|
||||
|
||||
# ./dev
|
||||
dev
|
||||
# ./dev
|
||||
..
|
||||
|
||||
# ./dist
|
||||
dist
|
||||
# ./dist
|
||||
..
|
||||
|
||||
# ./etc
|
||||
etc
|
||||
# ./etc
|
||||
..
|
||||
|
||||
# ./mnt
|
||||
mnt
|
||||
# ./mnt
|
||||
..
|
||||
|
||||
# ./mnt2
|
||||
mnt2
|
||||
# ./mnt2
|
||||
..
|
||||
|
||||
# ./sbin
|
||||
sbin
|
||||
# ./sbin
|
||||
..
|
||||
|
||||
# ./tmp
|
||||
tmp mode=01777
|
||||
# ./tmp
|
||||
..
|
||||
|
||||
# ./var
|
||||
var
|
||||
# ./var
|
||||
..
|
||||
|
||||
# ./usr
|
||||
usr
|
||||
|
||||
# ./usr/bin
|
||||
bin
|
||||
# ./usr/bin
|
||||
..
|
||||
|
||||
# ./usr/mdec
|
||||
mdec
|
||||
# ./usr/mdec
|
||||
..
|
||||
|
||||
# ./usr/sbin
|
||||
sbin
|
||||
# ./usr/sbin
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
share
|
||||
|
||||
# ./usr/share/misc
|
||||
misc
|
||||
# ./usr/share/misc
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
..
|
||||
|
||||
# ./usr
|
||||
..
|
|
@ -0,0 +1,44 @@
|
|||
# $NetBSD: ramdiskbin.conf,v 1.1 2001/01/16 16:53:58 nonaka Exp $
|
||||
#
|
||||
# ramdiskbin.conf - unified binary for the install ramdisk
|
||||
|
||||
srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin
|
||||
|
||||
progs cat chmod chown chroot cp dd df disklabel dmesg ed
|
||||
progs fdisk fsck fsck_ffs ftp gzip ifconfig init ln ls
|
||||
progs mkdir mknod more mount mount_cd9660 mount_ffs
|
||||
progs mount_msdos mount_nfs mv newfs pax ping pwd
|
||||
progs rcmd rcp reboot restore rm route sed sh shutdown
|
||||
progs stty sync test tip tset umount
|
||||
progs sysinst
|
||||
|
||||
special dd srcdir distrib/utils/x_dd
|
||||
special dmesg srcdir distrib/utils/x_dmesg
|
||||
special ftp srcdir distrib/utils/x_ftp
|
||||
special gzip srcdir distrib/utils/x_gzip
|
||||
special ifconfig srcdir distrib/utils/x_ifconfig
|
||||
special init srcdir distrib/utils/init_s
|
||||
special more srcdir distrib/utils/more
|
||||
special ping srcdir distrib/utils/x_ping
|
||||
special route srcdir distrib/utils/x_route
|
||||
special sh srcdir distrib/utils/x_sh
|
||||
special sysinst srcdir distrib/utils/sysinst
|
||||
special sysinst srcdir distrib/utils/sysinst/arch/prep
|
||||
|
||||
ln chown chgrp
|
||||
ln gzip gzcat gunzip
|
||||
ln more less
|
||||
ln mount_cd9660 cd9660
|
||||
ln mount_ffs ffs
|
||||
ln mount_msdos msdos
|
||||
ln mount_nfs nfs
|
||||
ln newfs mount_mfs
|
||||
ln pax tar
|
||||
ln reboot halt
|
||||
ln restore rrestore
|
||||
ln rcmd rsh
|
||||
ln sh -sh # init invokes the shell this way
|
||||
ln test [
|
||||
|
||||
libs libhack.o
|
||||
libs -ledit -lutil -lcurses -ltermcap -lcrypt -ll -lm -lz
|
|
@ -0,0 +1,61 @@
|
|||
dumb|80-column dumb tty:\
|
||||
:am:\
|
||||
:co#80:\
|
||||
:bl=^G:cr=^M:do=^J:sf=^J:
|
||||
unknown|unknown terminal type:\
|
||||
:gn:tc=dumb:
|
||||
lpr|printer|line printer:\
|
||||
:bs:hc:os:\
|
||||
:co#132:li#66:\
|
||||
:bl=^G:cr=^M:do=^J:ff=^L:le=^H:sf=^J:
|
||||
glasstty|classic glass tty interpreting ASCII control characters:\
|
||||
:am:\
|
||||
:co#80:\
|
||||
:bl=^G:cl=^L:cr=^M:do=^J:kb=^H:kd=^J:kl=^H:le=^H:nw=^M^J:\
|
||||
:ta=^I:
|
||||
vt52|dec vt52:\
|
||||
:bs:\
|
||||
:co#80:it#8:li#24:\
|
||||
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
|
||||
:ae=\EG:as=\EF:bl=^G:cd=\EJ:ce=\EK:cl=\EH\EJ:cm=\EY%+ %+ :\
|
||||
:cr=^M:do=\EB:ho=\EH:kb=^H:kd=\EB:kl=\ED:kr=\EC:ku=\EA:\
|
||||
:le=\ED:nd=\EC:nw=^M^J:sf=^J:sr=\EI:ta=^I:up=\EA:
|
||||
vt100|vt100-am|dec vt100 (w/advanced video):\
|
||||
:am:bs:ms:xn:xo:\
|
||||
:co#80:it#8:li#24:vt#3:\
|
||||
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
|
||||
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
|
||||
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
|
||||
:ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
|
||||
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
|
||||
:eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
|
||||
:k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
|
||||
:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
|
||||
:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
|
||||
:nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
|
||||
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
|
||||
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
|
||||
:up=\E[A:us=\E[4m:
|
||||
xterm-r6|xterm-old|xterm X11R6 version:\
|
||||
:am:bs:km:mi:ms:xn:\
|
||||
:co#80:it#8:li#24:\
|
||||
:*6=\E[4~:@0=\E[1~:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\
|
||||
:DO=\E[%dB:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:\
|
||||
:F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:\
|
||||
:FA=\E[34~:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:\
|
||||
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
|
||||
:ae=\E(B:al=\E[L:as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
|
||||
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
|
||||
:dl=\E[M:do=^J:eA=\E(B:ei=\E[4l:ho=\E[H:im=\E[4h:\
|
||||
:is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:k1=\EOP:\
|
||||
:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:\
|
||||
:k8=\E[19~:k9=\E[20~:k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:\
|
||||
:kP=\E[5~:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:\
|
||||
:ks=\E[?1h\E=:ku=\EOA:le=^H:md=\E[1m:me=\E[m:ml=\El:\
|
||||
:mr=\E[7m:mu=\Em:nd=\E[C:\
|
||||
:r2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:rc=\E8:\
|
||||
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:ta=^I:\
|
||||
:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ue=\E[m:up=\E[A:\
|
||||
:us=\E[4m:
|
||||
xterm|vs100|xterms|xterm terminal emulator (X Window System):\
|
||||
:tc=xterm-r6:
|
|
@ -0,0 +1,13 @@
|
|||
# $NetBSD: runlist.sh,v 1.1 2001/01/16 16:53:59 nonaka Exp $
|
||||
|
||||
if [ "X$1" = "X-d" ]; then
|
||||
SHELLCMD=cat
|
||||
shift
|
||||
else
|
||||
SHELLCMD="sh -e"
|
||||
fi
|
||||
|
||||
( while [ "X$1" != "X" ]; do
|
||||
cat $1
|
||||
shift
|
||||
done ) | awk -f ${TOPDIR}/list2sh.awk | ${SHELLCMD}
|
|
@ -0,0 +1,14 @@
|
|||
# $NetBSD: Makefile,v 1.1 2001/01/16 16:54:01 nonaka Exp $
|
||||
#
|
||||
# Makefile for prep
|
||||
#
|
||||
|
||||
# have to have all of them here for crunch ...
|
||||
|
||||
SRCS= menu_defs.c msg_defs.c main.c install.c upgrade.c \
|
||||
txtwalk.c run.c factor.c net.c disks.c disks_lfs.c util.c geom.c \
|
||||
label.c target.c md.c mbr.c
|
||||
|
||||
fdisk.o md.o: menu_defs.h msg_defs.h
|
||||
|
||||
.include "../../Makefile.inc"
|
|
@ -0,0 +1,399 @@
|
|||
/* $NetBSD: md.c,v 1.1 2001/01/16 16:54:01 nonaka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Piermont Information Systems Inc.
|
||||
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* md.c -- Machine specific code for prep */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <util.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#include "defs.h"
|
||||
#include "md.h"
|
||||
#include "msg_defs.h"
|
||||
#include "menu_defs.h"
|
||||
#include "endian.h"
|
||||
|
||||
char mbr[512];
|
||||
|
||||
int mbr_present, mbr_len;
|
||||
int c1024_resp;
|
||||
struct disklist *disklist = NULL;
|
||||
struct nativedisk_info *nativedisk;
|
||||
struct biosdisk_info *biosdisk = NULL;
|
||||
int netbsd_mbr_installed = 0;
|
||||
|
||||
|
||||
/* prototypes */
|
||||
|
||||
|
||||
int
|
||||
md_get_info(void)
|
||||
{
|
||||
|
||||
read_mbr(diskdev, mbr, sizeof mbr);
|
||||
if (!valid_mbr(mbr)) {
|
||||
memset(&mbr[MBR_PARTOFF], 0,
|
||||
NMBRPART * sizeof (struct mbr_partition));
|
||||
/* XXX check result and give up if < 0 */
|
||||
*((u_int16_t *)&mbr[MBR_MAGICOFF]) = le_to_native16(MBR_MAGIC);
|
||||
netbsd_mbr_installed = 1;
|
||||
} else
|
||||
mbr_len = MBR_SECSIZE;
|
||||
|
||||
edit_mbr((struct mbr_partition *)&mbr[MBR_PARTOFF]);
|
||||
|
||||
/* Compute minimum NetBSD partition sizes (in sectors). */
|
||||
minfsdmb = STDNEEDMB * (MEG / sectorsize);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
md_pre_disklabel(void)
|
||||
{
|
||||
|
||||
msg_display(MSG_dofdisk);
|
||||
|
||||
/* write edited MBR onto disk. */
|
||||
if (write_mbr(diskdev, mbr, sizeof mbr, 1) != 0) {
|
||||
msg_display(MSG_wmbrfail);
|
||||
process_menu(MENU_ok);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
md_post_disklabel(void)
|
||||
{
|
||||
|
||||
/* Sector forwarding / badblocks ... */
|
||||
if (*doessf) {
|
||||
msg_display(MSG_dobad144);
|
||||
return run_prog(RUN_DISPLAY, NULL, "/usr/sbin/bad144 %s 0",
|
||||
diskdev);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
md_post_newfs(void)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
md_copy_filesystem(void)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
md_make_bsd_partitions(void)
|
||||
{
|
||||
FILE *f;
|
||||
int i;
|
||||
int part;
|
||||
int maxpart = getmaxpartitions();
|
||||
int remain;
|
||||
|
||||
/* Ask for layout type -- standard or special */
|
||||
msg_display(MSG_layout,
|
||||
(1.0*fsptsize*sectorsize)/MEG,
|
||||
(1.0*minfsdmb*sectorsize)/MEG,
|
||||
(1.0*minfsdmb*sectorsize)/MEG+rammb+XNEEDMB);
|
||||
process_menu(MENU_layout);
|
||||
|
||||
if (layoutkind == 3) {
|
||||
ask_sizemult(dlcylsize);
|
||||
} else {
|
||||
sizemult = MEG / sectorsize;
|
||||
multname = msg_string(MSG_megname);
|
||||
}
|
||||
|
||||
/* Build standard partitions */
|
||||
emptylabel(bsdlabel);
|
||||
|
||||
/* Partitions C is predefined. */
|
||||
bsdlabel[D].pi_fstype = FS_UNUSED;
|
||||
bsdlabel[D].pi_offset = 0;
|
||||
bsdlabel[D].pi_size = fsdsize;
|
||||
|
||||
/* Standard fstypes */
|
||||
bsdlabel[A].pi_fstype = FS_BSDFFS;
|
||||
bsdlabel[B].pi_fstype = FS_SWAP;
|
||||
bsdlabel[D].pi_fstype = FS_UNUSED;
|
||||
bsdlabel[E].pi_fstype = FS_UNUSED;
|
||||
bsdlabel[F].pi_fstype = FS_UNUSED;
|
||||
bsdlabel[G].pi_fstype = FS_UNUSED;
|
||||
bsdlabel[H].pi_fstype = FS_UNUSED;
|
||||
|
||||
switch (layoutkind) {
|
||||
case 1: /* standard: a root, b swap, c "unused", d /usr */
|
||||
case 2: /* standard X: a root, b swap (big), c "unused", d /usr */
|
||||
partstart = ptstart;
|
||||
|
||||
/* check that we have enouth space */
|
||||
i = NUMSEC(20+2*rammb, MEG/sectorsize, dlcylsize);
|
||||
i += NUMSEC(layoutkind * 2 * (rammb < 16 ? 16 : rammb),
|
||||
MEG/sectorsize, dlcylsize);
|
||||
if ( i > fsptsize) {
|
||||
msg_display(MSG_disktoosmall);
|
||||
process_menu(MENU_ok);
|
||||
goto custom;
|
||||
}
|
||||
/* Root */
|
||||
i = NUMSEC(20+2*rammb, MEG/sectorsize, dlcylsize) + partstart;
|
||||
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||
dlcylsize) - partstart;
|
||||
bsdlabel[A].pi_offset = partstart;
|
||||
bsdlabel[A].pi_size = partsize;
|
||||
bsdlabel[A].pi_bsize = 8192;
|
||||
bsdlabel[A].pi_fsize = 1024;
|
||||
strcpy (fsmount[A], "/");
|
||||
partstart += partsize;
|
||||
|
||||
/* swap */
|
||||
i = NUMSEC(layoutkind * 2 * (rammb < 16 ? 16 : rammb),
|
||||
MEG/sectorsize, dlcylsize) + partstart;
|
||||
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||
dlcylsize) - partstart;
|
||||
bsdlabel[B].pi_offset = partstart;
|
||||
bsdlabel[B].pi_size = partsize;
|
||||
partstart += partsize;
|
||||
|
||||
/* /usr */
|
||||
partsize = fsptsize - (partstart - ptstart);
|
||||
bsdlabel[D].pi_fstype = FS_BSDFFS;
|
||||
bsdlabel[D].pi_offset = partstart;
|
||||
bsdlabel[D].pi_size = partsize;
|
||||
bsdlabel[D].pi_bsize = 8192;
|
||||
bsdlabel[D].pi_fsize = 1024;
|
||||
strcpy (fsmount[D], "/usr");
|
||||
break;
|
||||
|
||||
case 3: /* custom: ask user for all sizes */
|
||||
custom: ask_sizemult(dlcylsize);
|
||||
msg_display(MSG_defaultunit, multname);
|
||||
partstart = ptstart;
|
||||
remain = fsptsize;
|
||||
|
||||
/* root */
|
||||
i = NUMSEC(20+2*rammb, MEG/sectorsize, dlcylsize) + partstart;
|
||||
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||
dlcylsize) - partstart;
|
||||
if (partsize > remain)
|
||||
partsize = remain;
|
||||
msg_display_add(MSG_askfsroot1, remain/sizemult, multname);
|
||||
partsize = getpartsize(MSG_askfsroot2, partstart, partsize);
|
||||
bsdlabel[A].pi_offset = partstart;
|
||||
bsdlabel[A].pi_size = partsize;
|
||||
bsdlabel[A].pi_bsize = 8192;
|
||||
bsdlabel[A].pi_fsize = 1024;
|
||||
strcpy (fsmount[A], "/");
|
||||
partstart += partsize;
|
||||
remain -= partsize;
|
||||
|
||||
/* swap */
|
||||
i = NUMSEC( 2 * (rammb < 16 ? 16 : rammb),
|
||||
MEG/sectorsize, dlcylsize) + partstart;
|
||||
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||
dlcylsize) - partstart;
|
||||
if (partsize > remain)
|
||||
partsize = remain;
|
||||
msg_display(MSG_askfsswap1, remain/sizemult, multname);
|
||||
partsize = getpartsize(MSG_askfsswap2, partstart, partsize);
|
||||
bsdlabel[B].pi_offset = partstart;
|
||||
bsdlabel[B].pi_size = partsize;
|
||||
partstart += partsize;
|
||||
remain -= partsize;
|
||||
|
||||
/* Others D, E, F, G, H */
|
||||
part = D;
|
||||
if (remain > 0)
|
||||
msg_display (MSG_otherparts);
|
||||
while (remain > 0 && part <= H) {
|
||||
msg_display_add(MSG_askfspart1, diskdev,
|
||||
partition_name(part), remain/sizemult, multname);
|
||||
partsize = getpartsize(MSG_askfspart2, partstart,
|
||||
remain);
|
||||
if (partsize > 0) {
|
||||
if (remain - partsize < sizemult)
|
||||
partsize = remain;
|
||||
bsdlabel[part].pi_fstype = FS_BSDFFS;
|
||||
bsdlabel[part].pi_offset = partstart;
|
||||
bsdlabel[part].pi_size = partsize;
|
||||
bsdlabel[part].pi_bsize = 8192;
|
||||
bsdlabel[part].pi_fsize = 1024;
|
||||
if (part == D)
|
||||
strcpy (fsmount[part], "/usr");
|
||||
msg_prompt_add (MSG_mountpoint, fsmount[part],
|
||||
fsmount[part], 20);
|
||||
partstart += partsize;
|
||||
remain -= partsize;
|
||||
}
|
||||
part++;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* OK, we have a partition table. Give the user the chance to
|
||||
* edit it and verify it's OK, or abort altogether.
|
||||
*/
|
||||
if (edit_and_check_label(bsdlabel, maxpart, RAW_PART, RAW_PART) == 0) {
|
||||
msg_display(MSG_abort);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Disk name */
|
||||
msg_prompt (MSG_packname, "mydisk", bsddiskname, DISKNAME_SIZE);
|
||||
|
||||
/* Create the disktab.preinstall */
|
||||
run_prog (0, NULL, "cp /etc/disktab.preinstall /etc/disktab");
|
||||
#ifdef DEBUG
|
||||
f = fopen ("/tmp/disktab", "a");
|
||||
#else
|
||||
f = fopen ("/etc/disktab", "a");
|
||||
#endif
|
||||
if (f == NULL) {
|
||||
endwin();
|
||||
(void) fprintf (stderr, "Could not open /etc/disktab");
|
||||
exit (1);
|
||||
}
|
||||
(void)fprintf (f, "%s|NetBSD installation generated:\\\n", bsddiskname);
|
||||
(void)fprintf (f, "\t:dt=%s:ty=winchester:\\\n", disktype);
|
||||
(void)fprintf (f, "\t:nc#%d:nt#%d:ns#%d:\\\n", dlcyl, dlhead, dlsec);
|
||||
(void)fprintf (f, "\t:sc#%d:su#%d:\\\n", dlhead*dlsec, dlsize);
|
||||
(void)fprintf (f, "\t:se#%d:%s\\\n", sectorsize, doessf);
|
||||
for (i=0; i<8; i++) {
|
||||
(void)fprintf (f, "\t:p%c#%d:o%c#%d:t%c=%s:",
|
||||
'a'+i, bsdlabel[i].pi_size,
|
||||
'a'+i, bsdlabel[i].pi_offset,
|
||||
'a'+i, fstypenames[bsdlabel[i].pi_fstype]);
|
||||
if (bsdlabel[i].pi_fstype == FS_BSDFFS)
|
||||
(void)fprintf (f, "b%c#%d:f%c#%d",
|
||||
'a'+i, bsdlabel[i].pi_bsize,
|
||||
'a'+i, bsdlabel[i].pi_fsize);
|
||||
if (i < 7)
|
||||
(void)fprintf (f, "\\\n");
|
||||
else
|
||||
(void)fprintf (f, "\n");
|
||||
}
|
||||
fclose (f);
|
||||
|
||||
/* Everything looks OK. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Upgrade support */
|
||||
int
|
||||
md_update(void)
|
||||
{
|
||||
|
||||
endwin();
|
||||
md_copy_filesystem();
|
||||
md_post_newfs();
|
||||
wrefresh(curscr);
|
||||
wmove(stdscr, 0, 0);
|
||||
wclear(stdscr);
|
||||
wrefresh(stdscr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
md_cleanup_install(void)
|
||||
{
|
||||
char realfrom[STRSIZE];
|
||||
char realto[STRSIZE];
|
||||
char sedcmd[STRSIZE];
|
||||
|
||||
strncpy(realfrom, target_expand("/etc/rc.conf"), STRSIZE);
|
||||
strncpy(realto, target_expand("/etc/rc.conf.install"), STRSIZE);
|
||||
|
||||
sprintf(sedcmd, "sed 's/rc_configured=NO/rc_configured=YES/' < %s > %s",
|
||||
realfrom, realto);
|
||||
scripting_fprintf(log, "%s\n", sedcmd);
|
||||
do_system(sedcmd);
|
||||
|
||||
run_prog(RUN_FATAL, NULL, "mv -f %s %s", realto, realfrom);
|
||||
run_prog(0, NULL, "rm -f %s", target_expand("/sysinst"));
|
||||
run_prog(0, NULL, "rm -f %s", target_expand("/.termcap"));
|
||||
run_prog(0, NULL, "rm -f %s", target_expand("/.profile"));
|
||||
}
|
||||
|
||||
int
|
||||
md_pre_update(void)
|
||||
{
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
md_init(void)
|
||||
{
|
||||
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
void
|
||||
md_set_sizemultname(void)
|
||||
{
|
||||
|
||||
set_sizemultname_meg();
|
||||
}
|
||||
|
||||
void
|
||||
md_set_no_x(void)
|
||||
{
|
||||
|
||||
toggle_getit (8);
|
||||
toggle_getit (9);
|
||||
toggle_getit (10);
|
||||
toggle_getit (11);
|
||||
toggle_getit (12);
|
||||
toggle_getit (13);
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
/* $NetBSD: md.h,v 1.1 2001/01/16 16:54:01 nonaka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Piermont Information Systems Inc.
|
||||
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* md.h -- Machine specific definitions for the prep */
|
||||
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* prep uses the mbr code. */
|
||||
#include "mbr.h"
|
||||
|
||||
/* constants and defines */
|
||||
#define PART_ROOT A
|
||||
#define PART_SWAP B
|
||||
#define PART_RAW C
|
||||
#define PART_USR D /* Can be after PART_FIRST_FREE */
|
||||
#define PART_FIRST_FREE E
|
||||
|
||||
#define DEFSWAPRAM 32 /* Assume at least this RAM for swap calc */
|
||||
#define DEFROOTSIZE 24 /* Default root size */
|
||||
#define DEFVARSIZE 32 /* Default /var size, if created */
|
||||
#define DEFUSRSIZE 128 /* Default /usr size, if /home */
|
||||
#define STDNEEDMB 160 /* Min space for non X install */
|
||||
#define XNEEDMB 39 /* Extra megs for full X installation */
|
||||
|
||||
|
||||
/*
|
||||
* Default filesets to fetch and install during installation
|
||||
* or upgrade. The standard sets are:
|
||||
* base, etc, comp, games, man, misc, text,
|
||||
* xbase, xfont, xserver, xcontrib, xcomp.
|
||||
*
|
||||
* i386 has the MD set kern first, because generic kernels are too
|
||||
* big to fit on install floppies. i386 does not yet include the x sets.
|
||||
*
|
||||
* Third entry is the last extension name in the split sets for loading
|
||||
* from floppy.
|
||||
*/
|
||||
EXTERN distinfo dist_list[]
|
||||
#ifdef MAIN
|
||||
= {
|
||||
{"kern", 1, "ag", "Kernel : "},
|
||||
{"base", 1, "bw", "Base : "},
|
||||
{"etc", 1, "aa", "System (/etc): "},
|
||||
{"comp", 1, "bl", "Compiler : "},
|
||||
{"games", 1, "am", "Games : "},
|
||||
{"man", 1, "ar", "Manuals : "},
|
||||
{"misc", 1, "aj", "Miscellaneous: "},
|
||||
{"text", 1, "af", "Text tools : "},
|
||||
|
||||
/* XXX no X11 on floppies, what sets are they?*/
|
||||
{"xbase", 1, "al", "X11 clients : "},
|
||||
{"xfont", 1, "az", "X11 fonts : "},
|
||||
{"xserver", 0, "cr", "X11 servers : "},
|
||||
{"xcontrib",1, "aa", "X11 contrib : "},
|
||||
{"xcomp", 1, "ah", "X programming: "},
|
||||
{"xmisc", 1, NULL, "X11 Misc. : "},
|
||||
{NULL, 0, NULL, NULL }
|
||||
}
|
||||
#endif
|
||||
;
|
||||
|
||||
/*
|
||||
* Disk names accepted as valid targets for a from-scratch installation.
|
||||
*
|
||||
* On prep, we allow "wd" ST-506/IDE disks and "sd" scsi disks.
|
||||
*/
|
||||
EXTERN char *disk_names[]
|
||||
#ifdef MAIN
|
||||
= {"wd", "sd", NULL}
|
||||
#endif
|
||||
;
|
||||
|
||||
|
||||
/*
|
||||
* Legal start character for a disk for checking input.
|
||||
* this must return 1 for a character that matches the first
|
||||
* characters of each member of disk_names.
|
||||
*
|
||||
* On prep, that means matching 'w' for st-506/ide and 's' for sd.
|
||||
*/
|
||||
#define ISDISKSTART(dn) (dn == 'w' || dn == 's')
|
||||
|
||||
/*
|
||||
* Machine-specific command to write a new label to a disk.
|
||||
* For example, i386 uses "/sbin/disklabel -w -r", just like i386
|
||||
* miniroot scripts, though this may leave a bogus incore label.
|
||||
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
|
||||
* to get incore to ondisk inode translation for the Sun proms.
|
||||
* If not defined, we assume the port does not support disklabels and
|
||||
* hand-edited disklabel will NOT be written by MI code.
|
||||
*
|
||||
* On prep, do what the 1.2 install scripts did.
|
||||
*/
|
||||
#define DISKLABEL_CMD "disklabel -w -r"
|
||||
|
||||
|
||||
/*
|
||||
* Default fileystem type for floppy disks.
|
||||
* On prep, that is msdos.
|
||||
*/
|
||||
EXTERN char *fdtype INIT("msdos");
|
||||
|
||||
|
||||
/*
|
||||
* prototypes for MD code.
|
||||
*/
|
|
@ -0,0 +1,181 @@
|
|||
/* $NetBSD: menus.md.en,v 1.1 2001/01/16 16:54:01 nonaka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Piermont Information Systems Inc.
|
||||
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Menu definitions for sysinst. prep version, machine dependent. */
|
||||
|
||||
menu fullpart, title "Select your choice";
|
||||
option "Use only part of the disk", exit, action {usefull = 0;};
|
||||
option "Use the entire disk", exit, action {usefull = 1;};
|
||||
|
||||
menu wdtype, title "Select type";
|
||||
display action { msg_display (MSG_wdtype, diskdev); };
|
||||
option "IDE", exit;
|
||||
option "ESDI", exit, action
|
||||
{ msg_display (MSG_sectforward);
|
||||
process_menu (MENU_yesno);
|
||||
if (yesno)
|
||||
doessf = "sf:";
|
||||
};
|
||||
option "ST506", exit, action
|
||||
{ msg_display (MSG_sectforward);
|
||||
process_menu (MENU_yesno);
|
||||
if (yesno)
|
||||
doessf = "sf:";
|
||||
};
|
||||
|
||||
|
||||
menu editparttable, title "Choose your partition", exit;
|
||||
display action { msg_display (MSG_editparttable);
|
||||
disp_cur_part((struct mbr_partition *)&mbr[MBR_PARTOFF
|
||||
], activepart,-1);
|
||||
};
|
||||
option "Edit partition 0", sub menu editpart,
|
||||
action { editpart = 0; };
|
||||
option "Edit partition 1", sub menu editpart,
|
||||
action { editpart = 1; };
|
||||
option "Edit partition 2", sub menu editpart,
|
||||
action { editpart = 2; };
|
||||
option "Edit partition 3", sub menu editpart,
|
||||
action { editpart = 3; };
|
||||
option "Reselect size specification",
|
||||
action { reask_sizemult(bcylsize); };
|
||||
|
||||
menu editpart, title "Select to change";
|
||||
display action { msg_display (MSG_editpart, editpart);
|
||||
disp_cur_part((struct mbr_partition *)&mbr[MBR_PARTOFF
|
||||
], activepart,editpart);
|
||||
msg_display_add(MSG_newline);
|
||||
};
|
||||
option "Kind", sub menu chooseid;
|
||||
option "Start and size", action
|
||||
{ char buf[40]; int start, size;
|
||||
msg_prompt_add (MSG_start, NULL, buf, 40);
|
||||
start = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||
if (sizemult > 1 && start < bsec)
|
||||
start = bsec;
|
||||
msg_prompt_add (MSG_size, NULL, buf, 40);
|
||||
size = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||
if (sizemult > 1 && start == bsec)
|
||||
size -= bsec;
|
||||
if (start + size > bsize)
|
||||
size = bsize - start;
|
||||
if (size < 0) {
|
||||
size = 0;
|
||||
start = 0;
|
||||
}
|
||||
part[editpart].mbrp_start = start;
|
||||
part[editpart].mbrp_size = size;
|
||||
};
|
||||
option "Set active", action { activepart = editpart; };
|
||||
option "Partition OK", exit;
|
||||
|
||||
menu chooseid, title "Partition Kind?";
|
||||
option "NetBSD", exit, action
|
||||
{
|
||||
part[editpart].mbrp_typ = 169;
|
||||
};
|
||||
option "DOS < 32 Meg", exit, action
|
||||
{
|
||||
part[editpart].mbrp_typ = 4;
|
||||
};
|
||||
option "DOS > 32 Meg", exit, action
|
||||
{
|
||||
part[editpart].mbrp_typ = 6;
|
||||
};
|
||||
option "unused", exit, action
|
||||
{
|
||||
part[editpart].mbrp_typ = 0;
|
||||
};
|
||||
|
||||
menu cyl1024;
|
||||
display action {
|
||||
msg_display(MSG_cyl1024);
|
||||
};
|
||||
option "Re-edit both MBR and label", exit, action
|
||||
{
|
||||
/* XXX UGH */
|
||||
extern int c1024_resp;
|
||||
|
||||
c1024_resp = 1;
|
||||
};
|
||||
option "Re-edit the label", exit, action
|
||||
{
|
||||
extern int c1024_resp;
|
||||
|
||||
c1024_resp = 2;
|
||||
};
|
||||
option "Use it anyway", exit, action
|
||||
{
|
||||
extern int c1024_resp;
|
||||
|
||||
c1024_resp = 3;
|
||||
};
|
||||
|
||||
menu editfsparts, y=13, exit;
|
||||
display action {
|
||||
ask_sizemult(dlcylsize);
|
||||
msg_display(MSG_fspart, multname);
|
||||
disp_cur_fspart(-1, 1);
|
||||
};
|
||||
option "Change a", action { editpart = A;}, sub menu edfspart;
|
||||
option "Change b", action { editpart = B;}, sub menu edfspart;
|
||||
option "Whole disk - can't change", action {};
|
||||
option "Change d", action { editpart = D;}, sub menu edfspart;
|
||||
option "Change e", action { editpart = E;}, sub menu edfspart;
|
||||
option "Change f", action { editpart = F;}, sub menu edfspart;
|
||||
option "Change g", action { editpart = G;}, sub menu edfspart;
|
||||
option "Change h", action { editpart = H;}, sub menu edfspart;
|
||||
option "Set new allocation size", action { reask_sizemult(dlcylsize); };
|
||||
|
||||
|
||||
menu md_distcustom, x=26, y=5, exit, title "Selection toggles inclusion";
|
||||
display action { show_cur_distsets (); };
|
||||
option "Kernel", action { toggle_getit (0); };
|
||||
option "Base", action { toggle_getit (1); };
|
||||
option "System (/etc)", action { toggle_getit (2); };
|
||||
option "Compiler Tools", action { toggle_getit (3); };
|
||||
option "Games", action { toggle_getit (4); };
|
||||
option "Online Manual Pages", action { toggle_getit (5); };
|
||||
option "Miscellaneous", action { toggle_getit (6); };
|
||||
option "Text Processing Tools", action { toggle_getit (7); };
|
||||
option "X11 base and clients", action { toggle_getit (8); };
|
||||
option "X11 fonts", action { toggle_getit (9); };
|
||||
option "X11 servers", action { toggle_getit (10); };
|
||||
option "X contrib clients", action { toggle_getit (11); };
|
||||
option "X11 programming", action { toggle_getit (12); };
|
||||
option "X11 Misc.", action { toggle_getit (13); };
|
|
@ -0,0 +1,188 @@
|
|||
/* $NetBSD: msg.md.en,v 1.1 2001/01/16 16:54:01 nonaka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Piermont Information Systems Inc.
|
||||
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* MD Message catalog -- english, prep version */
|
||||
|
||||
message md_hello
|
||||
{
|
||||
}
|
||||
|
||||
message fullpart
|
||||
{We are now going to install NetBSD on the disk %s. You may
|
||||
choose to install NetBSD on the entire disk, or on part of the disk.
|
||||
|
||||
Partial-disk installation creates a partition, or `slice', for NetBSD
|
||||
in your disk's MBR partition table. Whole-disk installation is
|
||||
`dangerously dedicated': it takes over the entire MBR. This WILL
|
||||
overwrite all existing data and OSes on the disk. It also prohibits later
|
||||
installation of multiple OSes on that disk (unless you overwrite NetBSD and
|
||||
reinstall using only part of the disk).
|
||||
|
||||
Which would you like to do?
|
||||
}
|
||||
|
||||
message wdtype
|
||||
{What kind of disk is %s?}
|
||||
|
||||
message sectforward
|
||||
{Does your disk do AUTOMATIC sector forwarding?}
|
||||
|
||||
/* the %s's will expand into three character strings */
|
||||
message part_header
|
||||
{ Total disksize %d sectors
|
||||
|
||||
Start(%3s) Size(%3s) End(%3s) Kind
|
||||
---------- ---------- ---------- ----
|
||||
}
|
||||
|
||||
message part_row_start_unused
|
||||
{%-1d: }
|
||||
|
||||
message part_row_start_used
|
||||
{%-1d: %-10d %-10d %-10d}
|
||||
|
||||
message part_row_end
|
||||
{ %s\n}
|
||||
|
||||
message ovrwrite
|
||||
{Your disk currently has a non-NetBSD partition. Do you really want to
|
||||
overwrite that partition with NetBSD?
|
||||
}
|
||||
|
||||
message parttable
|
||||
{The partition table on your disk currently looks like the following:
|
||||
}
|
||||
|
||||
message editpart
|
||||
{Partition %d looks like:\n\n}
|
||||
|
||||
message editparttable
|
||||
{Edit your DOS partition table. The highlighted partition is the currently
|
||||
active partition. The partition table currently looks like:
|
||||
|
||||
}
|
||||
|
||||
message reeditpart
|
||||
{There are overlapping MBR partitions or there is not exactly one NetBSD
|
||||
partition. You should reedit the MBR partition table.
|
||||
|
||||
Do you want to reedit it?
|
||||
}
|
||||
|
||||
message nobsdpart
|
||||
{There is no NetBSD partition in the MBR partition table.}
|
||||
|
||||
message multbsdpart
|
||||
{There are multiple NetBSD partitions in the MBR partition table.
|
||||
Partition %d will be the one used.}
|
||||
|
||||
message dofdisk
|
||||
{Setting up the DOS partition table ...
|
||||
}
|
||||
|
||||
message dobad144
|
||||
{Installing the bad block table ...
|
||||
}
|
||||
|
||||
message dobootblks
|
||||
{Installing boot blocks on %s....
|
||||
}
|
||||
|
||||
message askfsroot1
|
||||
{I will be asking for partition information.
|
||||
|
||||
First the root partition. You have %d %s left on your disk.
|
||||
}
|
||||
|
||||
message askfsroot2
|
||||
{Root partition size? }
|
||||
|
||||
message askfsswap1
|
||||
{
|
||||
Next the swap partition. You have %d %s left on your disk.
|
||||
}
|
||||
|
||||
message askfsswap2
|
||||
{Swap partition size? }
|
||||
|
||||
message otherparts
|
||||
{You still have some space remaining unallocated on your disk. Please
|
||||
give sizes and mount points for the following partitions.
|
||||
|
||||
}
|
||||
|
||||
message askfspart1
|
||||
{The next partition is /dev/%s%c. You have %d %s left on your disk.
|
||||
}
|
||||
|
||||
message askfspart2
|
||||
{Partition size? }
|
||||
|
||||
message cyl1024
|
||||
{The disklabel (set of partitions) you specified has a root partition that
|
||||
ends beyond the 1024 BIOS cylinder boundary. To be sure that the system
|
||||
can be booted at all times, the entire root partition must lie below that
|
||||
limit. You can either: }
|
||||
|
||||
message pickdisk
|
||||
{Choose disk: }
|
||||
|
||||
message wmbrfail
|
||||
{Rewrite of MBR failed. I can't continue.}
|
||||
|
||||
message partabovechs
|
||||
{The NetBSD part of the disk lies outside of the range that the BIOS on
|
||||
your machine can address. Booting from it may not be possible. Are you
|
||||
sure you that you want to do this?
|
||||
|
||||
(Answering 'no' will take you back to the partition edit menu.)}
|
||||
|
||||
message setbiosgeom
|
||||
{You will be prompted for the geometry. Please enter the values you
|
||||
want. The number of cylinders should be <= 1024 and the number of sectors
|
||||
should be <= 63. If you have the BIOS set up to use > 1024 cylinders just
|
||||
truncate that number to 1024 here; NetBSD will know about the rest of the
|
||||
cylinders.
|
||||
|
||||
}
|
||||
|
||||
message realgeom
|
||||
{real geom: %d cyl, %d heads, %d sec (NB: for comparison only)\n}
|
||||
|
||||
message biosgeom
|
||||
{BIOS geom: %d cyl, %d heads, %d sec\n}
|
|
@ -0,0 +1,19 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2001/01/16 16:53:57 nonaka Exp $
|
||||
#
|
||||
# etc.prep/Makefile.inc -- prep-specific etc Makefile targets
|
||||
#
|
||||
|
||||
BUILD_KERNELS+= INSTALL
|
||||
INSTALLATION_DIRS+= installation
|
||||
|
||||
# mkisofs arguments to generate bootable iso image
|
||||
MKISOFS_FLAGS+= -prep-boot installation/floppy/sysinst.fs
|
||||
|
||||
snap_md_post:
|
||||
.ifndef UPDATE
|
||||
cd ${.CURDIR}/../distrib && ${MAKE} cleandir
|
||||
.endif
|
||||
cd ${.CURDIR}/../distrib && ${MAKE} depend && ${MAKE}
|
||||
cd ${.CURDIR}/../distrib/prep && ${MAKE} release
|
||||
cd ${.CURDIR}/../distrib/notes && ${MAKE} release
|
||||
sh ../distrib/sets/makesums -t ${RELEASEDIR}/installation/floppy '*'
|
|
@ -0,0 +1,199 @@
|
|||
# $NetBSD: INSTALL,v 1.1 2001/01/16 16:53:57 nonaka Exp $
|
||||
#
|
||||
# INSTALL -- Installation kernel
|
||||
#
|
||||
|
||||
include "arch/prep/conf/std.prep"
|
||||
|
||||
makeoptions COPTS="-Os -mmultiple" # -Os -mmultiple to reduce size.
|
||||
|
||||
# Enable the hooks used for initializing the ram-disk.
|
||||
options MEMORY_DISK_HOOKS
|
||||
options MEMORY_DISK_IS_ROOT # Force root on ram-disk
|
||||
options MINIROOTSIZE=4096 # 2 Megabytes
|
||||
|
||||
maxusers 8
|
||||
|
||||
# Compatibility options
|
||||
#options COMPAT_13 # NetBSD 1.3,
|
||||
#options COMPAT_14 # NetBSD 1.4,
|
||||
#options COMPAT_43 # and 4.3BSD
|
||||
|
||||
# File systems
|
||||
file-system FFS # UFS
|
||||
file-system EXT2FS # second extended file system (linux)
|
||||
file-system MFS # memory file system
|
||||
file-system NFS # Network File System client
|
||||
file-system CD9660 # ISO 9660 + Rock Ridge file system
|
||||
file-system MSDOSFS # MS-DOS file system
|
||||
|
||||
# File system options
|
||||
options VNODE_OP_NOINLINE # Save space by not inlining vnode op calls
|
||||
options FFS_EI # FFS Endian Independant support
|
||||
#options EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
|
||||
# immutable) behave as system flags.
|
||||
|
||||
# Networking options
|
||||
options INET # IP + ICMP + TCP + UDP
|
||||
options NMBCLUSTERS=1024
|
||||
options NFS_BOOT_BOOTPARAM
|
||||
options NFS_BOOT_DHCP
|
||||
|
||||
# Kernel root file system and dump configuration.
|
||||
config netbsd root on ? type ?
|
||||
|
||||
|
||||
#
|
||||
# Device configuration
|
||||
#
|
||||
|
||||
mainbus0 at root
|
||||
cpu0 at mainbus0
|
||||
|
||||
|
||||
# Basic Bus Support
|
||||
|
||||
# PCI bus support
|
||||
pci0 at mainbus0 bus ?
|
||||
pci* at pchb? bus ?
|
||||
|
||||
# PCI bridges
|
||||
pchb* at pci? dev ? function ? # PCI-Host bridges
|
||||
pcib* at pci? dev ? function ? # PCI-ISA bridges
|
||||
|
||||
# ISA bus support
|
||||
isa* at pcib? # ISA on PCI-ISA bridge
|
||||
|
||||
# PCMCIA bus support
|
||||
pcmcia* at pcic? controller ? socket ?
|
||||
|
||||
# ISA PCMCIA controllers
|
||||
pcic0 at isa? port 0x3e0 iomem 0xd0000 iosiz 0x10000
|
||||
|
||||
#options PCIC_ISA_INTR_ALLOC_MASK=0x4a00 # free irq 9,11,14
|
||||
#options PCIC_ISA_ALLOC_IOBASE=0x0400
|
||||
#options PCIC_ISA_ALLOC_IOSIZE=0x0100
|
||||
|
||||
# ISA Plug-and-Play bus support
|
||||
isapnp0 at isa?
|
||||
|
||||
# Console Devices
|
||||
|
||||
# ISA console.
|
||||
pc0 at isa? port 0x60 irq 1 # generic PC console device
|
||||
|
||||
# Keyboard layout configuration for pccons
|
||||
#options FRENCH_KBD
|
||||
#options FINNISH_KBD
|
||||
#options GERMAN_KBD
|
||||
#options NORWEGIAN_KBD
|
||||
|
||||
mcclock0 at isa? port 0x70 # mc146818 and compatible
|
||||
|
||||
|
||||
# Serial Devices
|
||||
|
||||
# ISA serial interfaces
|
||||
com0 at isa? port 0x3f8 irq 4 # standard PC serial ports
|
||||
com1 at isa? port 0x2f8 irq 3
|
||||
|
||||
# Parallel Printer Interfaces
|
||||
|
||||
# ISA parallel printer interfaces
|
||||
lpt0 at isa? port 0x3bc irq 7 # standard PC parallel ports
|
||||
|
||||
|
||||
# SCSI Controllers and Devices
|
||||
|
||||
# PCI SCSI controllers
|
||||
pcscp* at pci? dev ? function ? # AMD 53c974 PCscsi-PCI SCSI
|
||||
|
||||
# PCMCIA SCSI controllers
|
||||
aic* at pcmcia? function ? # Adaptec APA-1460 SCSI
|
||||
|
||||
# SCSI bus support
|
||||
scsibus* at aic?
|
||||
scsibus* at pcscp?
|
||||
|
||||
# SCSI devices
|
||||
sd* at scsibus? target ? lun ? # SCSI disk drives
|
||||
st* at scsibus? target ? lun ? # SCSI tape drives
|
||||
cd* at scsibus? target ? lun ? # SCSI CD-ROM drives
|
||||
|
||||
|
||||
# IDE and related devices
|
||||
|
||||
# PCMCIA IDE controllers
|
||||
wdc* at pcmcia? function ?
|
||||
|
||||
# IDE drives
|
||||
# Flags are used only with controllers that support DMA operations
|
||||
# and mode settings (e.g. some pciide controllers)
|
||||
# The lowest order four bits (rightmost digit) of the flags define the PIO
|
||||
# mode to use, the next set of four bits the DMA mode and the third set the
|
||||
# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
|
||||
# to use, and the last bit must be 1 for this setting to be used.
|
||||
# For DMA and UDMA, 0xf (1111) means 'disable'.
|
||||
# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
|
||||
# (0xc=1100, 0xa=1010, 0xf=1111)
|
||||
# 0x0000 means "use whatever the drive claims to support".
|
||||
wd* at wdc? channel ? drive ? flags 0x0000
|
||||
|
||||
# ATAPI bus support
|
||||
atapibus* at wdc? channel ?
|
||||
|
||||
# ATAPI devices
|
||||
# flags have the same meaning as for IDE drives.
|
||||
cd* at atapibus? drive ? flags 0x0000 # ATAPI CD-ROM drives
|
||||
sd* at atapibus? drive ? flags 0x0000 # ATAPI disk drives
|
||||
|
||||
# Miscellaneous mass storage devices
|
||||
|
||||
# ISA floppy
|
||||
fdc0 at isa? port 0x3f0 irq 6 drq 2 # standard PC floppy controllers
|
||||
fd* at fdc? drive ?
|
||||
|
||||
# Network Interfaces
|
||||
|
||||
# PCI network interfaces
|
||||
de* at pci? dev ? function ? # DEC 21x4x-based Ethernet
|
||||
ep* at pci? dev ? function ? # 3Com 3c59x
|
||||
le* at pci? dev ? function ? # PCnet-PCI Ethernet
|
||||
ne* at pci? dev ? function ? # NE2000-compatible Ethernet
|
||||
vr* at pci? dev ? function ? # VIA Rhine Fast Ethernet
|
||||
|
||||
# ISA Plug-and-Play network intefaces
|
||||
ep* at isapnp? # 3Com 3c509 Ethernet
|
||||
|
||||
# PCMCIA network interfaces
|
||||
ep* at pcmcia? function ? # 3Com 3c589 and 3c562 Ethernet
|
||||
ne* at pcmcia? function ? # NE2000-compatible Ethernet
|
||||
|
||||
# MII/PHY support
|
||||
dmphy* at mii? phy ? # Davicom DM9101 PHYs
|
||||
exphy* at mii? phy ? # 3Com internal PHYs
|
||||
icsphy* at mii? phy ? # Integrated Circuit Systems ICS1890
|
||||
inphy* at mii? phy ? # Intel 82555 PHYs
|
||||
iophy* at mii? phy ? # Intel 82553 PHYs
|
||||
lxtphy* at mii? phy ? # Level One LXT-970 PHYs
|
||||
nsphy* at mii? phy ? # NS83840 PHYs
|
||||
nsphyter* at mii? phy ? # NS83843 PHYs
|
||||
qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs
|
||||
sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs
|
||||
tlphy* at mii? phy ? # ThunderLAN PHYs
|
||||
tqphy* at mii? phy ? # TDK Semiconductor PHYs
|
||||
ukphy* at mii? phy ? # generic unknown PHYs
|
||||
|
||||
|
||||
# Pseudo-Devices
|
||||
|
||||
# disk/mass storage pseudo-devices
|
||||
pseudo-device md 1 # memory disk device (ramdisk)
|
||||
|
||||
# network pseudo-devices
|
||||
pseudo-device loop # network loopback
|
||||
|
||||
# miscellaneous pseudo-devices
|
||||
pseudo-device pty # pseudo-terminals
|
||||
pseudo-device rnd # /dev/random and in-kernel generator
|
||||
#options RND_COM # use "com" randomness as well
|
Loading…
Reference in New Issue