From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 11:15:47 2012 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 6DD9F106566C for ; Thu, 16 Aug 2012 11:15:47 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id DC60F8FC16 for ; Thu, 16 Aug 2012 11:15:46 +0000 (UTC) Received: by lbbgk8 with SMTP id gk8so1690963lbb.13 for ; Thu, 16 Aug 2012 04:15:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=nPGmRbpfJx0n9ASZwblPfE+EtWv8HlNYSlXLn3Ck7Gw=; b=ZJY7x89H0cyuISpAm4lLh91y3nyF/vheM8BN9LUq4AYlT0KDNOkxdbUW7x5MRPddWE t8TWFhvntePDkl7AVGhGVNhBCqp1s2FbGwobtiiToAsdV2pklp5j9gFB1Lc6avMEGul5 aRYrAyia37TD6flCHFDR1mYRrShMm9pv4+VZqgW5vabL6prxOmJ/w1weyLoc66bp/c6z ak/3+8HjyYCrX1VESbKTfZPxKuG4nrvYyhV7rwAFPwkF1Z+ESctYkvw8CtKZpXkzikXl FEfs6+DgAlrr2qUGd7iUShZemnwFrKigc9fl+z8vra8vKyS/N5br8AbN1jhPQUu2LgMx Gg0w== Received: by 10.152.46.49 with SMTP id s17mr901856lam.17.1345115745176; Thu, 16 Aug 2012 04:15:45 -0700 (PDT) Received: from dhcp170-234-red.yandex.net (dhcp170-234-red.yandex.net. [95.108.170.234]) by mx.google.com with ESMTPS id n7sm976888lbk.10.2012.08.16.04.15.44 (version=SSLv3 cipher=OTHER); Thu, 16 Aug 2012 04:15:44 -0700 (PDT) Message-ID: <502CD65E.4010900@zonov.org> Date: Thu, 16 Aug 2012 15:15:42 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Daniel Braniss References: <201208151116.21461.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnmQdnhT9Sbbh1Sns3/4q/UHH8uNbyMYURBEsnprSdZ6dKyGDZ5PbZmGdErYXDazVKpcWtt 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 11:15:47 -0000 On 8/16/12 11:06 AM, Daniel Braniss wrote: >> 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. > You can erase boot record of the first disk, then your BIOS will try to use second one. Be careful, some BIOS'es try only first disk. -- Andrey Zonov