[Bug 208742] /boot/gptzfsboot boots kernel from another zpool (not root pool)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Apr 12 14:04:40 UTC 2016


            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 at FreeBSD.org
          Reporter: markus at freebsduser.eu
                CC: freebsd-amd64 at FreeBSD.org
                CC: freebsd-amd64 at FreeBSD.org

Hi FreeBSD developer,

on my server the following GPT configuration exists:

$ gpart show -l ada2
=>       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) <= Type ZFS
   16779264  217661440     3  operatingsystem0  (104G) <= Type ZFS
  234440704        911        - free -  (456K)

[mg16373 at trinitron ~]$ gpart show -l ada3
=>       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) <= Type ZFS
   16779264  217661440     3  operatingsystem1  (104G) <= 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-RELEASE
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 contains
a valid "/boot" filesystem or directory.

Best regards,
Markus Grundmann

Sorry for my bad english ;-)

You are receiving this mail because:
You are on the CC list for the bug.

More information about the freebsd-amd64 mailing list