From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 13:57:25 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BAC0106566B for ; Thu, 11 Feb 2010 13:57:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1348FC12 for ; Thu, 11 Feb 2010 13:57:25 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CE68A46B2C; Thu, 11 Feb 2010 08:57:24 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 572F58A024; Thu, 11 Feb 2010 08:57:23 -0500 (EST) From: John Baldwin To: Julian Elischer Date: Thu, 11 Feb 2010 08:34:05 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> <201002100838.11381.jhb@freebsd.org> <4B73AC28.2000402@elischer.org> In-Reply-To: <4B73AC28.2000402@elischer.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002110834.05651.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 11 Feb 2010 08:57:23 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Peter Steele Subject: Re: How can I force boot from alternate drive with boot.config? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 13:57:25 -0000 On Thursday 11 February 2010 2:05:12 am Julian Elischer wrote: > John Baldwin wrote: > > > I think the unit number is largely ignored now. The kernel used to believe it > > for finding /, but the loader now reads /etc/fstab and sets a variable in kenv > > to tell the kernel where to find /. > > One of the most annoying "improvements" for the decade from my > perspective.. You can't communicate anything non-trivial like using a gmirror or software-RAID for / otherwise. The boothowto structure is very limited in the root device hinting it can provide. > because if / is not going to be where the loader thinks / is (because > that is a different F with a different /etc/fstab) then you need to > do lots of fancy footwork to undo the damage. Generally the fix for that is to boot to the right partition in the first place so that the loader reads the right /etc/fstab. You are already using the wrong kernel and modules if you are reading the wrong /etc/fstab. > Oh and it's not terribly well documented how to get around it. > (that I've found) Just set vfs.mountroot.from to the device you want to use for / in loader.conf. The loader doesn't set the variable if it is already set. -- John Baldwin