Bug 206659 - r294822: bad gptzfsboot?
Summary: r294822: bad gptzfsboot?
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-27 03:00 UTC by Larry Rosenman
Modified: 2016-01-29 01:30 UTC (History)
4 users (show)

See Also:


Attachments
my script to update the boot blocks (120 bytes, application/x-shellscript)
2016-01-27 03:00 UTC, Larry Rosenman
no flags Details
GOOD gptzfsboot from the snapshot (41.14 KB, application/octet-stream)
2016-01-27 03:01 UTC, Larry Rosenman
no flags Details
BAD gptzfsboot from buildworld (41.14 KB, application/octet-stream)
2016-01-27 03:01 UTC, Larry Rosenman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenman freebsd_committer 2016-01-27 03:00:32 UTC
Created attachment 166168 [details]
my script to update the boot blocks

I updated to r294822 today, and did my usual make -DNO_CLEAN -j 20 buildworld buildkernel, and when done, make installworld installkernel && etcupdate && ~ler/bin/update_boot.sh (which I'll attach). 

When I rebooted, I came home to find it at an OK prompt, because it couldn't find /boot/kernel. 

Rebooting, it didn't use the ZFS enabled loader. 

I got the current memstick image snapshot from 1/21/2016, and replaced the gptzfsboot with that one, and we boot fine. 

Ideas?
Comment 1 Larry Rosenman freebsd_committer 2016-01-27 03:01:04 UTC
Created attachment 166169 [details]
GOOD gptzfsboot from the snapshot
Comment 2 Larry Rosenman freebsd_committer 2016-01-27 03:01:34 UTC
Created attachment 166170 [details]
BAD gptzfsboot from buildworld
Comment 3 Larry Rosenman freebsd_committer 2016-01-27 03:04:56 UTC
previous build was r294058
Comment 4 Niclas Zeising freebsd_committer 2016-01-27 14:56:45 UTC
I can confirm.  Latest snapshot, r294499 works fine, however, r294908 does not.  I haven't had time to minimize the window further yet.

The loader can't find the kernel.
Comment 5 Niclas Zeising freebsd_committer 2016-01-27 15:15:10 UTC
I did a quick bisect of the change, r294750 still works, however r294770 is broken.  imp@ did a series of commits, r294765 - r294769 that's most likely the culprit, although I haven't tried to narrow down exactly which commit.

I
Comment 6 Niclas Zeising freebsd_committer 2016-01-27 15:16:09 UTC
(In reply to Niclas Zeising from comment #5)


That's what I get for pressing save too soon...
I added imp@ to the CC list of this PR, hopefully he'll see this.
Comment 7 Steven Hartland freebsd_committer 2016-01-27 15:30:33 UTC
It would be really useful if you could narrow down which of these causes the issue.
Comment 8 Allan Jude freebsd_committer 2016-01-27 15:36:18 UTC
The problem appears to be that in r294765 a common paths.h was introduced, and it accidentally set the loader to be used to /boot/loader instead of /boot/zfsloader

It is being fixed now.
Comment 9 Niclas Zeising freebsd_committer 2016-01-27 15:38:08 UTC
Sounds good.  I didn't have time to narrow it further, I'm afraid.  I will continue with the bisection later unless the issue is already fixed.
Comment 10 Warner Losh freebsd_committer 2016-01-27 16:30:49 UTC
Just about to push a fix.
Comment 11 commit-hook freebsd_committer 2016-01-27 16:36:22 UTC
A commit references this bug:

Author: imp
Date: Wed Jan 27 16:36:19 UTC 2016
New revision: 294925
URL: https://svnweb.freebsd.org/changeset/base/294925

Log:
  Fix mistake when transitioning to the new defines with ZFS loader. I
  hate adding yet another define, but it is the lessor of the evil
  choices available. Kill another evil by removing PATH_BOOT3 and
  replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.

  PR: 206659

Changes:
  head/sys/boot/common/paths.h
  head/sys/boot/i386/boot2/boot2.c
  head/sys/boot/i386/gptboot/gptboot.c
  head/sys/boot/i386/zfsboot/zfsboot.c
  head/sys/boot/mips/beri/boot2/boot2.c
  head/sys/boot/pc98/boot2/boot2.c
Comment 12 Larry Rosenman freebsd_committer 2016-01-27 19:53:30 UTC
confirmed good at r294926