From owner-freebsd-fs@FreeBSD.ORG Wed Jan 19 18:00:22 2011 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCB51065695 for ; Wed, 19 Jan 2011 18:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A1A698FC12 for ; Wed, 19 Jan 2011 18:00:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0JI0M8W045896 for ; Wed, 19 Jan 2011 18:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0JI0M4L045894; Wed, 19 Jan 2011 18:00:22 GMT (envelope-from gnats) Date: Wed, 19 Jan 2011 18:00:22 GMT Message-Id: <201101191800.p0JI0M4L045894@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: kern/153996: [zfs] zfs root mount error while kernel is not located in /boot/kernel X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2011 18:00:22 -0000 The following reply was made to PR kern/153996; it has been noted by GNATS. From: Garrett Cooper To: Alexander Naumochkin Cc: bug-followup Subject: Re: kern/153996: [zfs] zfs root mount error while kernel is not located in /boot/kernel Date: Wed, 19 Jan 2011 09:54:45 -0800 On Wed, Jan 19, 2011 at 9:17 AM, Alexander Naumochkin wrote: > Wow! It starts! I've just typed boot GENERIC, and it starts and works! > Thank you very much Garrett! > > This will continue forever in next releases? I think it should be > documented in Handbook. How can I participate? If I can ever :) > > On Wed, Jan 19, 2011 at 12:20 PM, Garrett Cooper wr= ote: >> >> On Tue, Jan 18, 2011 at 8:37 AM, Alexander Naumochkin >> wrote: >> > Garrett, >> > now I have two kernels on my box: >> > 1. /boot/kernel/kernel =97 my working customized kernel >> > 2. /boot/GENERIC/kernel =97 GENERIC kernel >> > I tried the following expreriment: >> > # shutdown -r now >> > wait for loader menu and choose 6 - Escape to loader prompt >> > OK unload kernel >> > OK set kernelname=3D/boot/GENERIC/kernel >> > OK set module_path=3D/boot/GENERIC >> > OK load opensolaris >> > OK load zfs >> > OK boot >> > and got the same result: "MOUNT ROOT ERROR" while "Trying to mount roo= t from >> > zfs:zroot" >> > BTW, even if your method would work, it could not help in case of inst= all >> > misconfigured unbootable kernel. Let's say I install misconfigured ker= nel: >> > # make installkernel KERNCONF=3DBADKRNL >> > After this I get: >> > 1. bad kernel in /boot/kernel/kernel >> > 2. previous working kernel in /boot/kernel.old/kernel >> > 3. GENERIC kernel in /boot/GENERIC/kernel >> > I reboot and faced with unbootable system (because of BADKRNL as defau= lt). >> > In fact we have now completely unbootable system due the bug I've repo= rted >> > with this PR. Also this bug means that from now on we have no possibil= ity to >> > test custom kernels by installing it to alternate directory (with KODI= R >> > variable) =97 it will not boot anyway. >> >> Try set kernelname=3DGENERIC , etc. Or... just load the kernel modules >> and do: boot GENERIC, etc on the loader command line. It's been this way for ages with loader(8), so I doubt it's going to change too dramatically anytime soon :). That being said, the handbook [1] might need to be updated a bit with a working process (or unload needs to be properly fixed to unload everything if it's broken -- not sure). I'll have to see what happens when I issue those commands sometime on the command line. Regardless though -- if the process doesn't work as-is you should submit a doc update for the handbook so that a working process is available for end-users :). Cheers! -Garrett 1. http://www.freebsd.org/doc/handbook/boot-blocks.html