kern/153996: [zfs] zfs root mount error while kernel is not
located in /boot/kernel
Garrett Cooper
gcooper at FreeBSD.org
Wed Jan 19 18:00:22 UTC 2011
The following reply was made to PR kern/153996; it has been noted by GNATS.
From: Garrett Cooper <gcooper at FreeBSD.org>
To: Alexander Naumochkin <alexander.naumochkin at gmail.com>
Cc: bug-followup <bug-followup at freebsd.org>
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
<alexander.naumochkin at gmail.com> 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 <gcooper at freebsd.org> wr=
ote:
>>
>> On Tue, Jan 18, 2011 at 8:37 AM, Alexander Naumochkin
>> <alexander.naumochkin at gmail.com> 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
More information about the freebsd-fs
mailing list