Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Nov 2014 19:29:16 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Anton Eliasson <devel@antoneliasson.se>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mounting from zfs:zroot/ROOT/default failed with error 2: unknown file system after upgrade to 10.1-RELEASE
Message-ID:  <alpine.BSF.2.11.1411191910410.7150@mail.fig.ol.no>
In-Reply-To: <546CD7AA.9040107@antoneliasson.se>
References:  <546BC2A5.6010806@antoneliasson.se> <alpine.BSF.2.11.1411190814400.7150@mail.fig.ol.no> <546CC0F1.2050607@antoneliasson.se> <alpine.BSF.2.11.1411191756210.7150@mail.fig.ol.no> <546CD7AA.9040107@antoneliasson.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Nov 2014 18:47+0100, Anton Eliasson wrote:

> Den 2014-11-19 18:17, Trond Endrestøl skrev:
> > To break into the kernel debugger, enter this before booting the
> > kernel:
> > 
> > set debug.debugger_on_panic="1"
> > 
> > Judging from the screenshots you've provided and from what you wrote
> > in your reply, it seems vfs.root.mountfrom is overridden somehow.
> > /boot/loader.conf would be a natural candidate.
> > 
> > If the bootfs property is indeed set to zroot/ROOT/default, then it's
> > very strange that the kernel would proclaim:
> > 
> > Trying to mount root from zfs:zroot []...
> > 
> > instead of:
> > 
> > Trying to mount root from zfs:zroot/ROOT/default []...
> > 
> > And it's even stranger that nothing appears on lszfs' radar when asked
> > to list zroot/ROOT/default.
> > 
> > > Selecting the old kernel in the boot menu and trying to boot normally
> > > fails
> > > because init is not found:
> > > https://cloud.solid.lth.se/public.php?service=files&t=81fd35bb6348ae7426553c2f59fb2a18
> > > 
> > > Could this be a mismatch in kernel and kernel module versions? How would I
> > > fix
> > > that?
> > If you can boot from a recent snapshot image or live image, and import
> > the zpool read-only, you could walk around and see if
> > zroot/ROOT/default/boot/loader.conf contains anything strange.
> > 
> > This zpool command would allow you to go spelunking inside /zroot:
> > 
> >    zpool import -o readonly=on -f -R /zroot zroot
> > 
> > You might need to mount readonly any dataset you wish to examine.
> > 
> > If you see the need for changing any of the files, you must export the
> > zpool and re-import it readwrite, i.e. leave out the -o readonly=on
> > option.
> > 
> > I admit I'm in unknown territory, even if I have managed multiple ZFS
> > systems over the past years, so be careful.
> > 
> Hi!
> I had forgot to remove the vfs.root.mountfrom that I experimented with. This
> probably caused the failure to load init.
> 
> I got it to work by chrooting into the system from a live cd and rolling back
> the upgrade with `freebsd-update rollback`. Then it booted fine. Now
> freebsd-version shows 10.0-RELEASE-p12 and uname -r shows 10.1-RELEASE. It
> looks a bit strange, but at least it works for now.
> 
> I may have mixed up the commands used to upgrade the system. Is the following
> the correct procedure for doing a major upgrade (with a stock kernel)?
> 
> freebsd-update -r 10.1-RELEASE upgrade
> freebsd-update install
> (reboot)
> freebsd-update install
> (rebuild ports)
> (done)

Sadly, I wouldn't know.

I use the Subversion base/stable source tree for the OS, be it 
base/stable/{8,9,10}, and the ports collection (ports/head) for any 
3rd party SW.

On my ZFS systems I always install a new world and kernel into a new 
dataset, zroot/ROOT/YYYYMMDD-rRRRRRR, (maybe I'll eventually settle 
for a snapshot + clone + install dance), adjust the bootfs property on 
the root pool, copy select files from /boot, /etc, and /root to the 
new dataset, let the new dataset inherit the mountpoint (legacy) from 
its parent, and reboot into single user mode to perform basic 
maintenance such as mergemaster and make delete-old, and maybe I even 
upgrade any outdated ports using portupgrade and a homegrown shell 
script, before I cold boot the system to verify the system's ability 
to bootstrap itself, and to allow the harddrives to do their power-on 
maintanance.

In stable/10 and head, you can now have options ZFS in a custom kernel 
configuration, removing the need to load opensolaris.ko and zfs.ko 
along with the kernel. The freebsd-update route allows only for the 
GENERIC kernel and a precompiled world. :-/

> Thanks for your help!

NP. :-)

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
From owner-freebsd-questions@FreeBSD.ORG  Wed Nov 19 18:52:18 2014
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id AD3B0C3D
 for <freebsd-questions@freebsd.org>; Wed, 19 Nov 2014 18:52:18 +0000 (UTC)
Received: from vps.markoturk.info (vps.markoturk.info [95.154.208.14])
 by mx1.freebsd.org (Postfix) with ESMTP id 79CF1187
 for <freebsd-questions@freebsd.org>; Wed, 19 Nov 2014 18:52:18 +0000 (UTC)
Received: by vps.markoturk.info (Postfix, from userid 1001)
 id 979F827420; Wed, 19 Nov 2014 19:42:30 +0100 (CET)
Date: Wed, 19 Nov 2014 19:42:30 +0100
From: Marko Turk <markoml@markoturk.info>
To: freebsd-questions@freebsd.org
Subject: Handbook update section for custom kernel
Message-ID: <20141119184230.GA36984@vps.markoturk.info>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7"
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Nov 2014 18:52:18 -0000


--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

in handbook, section 24.2.3.1. Custom Kernels with FreeBSD 9.X and Later
says:
"Before using freebsd-update, ensure that a copy of the GENERIC kernel
exists in /boot/GENERIC. If a custom kernel has only been built once,
the kernel in /boot/kernel.old is the GENERIC kernel. Simply rename this
directory to /boot/kernel."

Should the last sentence be
"Simply rename this directory to /boot/GENERIC."

or am I missing something?

BR,
Marko

--fdj2RfSjLxBAspz7
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJUbOSWAAoJEJXL/ReD3UkFyC0QANOeqoeh3JLlVdFEvs5+BFbl
n4p/GpLbz9JdAuNIKtO4+6jT9Nr9HI7siSIGj1LS5o5iiyHYhvsfA3tXn6SjjqCn
jrmXLIaT6el/+7W41FifzjZka9oWszIIbaLgdCYQ1vSXzz6KuD9G4n9LETUB/pYf
8RIhUkMKuz4qa6L+rNG1m4/uO6qD04g+dTl+GQo9h7s3cQBrp+JNwfoSkmCfeTDV
UbtGsQtUJ6P4ZASyNr7DVVbYMbD2YkC//wKFMCroIWXxPn/bl1mouFdQX/9083a7
zKSfb+VnJRw2n1h6jmBbeRrAkQo08gTJA1EakLCQL4+CIOQQsTiuoXj5EzYH/Cwe
oL//2LfboYIRwXFrC9+yg3umwlvYlajZCscdI7yiDU/NqWio4apI/VWA8CoKyIT4
09IitaY+Ny5vdtAYkkKURF6WGZqB0hi2IRXuBLTBrlCUT6IW/XbAVr4sS3bIpu1k
hYNXYqHYnsdjFgaKr+bPgeqZT8bTpGwz64Ga1mYtbiQ8vYxXmQd5s4mdftWHEsql
wnaHJhXzMqlXe2wR9Um21xnpILgpDlFp2tzihQYoS1HCWpAW2flhNypFbDl/UokQ
/HLiyQT59+GSy0ERjf0ubGUISPJRK/0vHcNi5/mYLzUcn+XcRn3+4kN7ZemIuWoz
hug9ZUenrAbRHVrWFcXh
=Xabe
-----END PGP SIGNATURE-----

--fdj2RfSjLxBAspz7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1411191910410.7150>