From owner-svn-src-all@FreeBSD.ORG Thu Aug 14 16:17:23 2014 Return-Path: Delivered-To: svn-src-all@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 9CFC5E00; Thu, 14 Aug 2014 16:17:23 +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 89B2C2B4E; Thu, 14 Aug 2014 16:17:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EGHN6g072716; Thu, 14 Aug 2014 16:17:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EGHNMc072715; Thu, 14 Aug 2014 16:17:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408141617.s7EGHNMc072715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 16:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269983 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:17:23 -0000 Author: imp Date: Thu Aug 14 16:17:23 2014 New Revision: 269983 URL: http://svnweb.freebsd.org/changeset/base/269983 Log: Only install the boot loader if it actually exists. This is a stop-gap change, since larger changes to use geom more exclusively to create partitions is in th works. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Aug 14 16:01:51 2014 (r269982) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Aug 14 16:17:23 2014 (r269983) @@ -581,8 +581,14 @@ create_i386_diskimage ( ) ( fdisk ${MD} # XXX: params # XXX: pick up cached boot* files, they may not be in image anymore. - boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} - bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then + boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} + fi + if [ -f ${NANO_WORLDDIR}/boot/boot ]; then + bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + else + bsdlabel -w ${MD}s1 + fi bsdlabel ${MD}s1 # Create first image