Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/vax/cdroms/installcd Use GENERIC instead of INSTALL ...
details: https://anonhg.NetBSD.org/src/rev/4c9f3533d7e9
branches: trunk
changeset: 329373:4c9f3533d7e9
user: martin <martin%NetBSD.org@localhost>
date: Wed May 21 14:21:35 2014 +0000
description:
Use GENERIC instead of INSTALL (including the ramdisk) for this CD image
and mount the CD filesystem as root instead for installation.
diffstat:
distrib/vax/cdroms/installcd/Makefile | 83 +++++++++++++++++++++-
distrib/vax/cdroms/installcd/etc.rc | 57 +++++++++++++++
distrib/vax/cdroms/installcd/etc.ttys | 7 +
distrib/vax/cdroms/installcd/install.sh | 115 ++++++++++++++++++++++++++++++++
4 files changed, 257 insertions(+), 5 deletions(-)
diffs (290 lines):
diff -r 603ff7589e1a -r 4c9f3533d7e9 distrib/vax/cdroms/installcd/Makefile
--- a/distrib/vax/cdroms/installcd/Makefile Wed May 21 14:03:42 2014 +0000
+++ b/distrib/vax/cdroms/installcd/Makefile Wed May 21 14:21:35 2014 +0000
@@ -1,17 +1,90 @@
-# $NetBSD: Makefile,v 1.2 2012/01/15 22:34:34 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2014/05/21 14:21:35 martin Exp $
CDBASE= vaxcd # gives ${CDBASE}.iso
CDRELEASE= true # include $RELEASEDIR/$MACHINE
-CDKERNELS= install.ram.gz netbsd
-CDINSTKERNEL= ../../ramdisk-kernel
+CDKERNELS= ${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz netbsd
+CDRELEASE_NOISOS=true
-#make the CD bootable
-prepare_md_post:
+# for PRINTOBJDIR
+.include <bsd.own.mk>
+SYSINSTDIR!= cd ${.CURDIR}/../../../utils/sysinst/arch/${MACHINE} && ${PRINTOBJDIR}
+
+# prepare mutliuser install environment
+image_md_pre:
${RM} -f cdrom/boot
${CP} ${DESTDIR}/usr/mdec/boot cdrom/boot
${RM} -f bootxx.${MACHINE}
${CP} ${DESTDIR}/usr/mdec/xxboot bootxx.${MACHINE}
+ ${RM} -rf cdrom/libexec/dhcpcd-hooks/*
+ ${MKDIR} -p cdrom/libexec/dhcpcd-hooks
+ ${CP} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks
+ ${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks
+ ${MKDIR} cdrom/etc
+ ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab
+ ${INSTALL} ${COPY} ${.CURDIR}/etc.ttys cdrom/etc/ttys
+ ${INSTALL} ${COPY} ${.CURDIR}/etc.rc cdrom/etc/rc
+ ${INSTALL} ${COPY} -m 0555 ${.CURDIR}/install.sh cdrom/install.sh
+ ${MKDIR} cdrom/mnt2 cdrom/targetroot
+ ${INSTALL} ${COPY} -m 0555 ${SYSINSTDIR}/sysinst cdrom
+ for f in ${SYSINSTDIR}/sysinstmsgs.??; do \
+ ${INSTALL} ${COPY} $$f cdrom; \
+ done
+ ${MKDIR} cdrom/var
+ ${MKDIR} cdrom/kern
+# make the CD bootable
image_md_post:
${TOOL_INSTALLBOOT} -m${MACHINE} ${CDIMAGE} bootxx.${MACHINE}
+CDRUNTIME+= ./bin
+CDRUNTIME+= ./dev/MAKEDEV
+CDRUNTIME+= ./etc
+CDRUNTIME+= ./lib
+CDRUNTIME+= ./libdata
+CDRUNTIME+= ./libexec
+CDRUNTIME+= ./mnt
+CDRUNTIME+= ./sbin
+# CDRUNTIME+= ./stand
+CDRUNTIME+= ./tmp
+CDRUNTIME+= ./usr/bin/ftp
+CDRUNTIME+= ./usr/bin/getopt
+CDRUNTIME+= ./usr/bin/gunzip
+CDRUNTIME+= ./usr/bin/gzcat
+CDRUNTIME+= ./usr/bin/gzip
+CDRUNTIME+= ./usr/bin/grep
+CDRUNTIME+= ./usr/bin/less
+CDRUNTIME+= ./usr/bin/more
+CDRUNTIME+= ./usr/bin/netstat
+CDRUNTIME+= ./usr/bin/progress
+CDRUNTIME+= ./usr/bin/sed
+CDRUNTIME+= ./usr/bin/sort
+CDRUNTIME+= ./usr/bin/tip
+CDRUNTIME+= ./usr/bin/tput
+CDRUNTIME+= ./usr/bin/vi
+CDRUNTIME+= ./usr/bin/vmstat
+CDRUNTIME+= ./usr/lib/libbz2.so*
+CDRUNTIME+= ./usr/lib/libc.so*
+CDRUNTIME+= ./usr/lib/libcurses.so*
+CDRUNTIME+= ./usr/lib/libedit.so*
+CDRUNTIME+= ./usr/lib/libgcc_s.so*
+CDRUNTIME+= ./usr/lib/libintl.so*
+CDRUNTIME+= ./usr/lib/libkvm.so*
+CDRUNTIME+= ./usr/lib/liblzma.so*
+CDRUNTIME+= ./usr/lib/libterminfo.so*
+CDRUNTIME+= ./usr/lib/libutil.so*
+CDRUNTIME+= ./usr/lib/libz.so*
+.if (${MKCRYPTO} != "no")
+CDRUNTIME+= ./usr/lib/libcrypto.so*
+CDRUNTIME+= ./usr/lib/libssl.so*
+.endif
+CDRUNTIME+= ./usr/libexec/ld.elf_so
+CDRUNTIME+= ./usr/libexec/getty
+CDRUNTIME+= ./usr/mdec
+CDRUNTIME+= ./usr/sbin/chat
+CDRUNTIME+= ./usr/sbin/chroot
+CDRUNTIME+= ./usr/sbin/installboot
+CDRUNTIME+= ./usr/sbin/pppd
+CDRUNTIME+= ./usr/sbin/wiconfig
+CDRUNTIME+= ./usr/share/misc/terminfo.cdb
+CDRUNTIME+= ./usr/share/locale
+
.include "${.CURDIR}/../../../common/Makefile.bootcd"
diff -r 603ff7589e1a -r 4c9f3533d7e9 distrib/vax/cdroms/installcd/etc.rc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/vax/cdroms/installcd/etc.rc Wed May 21 14:21:35 2014 +0000
@@ -0,0 +1,57 @@
+# $NetBSD: etc.rc,v 1.1 2014/05/21 14:21:35 martin Exp $
+#
+# Copyright (c) 1997 Perry E. Metzger
+# 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
+
+# hack to get around bugs in kernfs's rootdev/rrootdev lookup.
+ls -l /dev/* > /dev/null 2>&1
+
+# mount a few tempfs to allow modifications over the CD contents
+mount -t tmpfs tmpfs /tmp
+mount -t tmpfs tmpfs /var
+mount -t tmpfs -o union tmpfs /etc
+
+# prepare important directories in the tmpfses, so dhcpcd and vi will work
+mkdir -p /var/run /var/db /var/tmp
+
+# create a gettytab to autologin and run sysinst (etc/gettytab is a symlink
+# to /tmp/gettytab)
+echo "# Autostart sysinst" > /tmp/gettytab
+echo -n "sysinst:al=root:lo=/install.sh:im=:sp#" >> /tmp/gettytab
+stty speed >> /tmp/gettytab
+
+# done, move on to multiuser mode
+exit 0
diff -r 603ff7589e1a -r 4c9f3533d7e9 distrib/vax/cdroms/installcd/etc.ttys
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/vax/cdroms/installcd/etc.ttys Wed May 21 14:21:35 2014 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: etc.ttys,v 1.1 2014/05/21 14:21:35 martin Exp $
+#
+# re-launch the sysinst wrapper script on console
+#
+# name getty type status comments
+#
+console "/usr/libexec/getty sysinst" wsvt25 on secure
diff -r 603ff7589e1a -r 4c9f3533d7e9 distrib/vax/cdroms/installcd/install.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/vax/cdroms/installcd/install.sh Wed May 21 14:21:35 2014 +0000
@@ -0,0 +1,115 @@
+#! /bin/sh -m
+# $NetBSD: install.sh,v 1.1 2014/05/21 14:21:35 martin Exp $
+#
+# -
+# Copyright (c) 2010 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Martin Husemann <martin%NetBSD.org@localhost>.
+#
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``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 FOUNDATION OR CONTRIBUTORS
+# 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.
+
+
+# setup basic environment
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+
+termfile=/tmp/sysinst.term
+
+# Check if we are on a framebuffer or on serial console and default
+# the terminal type accordingly.
+# There is no /var/db/dev.cdb, so sysctl might not map the devicename properly;
+# ttyE0 is 68,0 -> 0x4400
+case $(sysctl -nx kern.consdev) in
+ 440*000000000000)
+ TERM=wsvt25
+ ;;
+ *)
+ if [ -r ${termfile} ]; then
+ . ${termfile}
+ else
+ TERM=vt220
+ fi
+ ;;
+esac
+
+export TERM
+HOME=/
+export HOME
+BLOCKSIZE=1k
+export BLOCKSIZE
+EDITOR=ed
+export EDITOR
+SHELL=/bin/sh
+export SHELL
+
+umask 022
+
+stty newcrt werase ^W intr ^C kill ^U erase ^?
+if [ $TERM != "wsvt25" ]; then
+ cat << "EOM"
+
+
+You are using a serial console, we do not know your terminal emulation.
+Please select one, typical values are:
+
+ vt100
+ ansi
+ xterm
+
+EOM
+ echo -n "Terminal type (just hit ENTER for '$TERM'): "
+ read ans
+ if [ -n "$ans" ];then
+ TERM=$ans
+ fi
+fi
+
+# run the installation or upgrade script.
+cd /
+cmd=./sysinst
+
+while [ -n "${cmd}" ]
+do
+ ${cmd}
+ if [ $? = 4 ]; then
+ echo "Oops, something went wrong - we will try again"
+ exit
+ else
+ if [ -n "$(jobs)" ]; then
+ tput clear
+ echo "You have stopped sysinst, return to it by" \
+ "typing 'exit' or ^D."
+ ${SHELL} -i
+ cmd="fg"
+ else
+ cmd=""
+ fi
+ fi
+done
+
+# remember terminal type, now that we know it for sure
+echo "TERM=${TERM}" > ${termfile}
+echo
+echo "To return to the installer, quit this shell by typing 'exit' or ^D."
+exec ${SHELL}
Home |
Main Index |
Thread Index |
Old Index