From owner-freebsd-fs@FreeBSD.ORG Tue Jan 18 17:10:09 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 54D82106564A for ; Tue, 18 Jan 2011 17:10:09 +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 393BC8FC13 for ; Tue, 18 Jan 2011 17:10:09 +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 p0IHA9Zm018606 for ; Tue, 18 Jan 2011 17:10:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0IHA9PL018605; Tue, 18 Jan 2011 17:10:09 GMT (envelope-from gnats) Date: Tue, 18 Jan 2011 17:10:09 GMT Message-Id: <201101181710.p0IHA9PL018605@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Alexander Naumochkin 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: Alexander Naumochkin List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2011 17:10:09 -0000 The following reply was made to PR kern/153996; it has been noted by GNATS. From: Alexander Naumochkin To: Garrett Cooper Cc: bug-followup@freebsd.org Subject: Re: kern/153996: [zfs] zfs root mount error while kernel is not located in /boot/kernel Date: Tue, 18 Jan 2011 19:37:11 +0300 --0016362851685385ff049a2184a1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Garrett, now I have two kernels on my box: 1. /boot/kernel/kernel =E2=80=94 my working customized kernel 2. /boot/GENERIC/kernel =E2=80=94 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 root fro= m zfs:zroot" BTW, even if your method would work, it could not help in case of install misconfigured unbootable kernel. Let's say I install misconfigured kernel: # 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 default). In fact we have now completely unbootable system due the bug I've reported with this PR. Also this bug means that from now on we have no possibility t= o test custom kernels by installing it to alternate directory (with KODIR variable) =E2=80=94 it will not boot anyway. Regards, /Alexander On Tue, Jan 18, 2011 at 3:56 AM, Garrett Cooper wrote= : > Alexander, > Have you tried setting kernelname to GCAM in your loader.conf > before booting (it's not documented in loader.conf but it's a part of > boot)? > Another item I use to switch between kernels is symlink the suckers: > > $ ls -l /boot/kernel > lrwxr-xr-x 1 root wheel 17 Jan 13 17:35 /boot/kernel -> > BAYONETTA.r217362 > > This works well. > HTH, > -Garrett > --=20 /ash --0016362851685385ff049a2184a1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Garrett,

now I have two kernels on my box:
1. = /boot/kernel/kernel =E2=80=94 my working customized kernel
2. /bo= ot/GENERIC/kernel =E2=80=94 GENERIC kernel

I tried= the following expreriment:

# shutdown -r now

wait for loa= der 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 res= ult: "MOUNT ROOT ERROR" while "Trying to mount root from zfs= :zroot"

BTW, even if your method would work, it could not help = in case of install misconfigured unbootable kernel. Let's say I install= misconfigured kernel:

# make installkernel KERNCO= NF=3DBADKRNL

After this I get:

1. bad kerne= l in /boot/kernel/kernel
2. previous working kernel in /boot/kern= el.old/kernel
3. GENERIC kernel in /boot/GENERIC/kernel

I reboot and faced with unbootable system (because of B= ADKRNL as default). In fact we have now completely unbootable system due th= e bug I've reported with this PR. Also this bug means that from now on = we have no possibility to test custom kernels by installing it to alternate= directory (with KODIR variable) =E2=80=94 it will not boot anyway.

Regards,
/Alexander

On Tue, Jan 18, 2011 at 3:56 AM, Garrett Cooper <gcooper@freebsd.org> wrote:
Alexander,
=C2=A0 =C2=A0Have you tried setting kernelname to GCAM in your loader.conf=
before booting (it's not documented in loader.conf but it's a part = of
boot)?
=C2=A0 =C2=A0Another item I use to switch between kernels is symlink the s= uckers:

$ ls -l /boot/kernel
lrwxr-xr-x =C2=A01 root =C2=A0wheel =C2=A017 Jan 13 17:35 /boot/kernel ->= ; BAYONETTA.r217362

=C2=A0 =C2=A0This works well.
HTH,
-Garrett



--
/ash
--0016362851685385ff049a2184a1--