From owner-freebsd-current@FreeBSD.ORG Sun Jan 26 14:07:25 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 206B3EC5; Sun, 26 Jan 2014 14:07:25 +0000 (UTC) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [IPv6:2607:f8b0:400c:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B8B0B19C7; Sun, 26 Jan 2014 14:07:24 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id jz11so2920531veb.22 for ; Sun, 26 Jan 2014 06:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OPbznyZdKiMY5ExGW9SlBpQtJSu5iQST/qBmSjwrHh8=; b=qsNFg9l+qqcWeqif2anoa4A/Z6lVdCEUMehwTmGVPCFaqQfnR4VuzSufuRDJPB2A+k lB+25yDl+v6CTJog4tAdbEe985UDoOI7oT7188YUdXwWFnue2CVDwuZ+m7/WcAmvr6uK +BVrkQMoThCNFxwHqRgRPKbsYOazR7rEpaKaUqM6WcljoSEFUmqUfUjCtW9jKJxZtTxH LgC4gqrEYx+8KtLQE+GeEpsznY4E7hpC7wQQzKbtlI/akF4k+W9rDLYNa8O1obld9BxR kAoOeLqZMEp6xV04M0uPCRSTVGicadycj2BSjymo8lH1yuWCLP4LzZ5SgqFOps9NgfD7 UqfQ== MIME-Version: 1.0 X-Received: by 10.58.200.168 with SMTP id jt8mr45521vec.30.1390745243738; Sun, 26 Jan 2014 06:07:23 -0800 (PST) Received: by 10.220.168.135 with HTTP; Sun, 26 Jan 2014 06:07:23 -0800 (PST) In-Reply-To: References: <52DE3F6B.6050209@yandex.ru> <52DE4FD0.5030409@FreeBSD.org> <52DE5781.7090600@yandex.ru> <52DE9699.5040801@FreeBSD.org> Date: Sun, 26 Jan 2014 09:07:23 -0500 Message-ID: Subject: Re: Problem updating bootcode on ZFS on root system with MBR From: Thomas Hoffmann To: freebsd-current Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: Scot Hetzel , Andriy Gapon , "Andrey V. Elsukov" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jan 2014 14:07:25 -0000 On Sun, Jan 26, 2014 at 3:46 AM, Scot Hetzel wrote: > On Tue, Jan 21, 2014 at 3:11 PM, Thomas Hoffmann wrote: > > On Tue, Jan 21, 2014 at 10:47 AM, Andriy Gapon wrote: > > > >> on 21/01/2014 13:18 Andrey V. Elsukov said the following: > >> > On 21.01.2014 14:45, Andriy Gapon wrote: > >> >>>> What do I need to do to get the boot2 code written to /dev/ada0s1a? > >> >>> > > >> >>>> # dd if=/boot/zfsboot of=/dev/ada0s1a skip=1 seek=1024 > >> >>>> dd: /dev/ada0s1a: Operation not permitted > > > Thanks for the responses. My apologies for going silent, but I had to > step > > away from the problem for a bit. I was able to resolve my problem by > doing > > the following: > > > > After upgrading my zpools and after my aborted attempt to update the > > bootcode as reported above, I copied /boot/zfsboot (or more precisely > > /bootpool/boot/zfsboot) to a USB thumb drive. I attempted to reboot my > > system, which failed due to unsupported zfs features. This was expected, > > but I thought, hey, I might get lucky. I then booted into a Live CD, > > mounted my USB thumb drive on /tmp/usb and executed: > > > > sysctl kern.geom.debugflags=0x10 > > dd if=/tmp/usb/zfsboot of=/dev/ada0s1 count=1 > > dd if=/tmp/usb/zfsboot of=/dev/ada0s1d skip=1 seek=1024 > > > > Then I rebooted and all is well. All zpools support all features. While > > this procedure was not tedious, it would still be nice if, as Andriy > > stated, FreeBSD contained a native way do this zfs bootcode update for > MBR > > schemes that is as simple as for the GPT schemes. > > > In your original message, you were trying to write the boot code to > ada0s1a, but you made it work by using ada0s1d. > > Do you have an ada0s1a? If you do, is it your ZFS partition or is it > ada0s1d? > I can see why you are confused. In between the original problem and the solution I did a fresh install of FreeBSD-10.0-REL, which creates a bootpool on ada0s1a, swap on ada0s1b and the zfs partition on ada0s1d. So that is why the discrepancy between the original problem and solution. The original system had the zfs partition on ada0s1a and swap on ada0s1b. In retrospect I should have been more clear on this in my postings. BTW, I got the [definitive] update process for zfs bootcode on MBR partitioned systems from you a while back. So thanks for that. I actually understand what I'm doing now when I update the zfs bootcode. -Tom > > -- > DISCLAIMER: > > No electrons were maimed while sending this message. Only slightly bruised. >