"can't load 'kernel'" on ZFS root

Andriy Gapon avg at FreeBSD.org
Wed Sep 7 09:17:11 UTC 2011


on 07/09/2011 07:48 Peter Jeremy said the following:
> Firstly, does anyone have any ideas on how to move forward?  I will
> rebuild both zroots at some point but that's not a fix.  (I am
> reasonably confident I can reproduce the problem if someone has
> a patch to test).

No patches, but you may want to try to further debug this problem using an
approach described here:
http://article.gmane.org/gmane.os.freebsd.current/135086

> Secondly, I found that ZFS booting is extremely fragile - if your
> default kernel & modules won't load automatically, there's no way to
> boot the backup kernel because (as far as I can find) there's no way
> to manually load /boot/zfs/zpool.cache - without which the kernel
> can't mount the root FS.  In both above cases, recovering the system
> required booting from recovery media.  There needs to be a documented
> method for booting from a snapshot or clone.

AFAIK, FreeBSD doesn't support booting from ZFS snapshots (I wonder if any OS
supports that).
Additionally, FreeBSD currently doesn't provide an interactive way to choose
from which fs to boot the kernel.  I have a patch that provides that capability,
but haven't found time yet to replace some hacks that I used with the proper code:
http://people.freebsd.org/~avg/zfsboot.diff

But the above is more of an advertising.
Your main premise is incorrect.  It is very well possible and trivial to boot a
different kernel (on the same fs).
See this PR for more details:
http://www.freebsd.org/cgi/query-pr.cgi?pr=153804

-- 
Andriy Gapon


More information about the freebsd-fs mailing list