From owner-freebsd-stable@freebsd.org Fri Oct 21 18:25:31 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C6C2C1C8AA for ; Fri, 21 Oct 2016 18:25:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D992F97A for ; Fri, 21 Oct 2016 18:25:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id 4so253574269itv.0 for ; Fri, 21 Oct 2016 11:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=iX1hmYschdhoLWvHZJvMU44FtNKEWYbY9RYLqWeaF5U=; b=DD5LTMs1sAtlIrjcbk/DKOCjFn6xC6Qkt0aODNQGBn7xM2OIQiDi2WVlWJH7uEIyy+ n2zvaFVl9wKuNGIl/alY2n9Lbw30ebkJIESJ4mgtO+aQZZ2cVabCDj/XmR9hzODEhYKz LIjV6uWzI6nurUoO6OaOX7+OV690rhtDPJYjle908a/lbnXH3D93AcTUhySN3+6F9piH H0nmnO6pOClEEuRhnwv1w+xg98zzcx+tF/WynitIf8lK9mCQ7LODevm8+k2pd/ti73Nv IiIT2IWXgRweVyGvav19WU0GEewLYmYEStR4JBabdU3FiqcbgasSaZ0zsaF2MFg8gPIr c7HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=iX1hmYschdhoLWvHZJvMU44FtNKEWYbY9RYLqWeaF5U=; b=kbEBisCOrLDzVb2hp1DrVAVDpZJXsf+bI7NTe5jzw2bdT/UMOT5V/Mv/NCDBqbYPsm W0PC2655IQvuA5pRiAWfI+YKsaDIafR+iIWq4yXRcLb3EWuMe7ASRnBMcM8psF7eOSvt 8BC+490/VDK1cwaD8N315FpF/iegEqMQ9yTou5JsK0+TjYSdttpXFGc9uUJC7ZaDpC73 z+f1Sf5YJIyuzWqkEHeTbcgVOoPWngakZlXxS/4aUKUroLzv7g9eEemiETr7DPvtb9eT t14rIyt8ojiH9t3mvPuVzJqRv2/b06MD1vwcyrW9EtYdHamZvCzFIiETdNjaiiD7ecMP epBA== X-Gm-Message-State: ABUngvd8wDvj1LaenobneIkNWyM8miVi1HoGaRI2wpne+EWgWXEwLCEf5seO6kW2g7pddIAM5exqUnQe93iA4A== X-Received: by 10.36.53.214 with SMTP id k205mr2301797ita.85.1477074329910; Fri, 21 Oct 2016 11:25:29 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.77.85 with HTTP; Fri, 21 Oct 2016 11:25:29 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <54B556F6-B834-4B0C-A9A4-90B9AD80A668@punkt.de> References: <14FD5FE6-6277-4EBE-8EE9-630A735F8BEA@punkt.de> <54B556F6-B834-4B0C-A9A4-90B9AD80A668@punkt.de> From: Warner Losh Date: Fri, 21 Oct 2016 12:25:29 -0600 X-Google-Sender-Auth: _TL265P6lN81FmQIgGldK_liNG8 Message-ID: Subject: Re: boot0cfg on does not set default selection on gmirror device To: "Patrick M. Hausen" Cc: freebsd-stable Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2016 18:25:31 -0000 On Fri, Oct 21, 2016 at 11:57 AM, Patrick M. Hausen wrote: > Hi, all, > >> Am 21.10.2016 um 16:41 schrieb Warner Losh : >> Any chance you can migrate to using gpart? Is boot0cfg still >> referenced in NanoBSD somewhere? > > Not in NanoBSD but how would you configure boot0's default > slice with gpart? It doesn't pay attention to the "active" flag. > See Miroslav's mails for all the details. > > gpart would only be an option if we did not use the FreeBSD > boot manager. Ah! OK, I thought this was the active flag issue, not the default in boot0 issue. > But we need the "F1 ..., F2 ..." prompt, because > being able to roll back to the last known-good system via the > console is the entire point of using this NanoBSD setup. > There's a presentation on the EuroBSDCon 2010 page about > motivation and setup. Wonder who did that talk ... :-))) I think I sat in the talk :) > BTW: thanks, Miroslav. As for your question: it does work on > the only two systems that use hardware RAID, yet have a > gmirror built of only a single component to get consistent > device names accross all servers. > > I'm not quite sure if it works from time to time, I've come to > accept the "kern.geom.debugflags" dance. > > I had opened a similar discussion years ago for 7.x/8.x and > I was told that geom was to provide an API for fdisk, boot0cfg > and friends to manipulate the MBR. Because back in the days > boot0cfg and fdisk both threw an error message when trying > to work on a whole-disk mirror. It certainly looks like this code has that conversion in it. Looks like it's been there quite a while. I'd have expected it to "JUST WORK" [tm]. > I thought that was long solved - at least no error, anymore. > But it's still not working in 10.x. Can you give us the strace output? It looks like it is reading the current blocks, setting the options, and then writing it back to the device. If the write back fails, it opens the device with geom and sends either the bootcode verb to geom (for the PART (aka gpart)) case or the data for the MBR case. strace should show that clearly. There's nothing in dmesg, right? Try this again but set geom.debug_flags to 128 instead of 16. This will give a verbose error in dmesg if there's any errors from the control message. Warner