From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 07:06:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7600106566B; Thu, 16 Aug 2012 07:06:49 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 6B62E8FC0C; Thu, 16 Aug 2012 07:06:49 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1T1uAI-0008mU-OK; Thu, 16 Aug 2012 10:06:47 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 To: John Baldwin In-reply-to: <201208151116.21461.jhb@freebsd.org> References: <201208151116.21461.jhb@freebsd.org> Comments: In-reply-to John Baldwin message dated "Wed, 15 Aug 2012 11:16:21 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 16 Aug 2012 10:06:46 +0300 From: Daniel Braniss Message-ID: Cc: Garrett Cooper , freebsd-hackers@freebsd.org Subject: Re: GPT boot from 2nd. disk fails 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, 16 Aug 2012 07:06:49 -0000 > On Wednesday, August 15, 2012 4:46:28 am Garrett Cooper wrote: > > On Wed, Aug 15, 2012 at 1:27 AM, Daniel Braniss wrote: > > > hi, > > > this host has to disks: > > > sa0> gpart show > > > => 34 976773101 ada0 GPT (465G) > > > 34 128 1 freebsd-boot (64k) > > > 162 4194304 2 freebsd-ufs (2.0G) > > > 4194466 33554432 3 freebsd-swap (16G) > > > 37748898 939024237 4 freebsd-zfs (447G) > > > > > > => 34 976773101 ada1 GPT (465G) > > > 34 128 1 freebsd-boot (64k) > > > 162 4194304 2 freebsd-ufs [bootme] (2.0G) > > > 4194466 8388608 3 freebsd-swap (4.0G) > > > 12583074 964190061 4 freebsd-zfs (459G) > > > > > > but no amount of magic will cause boot from the second disk, it will > always > > > boot from the first disk. > > > > > > any insights? > > > > Use boot0cfg -s 5 (untested with GPT disks)? > > Will not work with GPT disks. They use /boot/pmbr to boot, not /boot/boot0. > > If you can get your BIOS to explicitly boot ada1 from the start via a BIOS > setting, that should work. Another option would be to break into gptboot's > prompt (similar to breaking into boot2) aud typing in 'ad1p2:/boot/loader' or > some such. If that works you should even be able to write that to > /boot.config on ada0p2's filesystem. sorry, as usual my questions are a bit terse :-), I want to switch between roots either at boot time (this is very tricky now, since breaking into boot2 needs very fast fingers) or before reboot. btw, it's 1:ad(0p2)/boot/loader also, since the disks are hot swap, i can switch between them, but I realy want to do it via software! the bootme trick did work, on a different host/setup and sometime ago. before GPT, when we had MBR, I could switch between slices/partitions either via the menu or via boot0cfg, so maybe I should go back to mbr. Cheers, danny