Date: Fri, 21 Oct 2016 12:25:29 -0600 From: Warner Losh <imp@bsdimp.com> To: "Patrick M. Hausen" <hausen@punkt.de> Cc: freebsd-stable <freebsd-stable@freebsd.org> Subject: Re: boot0cfg on does not set default selection on gmirror device Message-ID: <CANCZdfoopmRH-i1pdZUHftx7TLLtXRcDNpYPucifmYUNGHdc4g@mail.gmail.com> In-Reply-To: <54B556F6-B834-4B0C-A9A4-90B9AD80A668@punkt.de> References: <14FD5FE6-6277-4EBE-8EE9-630A735F8BEA@punkt.de> <CANCZdfpMGYeMk6FsXFRmN3nGsO6epUx-SPysTUSXKNd1VhuvEQ@mail.gmail.com> <54B556F6-B834-4B0C-A9A4-90B9AD80A668@punkt.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 21, 2016 at 11:57 AM, Patrick M. Hausen <hausen@punkt.de> wrote: > Hi, all, > >> Am 21.10.2016 um 16:41 schrieb Warner Losh <imp@bsdimp.com>: >> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoopmRH-i1pdZUHftx7TLLtXRcDNpYPucifmYUNGHdc4g>