From owner-freebsd-bugs@freebsd.org Tue Apr 12 14:04:39 2016 Return-Path: Delivered-To: freebsd-bugs@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 E7B6FB0C43B for ; Tue, 12 Apr 2016 14:04:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE21A1DE4 for ; Tue, 12 Apr 2016 14:04:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3CE4dd2093198 for ; Tue, 12 Apr 2016 14:04:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 208742] /boot/gptzfsboot boots kernel from another zpool (not root pool) Date: Tue, 12 Apr 2016 14:04:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markus@freebsduser.eu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 14:04:40 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208742 Bug ID: 208742 Summary: /boot/gptzfsboot boots kernel from another zpool (not root pool) Product: Base System Version: 10.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: markus@freebsduser.eu CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org Hi FreeBSD developer, on my server the following GPT configuration exists: $ gpart show -l ada2 =3D> 34 234441581 ada2 GPT (112G) 34 6 - free - (3.0K) 40 1024 1 gptboot0 (512K) 1064 984 - free - (492K) 2048 16777216 2 backup0 (8.0G) <=3D Type ZFS 16779264 217661440 3 operatingsystem0 (104G) <=3D Type ZFS 234440704 911 - free - (456K) [mg16373@trinitron ~]$ gpart show -l ada3 =3D> 34 234441581 ada3 GPT (112G) 34 6 - free - (3.0K) 40 1024 1 gptboot1 (512K) 1064 984 - free - (492K) 2048 16777216 2 backup1 (8.0G) <=3D Type ZFS 16779264 217661440 3 operatingsystem1 (104G) <=3D Type ZFS 234440704 911 - free - (456K) The "partition" with ID 3 contains the preferred boot pool named "zroot" and was mirrored fine. The partition ID 2 has an zpool with the name "zbackup".= On this "zbackup"-Pool a directory "/boot" exists and contains a backup of my previous "zroot/boot" directory. Today I have upgraded the server from FreeBSD 10.2-RELEASE P#14 to 10.3-REL= EASE but the server starts everytime with my custom kernel "10.2-RELEASE P#14". = The root-filesystem was seems to be used from partition ID 3. In this case the "pf.ko" (based on 10.3) module was not loaded because the message ~"kernel version mismatch" was displayed. After some investigations I have copied all files from "zroot/boot" to "zbackup/boot" (previously unmounted and the pool was not imported by ZFS) = and I have restarted the server. WOW! The system boots into kernel 10.3-RELEASE. Now I have destroyed the ZFS pool "zbackup" and zeroing the partition ID 3.= Now the server boots the wanted "zroot/boot" filesystem with the right kernel. I believe that "gptzfsboot" is using the first available ZFS pool that cont= ains a valid "/boot" filesystem or directory. Best regards, Markus Grundmann Germany Sorry for my bad english ;-) --=20 You are receiving this mail because: You are the assignee for the bug.=