From owner-freebsd-geom@FreeBSD.ORG Sat Jul 28 04:54:30 2007 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9387216A468 for ; Sat, 28 Jul 2007 04:54:30 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 32CF513C459 for ; Sat, 28 Jul 2007 04:54:29 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so888048uge for ; Fri, 27 Jul 2007 21:54:29 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=JCiNZVi4Xw1tMkxdC8ZgPX/875HUmdfA/bQH2gE35A54Fstiz/OWbIGcAjlhbPrgAmtkmd+mFUiNNpy3Em+LU6SkbyDS20QpPoqVwoiEvoMtaKJ4hzErUzQrQPgTWJ4+eFh09V/nmKHv7a3OAXvBvzSeeC1OMQPeJyIaEXRdp/Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=r8BF8cyLxVG8YMf6U9AZolad7xdM9LNiFC5lKgYmLJX1sHTYc0OUt7bb4qgAnoPM5Gm2S+x7ztk3RntwUohcCHQkiKy0XDJmNQwr9lkO8p8opocRMJlYgY20S1PEfNg7zotdl2nX+Efh//0z7OKOb58fuWaaWrmvRuUH4KRHc34= Received: by 10.78.186.9 with SMTP id j9mr926681huf.1185596804868; Fri, 27 Jul 2007 21:26:44 -0700 (PDT) Received: by 10.78.25.16 with HTTP; Fri, 27 Jul 2007 21:26:44 -0700 (PDT) Message-ID: <520894aa0707272126g42b88d41q95477f2d1dd3689b@mail.gmail.com> Date: Sat, 28 Jul 2007 01:26:44 -0300 From: "Fernan Aguero" To: freebsd-geom@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: boot from second disk (gmirror device) ... problems X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2007 04:54:30 -0000 Hi I'm using geom mirror on several FreeBSD boxes. It's been some time since I've set these up, but I remember being bitten by this problem several times: the problem? booting from the second disk after setting it as the first member of a geom mirror pair. I've always followed more or less Ralf's guide http://people.freebsd.org/~rse/mirror/ (I say more or less because I usually mirror the second slice of my disks) But I always end up getting trouble booting from the second disk. (need to have to have physical access to the box). In the previous incantation of Ralf's guide, he suggested booting from the second disk like this: echo "1:ad(1,a)/boot/loader" >/boot.config Now, he replaced this in the new version of the guide by this: echo $d2 | sed -e 's;^\([^0-9]*\)\([0-9][0-9]*\)$;1:\1(\2,a)/boot/loader;' \ >/boot.config where $d2 is the second disk (ad2 in my case), and this is the resulting /boot.config: 1:ad(2,a)/boot/loader After setting up /etc/fstab and /boot/loader.conf in my /dev/mirror/gm0a partition rebooting brings me to the boot loader prompt because: 1:ad(2,a)/boot/loader is not a valid label or /boot/loader does not exist I've tried several combinations, blindly trying to spot the correct one: 1:ad(1,a)/boot/loader 1:ad(0,a)/boot/loader To no avail. However, 0:ad(0,a) or 0:ad(1,a) allowed me to boot from my ad0 (first) disk (i.e. not the gmirror device) What's the right incantation to boot from the second disk? I've already read boot(8) many times, and can't seem to figure out why 1:ad(1,a) doesn't work bios_drive: 1 (second drive) interface: ad unit: 1 (second drive) slice: a Thanks in advance for any tip or suggestion, Fernan PS: my disks are ad0 (at ata0-master) and ad2 (at ata1-master). ad2s1 (single slice) is the first member of the gm0 gmirror gm0a is the partition containing the bootable (active) partition -- fernan