From owner-svn-src-head@FreeBSD.ORG Fri Jul 4 09:29:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56DD0FA5; Fri, 4 Jul 2014 09:29:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4386223EC; Fri, 4 Jul 2014 09:29:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s649TjkS041303; Fri, 4 Jul 2014 09:29:45 GMT (envelope-from mr@svn.freebsd.org) Received: (from mr@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s649ThgV041291; Fri, 4 Jul 2014 09:29:43 GMT (envelope-from mr@svn.freebsd.org) Message-Id: <201407040929.s649ThgV041291@svn.freebsd.org> From: Michael Reifenberger Date: Fri, 4 Jul 2014 09:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268246 - head/tools/tools/nanobsd/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 09:29:45 -0000 Author: mr Date: Fri Jul 4 09:29:43 2014 New Revision: 268246 URL: http://svnweb.freebsd.org/changeset/base/268246 Log: Adopt to current and other changes: use dedicated kernel files with some local settings use mkimg for ISO building put images into separate directory and rename them for better consistency Added: head/tools/tools/nanobsd/rescue/R32 (contents, props changed) head/tools/tools/nanobsd/rescue/R64 (contents, props changed) Modified: head/tools/tools/nanobsd/rescue/build.sh head/tools/tools/nanobsd/rescue/common head/tools/tools/nanobsd/rescue/merge.sh head/tools/tools/nanobsd/rescue/rescue_amd64.conf head/tools/tools/nanobsd/rescue/rescue_i386.conf Added: head/tools/tools/nanobsd/rescue/R32 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/rescue/R32 Fri Jul 4 09:29:43 2014 (r268246) @@ -0,0 +1,14 @@ +# +# R32 -- Generic kernel configuration file with modifications for rescue. +# +# $FreeBSD$ + +include GENERIC + +ident R32 + +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions MALLOC_DEBUG_MAXZONES Added: head/tools/tools/nanobsd/rescue/R64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/rescue/R64 Fri Jul 4 09:29:43 2014 (r268246) @@ -0,0 +1,14 @@ +# +# R64 -- Generic kernel configuration file with modifications for rescue. +# +# $FreeBSD$ + +include GENERIC + +ident R64 + +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions MALLOC_DEBUG_MAXZONES Modified: head/tools/tools/nanobsd/rescue/build.sh ============================================================================== --- head/tools/tools/nanobsd/rescue/build.sh Fri Jul 4 07:02:11 2014 (r268245) +++ head/tools/tools/nanobsd/rescue/build.sh Fri Jul 4 09:29:43 2014 (r268246) @@ -3,6 +3,8 @@ # $FreeBSD$ # +today=`date '+%Y%m%d'` + if [ -z "${1}" -o \! -f "${1}" ]; then echo "Usage: $0 cfg_file [-bhiknw]" echo "-i : skip image build" @@ -15,4 +17,26 @@ fi CFG="${1}" shift; +if [ \! -d /usr/obj/Rescue ]; then + mkdir -p /usr/obj/Rescue +fi + sh ../nanobsd.sh $* -c ${CFG} + +F32="/usr/obj/Rescue/rescue_${today}_x32" +D32="/usr/obj/nanobsd.rescue_i386" +if [ -f "${D32}/_.disk.full" ]; then + mv "${D32}/_.disk.full" "${F32}.img" +fi +if [ -f "${D32}/_.disk.iso" ]; then + mv "${D32}/_.disk.iso" "${F32}.iso" +fi + +F64="/usr/obj/Rescue/rescue_${today}_x64" +D64="/usr/obj/nanobsd.rescue_amd64" +if [ -f "${D64}/_.disk.full" ]; then + mv "${D64}/_.disk.full" "${F64}.img" +fi +if [ -f "${D64}/_.disk.iso" ]; then + mv "${D64}/_.disk.iso" "${F64}.iso" +fi Modified: head/tools/tools/nanobsd/rescue/common ============================================================================== --- head/tools/tools/nanobsd/rescue/common Fri Jul 4 07:02:11 2014 (r268245) +++ head/tools/tools/nanobsd/rescue/common Fri Jul 4 09:29:43 2014 (r268246) @@ -3,7 +3,7 @@ # NANO_TOOLS=`pwd` NANO_PACKAGE_DIR=`pwd`/Pkg -NANO_RAM_TMPVARSIZE=20480 +NANO_RAM_TMPVARSIZE=40960 NANO_PMAKE="make -j 8" NANO_LABEL="rescue" NANO_RAM_TMPVARSIZE=40960 @@ -68,6 +68,7 @@ cust_etc_cfg () ( echo "#ifconfig_fxp0=\"AUTO\"" >> etc/rc.conf echo "#sshd_enable=\"YES\"" >> etc/rc.conf echo "/dev/ufs/${NANO_LABEL}s1a / ufs ro,noatime 0 0" > etc/fstab + echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab # echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab @@ -100,9 +101,9 @@ last_orders () ( touch conf/default/etc/.keepme touch conf/default/var/.keepme cd .. - mkisofs -quiet -r -J -no-emul-boot \ - -V ${NANO_LABEL} \ - -b boot/cdboot -o _.disk.iso _.w/ + makefs -t cd9660 -o rockridge \ + -o label="${NANO_LABEL}" -o publisher="RMX" \ + -o bootimage="i386;_.w/boot/cdboot" -o no-emul-boot _.disk.iso _.w/ ) ) Modified: head/tools/tools/nanobsd/rescue/merge.sh ============================================================================== --- head/tools/tools/nanobsd/rescue/merge.sh Fri Jul 4 07:02:11 2014 (r268245) +++ head/tools/tools/nanobsd/rescue/merge.sh Fri Jul 4 09:29:43 2014 (r268246) @@ -1,18 +1,28 @@ #!/bin/sh # $FreeBSD$ -D1="/usr/obj/nanobsd.rescue_i386" -D2="/usr/obj/nanobsd.rescue_amd64" +today=`date '+%Y%m%d'` -MD=`mdconfig -a -t vnode -f ${D1}/_.disk.full` +I32="/usr/obj/Rescue/rescue_${today}_x32.img" +I64="/usr/obj/Rescue/rescue_${today}_x64.img" +IAL="/usr/obj/Rescue/rescue_${today}_xal.img" +D64="/usr/obj/nanobsd.rescue_amd64" +MNT="/usr/obj/Rescue/_mnt" + +if [ \! -d "$MNT" ]; then + mkdir "$MNT" +fi -dd if=${D2}/_.disk.image of=/dev/${MD}s2 bs=128k +dd if=${I32} of=${IAL} bs=128k +MD=`mdconfig -a -t vnode -f ${IAL}` + +dd if=${D64}/_.disk.image of=/dev/${MD}s2 bs=128k tunefs -L rescues2a /dev/${MD}s2a -mount /dev/${MD}s2a ${D1}/_.mnt +mount /dev/${MD}s2a ${MNT} -sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/conf/base/etc/fstab -sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/etc/fstab +sed -i "" -e 's/rescues1/rescues2/' ${MNT}/conf/base/etc/fstab +sed -i "" -e 's/rescues1/rescues2/' ${MNT}/etc/fstab -umount ${D1}/_.mnt +umount ${MNT} mdconfig -d -u ${MD} Modified: head/tools/tools/nanobsd/rescue/rescue_amd64.conf ============================================================================== --- head/tools/tools/nanobsd/rescue/rescue_amd64.conf Fri Jul 4 07:02:11 2014 (r268245) +++ head/tools/tools/nanobsd/rescue/rescue_amd64.conf Fri Jul 4 09:29:43 2014 (r268246) @@ -1,7 +1,7 @@ # # $FreeBSD$ # -NANO_KERNEL=GENERIC +NANO_KERNEL=R64 NANO_ARCH=amd64 TARGET_ARCH=amd64; export TARGET_ARCH #TARGET_CPUTYPE=amd64; export TARGET_CPUTYPE Modified: head/tools/tools/nanobsd/rescue/rescue_i386.conf ============================================================================== --- head/tools/tools/nanobsd/rescue/rescue_i386.conf Fri Jul 4 07:02:11 2014 (r268245) +++ head/tools/tools/nanobsd/rescue/rescue_i386.conf Fri Jul 4 09:29:43 2014 (r268246) @@ -1,7 +1,7 @@ # # $FreeBSD$ # -NANO_KERNEL=GENERIC +NANO_KERNEL=R32 NANO_ARCH=i386 TARGET_ARCH=i386; export TARGET_ARCH #TARGET_CPUTYPE=i386; export TARGET_CPUTYPE