From owner-freebsd-stable@FreeBSD.ORG Wed Jan 2 19:10:22 2013 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7AEDF144 for ; Wed, 2 Jan 2013 19:10:22 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id DEDC61E2D for ; Wed, 2 Jan 2013 19:10:21 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.6/8.14.5) with ESMTP id r02JAFxY069915 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 2 Jan 2013 19:10:15 GMT (envelope-from m.seaman@infracaninophile.co.uk) DKIM-Filter: OpenDKIM Filter v2.7.3 smtp.infracaninophile.co.uk r02JAFxY069915 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1357153815; bh=pZ574QDExKToY7pGkI/S84bo739Ejg2dBTgegJboWSM=; h=Date:From:To:CC:Subject:References:In-Reply-To; z=Date:=20Wed,=2002=20Jan=202013=2019:10:08=20+0000|From:=20Matthew =20Seaman=20|To:=20Paul=20Mather= 20|CC:=20stable@freebsd.org|Subject:=20R e:=20Upgrade=20of=20RELENG_8=20ZFS=20boot=20pool=20leads=20to=20un bootable=20system|References:=20|In-Reply-To:=20; b=jc7Rg3zgdRgzYaHyc1bigc94F0n3eaKYE7g2ar+SLPabo/U174O50GV7BrcUHAEcw ICVYtSAsGJvFkt2ZNpPQSiv5yhkYO2dxB8Fo3amFsFiqOAj1ikCr8NBhbKrg60JbEg ftfD9SaKQ2Vo7klSy7l5W6+c7prGJLuDkcoM89cw= Message-ID: <50E48610.2040204@infracaninophile.co.uk> Date: Wed, 02 Jan 2013 19:10:08 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Paul Mather Subject: Re: Upgrade of RELENG_8 ZFS boot pool leads to unbootable system References: In-Reply-To: X-Enigmail-Version: 1.4.6 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4BC42789017C059CDF9FDB66" X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 19:10:22 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4BC42789017C059CDF9FDB66 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 02/01/2013 17:49, Paul Mather wrote: > Yesterday, I updated my RELENG_8 ZFS-only system that has worked like a= champ for ages. After a successful install{kernel,world} and reboot, I = noticed the 20121130 entry in /usr/src/UPDATING and upgraded my ZFS pool = via "zfs upgrade -a". I also upgraded my boot blocks as requested, and a= s per the "ZFS notes" section of /usr/src/UPDATING. >=20 > Unfortunately rebooting with the upgraded pool failed. The "windmill" = boot spinner spins for a tiny amount of time and then stops dead. :-( I = don't get to the boot loader menu at all. >=20 > I downloaded a very recent RELENG_8 snapshot (FreeBSD-8.3-RELENG_8-r244= 923-JPSNAP-amd64-amd64-memstick.img) from pub.allbsd.org and was able to = boot successfully from USB using that. I entered Fixit Mode and tried to= write the boot blocks on the memstick image onto my hard drives but the = resultant system still wouldn't boot. The commands I used (from Fixit Mo= de) are these: >=20 > gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad4 > gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad6 >=20 > (ad4 and ad6 are my two hard drives.) >=20 > If I "load zfs" before booting the USB memstick then I can see my old p= ool listed when I do "zfs import". I haven't tried importing the pool be= cause I'm not sure if that would make the problem worse. >=20 > Does anyone have any advice in restoring this system to bootability? I= followed the standard "root on ZFS" recipe using a two drive mirror when= installing the system initially. Each drive uses GPT with three partiti= ons: freebsd-boot, freebsd-swap, and freebsd-zfs in that order. Like I s= aid at the start, all this worked for a long time until just now when I u= pgraded the pool to enable "feature flags" support. :-( >=20 > Any help is appreciated. I think you may be running into problems with zpool.cache. This has been fixed in current, which now has the ability to find the root zpool without a valid zpool.cache, but that I suspect is faint comfort for you.= To recover from a toasted zpool.cache, you need to boot from alternate media and then import your root zpool. It's easiest to do that to a temporary directory. The important bit is to copy the zpool.cache onto your actual zroot device: -- Boot from install media to 'Live CD' and log in as root (no password)= # kldload zfs -- should load opensolaris.ko automatically # cd /tmp -- this should be a writable MFS; you'll need to arrange something similar if not. # zpool import -o cachefile=3D/tmp/zpool.cache -R /tmp/zroot zroot -- this should create a zpool.cache file # cp zpool.cache /tmp/zroot/boot/zfs/ # zfs umount -a # shutdown -r Eject the install media, and the system should boot up from your root zpo= ol. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey JID: matthew@infracaninophile.co.uk --------------enig4BC42789017C059CDF9FDB66 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlDkhhcACgkQ8Mjk52CukIzGEQCfZGvFaNwNIySOC3jjYh3TSCHD iC4An1JN3N7DSy2dQf0R4XgeSZL3vEZ0 =IOpe -----END PGP SIGNATURE----- --------------enig4BC42789017C059CDF9FDB66--