kern/153996: [zfs] zfs root mount error while kernel is not located in /boot/kernel

Alexander Naumochkin alexander.naumochkin at gmail.com
Tue Jan 18 17:10:09 UTC 2011


The following reply was made to PR kern/153996; it has been noted by GNATS.

From: Alexander Naumochkin <alexander.naumochkin at gmail.com>
To: Garrett Cooper <gcooper at freebsd.org>
Cc: bug-followup at 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 <gcooper at freebsd.org> 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,<div><br></div><div>now I have two kernels on my box:</div><div>1. =
 /boot/kernel/kernel =E2=80=94 my working customized kernel</div><div>2. /bo=
 ot/GENERIC/kernel =E2=80=94 GENERIC kernel</div><div><br></div><div>I tried=
  the following expreriment:</div>
 
 <div><br></div><div># shutdown -r now</div><div><br></div><div>wait for loa=
 der menu and choose 6 - Escape to loader prompt</div><div><br></div><div>OK=
  unload kernel</div><div>OK set kernelname=3D/boot/GENERIC/kernel</div><div=
 >
 
 OK set module_path=3D/boot/GENERIC</div><div>OK load opensolaris</div><div>=
 OK load zfs</div><div>OK boot</div><div><br></div><div>and got the same res=
 ult: &quot;MOUNT ROOT ERROR&quot; while &quot;Trying to mount root from zfs=
 :zroot&quot;</div>
 
 <div><br></div><div>BTW, even if your method would work, it could not help =
 in case of install misconfigured unbootable kernel. Let&#39;s say I install=
  misconfigured kernel:</div><div><br></div><div># make installkernel KERNCO=
 NF=3DBADKRNL</div>
 
 <div><br></div><div>After this I get:</div><div><br></div><div>1. bad kerne=
 l in /boot/kernel/kernel</div><div>2. previous working kernel in /boot/kern=
 el.old/kernel</div><div>3. GENERIC kernel in /boot/GENERIC/kernel</div>
 
 <div><br></div><div>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&#39;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.<br>
 
 <br></div><div>Regards,</div><div>/Alexander</div><div><br><div class=3D"gm=
 ail_quote">On Tue, Jan 18, 2011 at 3:56 AM, Garrett Cooper <span dir=3D"ltr=
 ">&lt;<a href=3D"mailto:gcooper at freebsd.org">gcooper at freebsd.org</a>&gt;</s=
 pan> wrote:<br>
 
 <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
 x #ccc solid;padding-left:1ex;">Alexander,<br>
  =C2=A0 =C2=A0Have you tried setting kernelname to GCAM in your loader.conf=
 <br>
 before booting (it&#39;s not documented in loader.conf but it&#39;s a part =
 of<br>
 boot)?<br>
  =C2=A0 =C2=A0Another item I use to switch between kernels is symlink the s=
 uckers:<br>
 <br>
 $ ls -l /boot/kernel<br>
 lrwxr-xr-x =C2=A01 root =C2=A0wheel =C2=A017 Jan 13 17:35 /boot/kernel -&gt=
 ; BAYONETTA.r217362<br>
 <br>
  =C2=A0 =C2=A0This works well.<br>
 HTH,<br>
 <font color=3D"#888888">-Garrett<br>
 </font></blockquote></div><br><br clear=3D"all"><br>-- <br>/ash<br>
 </div>
 
 --0016362851685385ff049a2184a1--


More information about the freebsd-fs mailing list