Date: Wed, 2 Jan 2013 15:05:57 -0500 From: Paul Mather <paul@gromit.homeunix.org> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: stable@freebsd.org Subject: Re: Upgrade of RELENG_8 ZFS boot pool leads to unbootable system Message-ID: <330FFDAC-7162-4758-8CBA-343BD3644A27@gromit.homeunix.org> In-Reply-To: <50E48610.2040204@infracaninophile.co.uk> References: <FA810100-4041-40D7-AE09-77E07C1E3206@gromit.homeunix.org> <50E48610.2040204@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 2, 2013, at 2:10 PM, Matthew Seaman = <m.seaman@infracaninophile.co.uk> wrote: > 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 as 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-r244923-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 Mode) 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 = pool listed when I do "zfs import". I haven't tried importing the pool = because 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 = partitions: freebsd-boot, freebsd-swap, and freebsd-zfs in that order. = Like I said at the start, all this worked for a long time until just now = when I upgraded the pool to enable "feature flags" support. :-( >>=20 >> Any help is appreciated. >=20 > 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. >=20 > 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: >=20 > -- Boot from install media to 'Live CD' and log in as root (no = password) Given the above, does this need to be a -CURRENT Live CD? I've been = using the RELENG_8 snapshot memstick.img mentioned in my original = message above. >=20 > # 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 I tried this and it complained about the pool being in use by another = system---the original system that won't boot any more. I expected this, = and added "-f" to force an import. > # cp zpool.cache /tmp/zroot/boot/zfs/ This part also failed for me. My "zroot" fileset has a mountpoint = property set to "legacy". I had to mount this manually, via "mount -t = zfs zroot /tmp/zroot" to make the /tmp/zroot/boot/zfs directory = accessible. > # zfs umount -a > # shutdown -r >=20 > Eject the install media, and the system should boot up from your root = spool. Unfortunately, it didn't boot from the root pool. I get the same thing = happening: the "windmill" spins for a very short time and then stops = dead. I don't even make it to the "BTX Loader" output, let alone the = boot loader menu options. :-( Thank you for the suggestions. Cheers, Paul.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?330FFDAC-7162-4758-8CBA-343BD3644A27>