Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jul 2010 00:18:41 +0200
From:      Martin Matuska <mm@FreeBSD.org>
To:        David Newman <dnewman@networktest.com>
Cc:        fs@freebsd.org
Subject:   Re: fixing a busted ZFS upgrade
Message-ID:  <4C51FE41.8030906@FreeBSD.org>
In-Reply-To: <4C51ECAA.2070707@networktest.com>
References:  <4C51ECAA.2070707@networktest.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 Booting from GPT ZFS was not officially supported before 8.1-RELEASE

Here is a upgrade guide for users who want to run "zpool upgrade" on
their ZFS boot pools:

Excerpt from 9-CURRENT UPDATING file:

BEGIN EXCERPT

ZFS notes
---------
When upgrading the boot ZFS pool to a new version, always follow
these two steps:

1.) recompile and reinstall the ZFS boot loader and boot block
(this is part of "make buildworld" and "make installworld")

2.) update the ZFS boot block on your boot drive

The following example updates the ZFS boot block on the first
partition (freebsd-boot) of a GPT partitioned drive ad0:
"gpart bootcode -p /boot/gptzfsboot -i 1 ad0"

Non-boot pools do not need these updates.

END EXCERPT

In case the boot record is messed even more, you need to reinstall it
completely:
"gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad0"

For recovering a system that does not boot anymore, you can use mfsBSD
ISO's:
http://mfsbsd.vx.sk

You can boot from the iso and repair the boot record.
I recommend you check your gpart partitions with "gpart show" and verify
discovered pools with "zpool import"
(without any flags or arguments) first.

mm

Dňa 29. 7. 2010 23:03, David Newman wrote / napísal(a):
> Attempting to upgrade an 8.0-RELEASE to 8.1-RELEASE failed on a system
> running a bootable ZFS partition.
>
> The system boots to the loader prompt and complains there's no bootable
> kernel. Running 'lsmod' shows there are four ZFS disks present.
>
> Thanks in advance for clues on fixing this, and also on the right way to
> upgrade FreeBSD systems with bootable ZFS partitions.
>
> Steps to reproduce:
>
> 1. Build 8.0-RELEASE system following the freebsd.org wiki:
>
> http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/RAIDZ1
>
> In this case the system uses raidz1 across four SATA drives.
>
> 2. Upgrade to 8.1-RELEASE using the 'FreeBSD Update' directions:
>
> http://www.freebsd.org/releases/8.1R/announce.html
>
> 3. After first reboot, system boots to the loader prompt.
>
> dn
>
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C51FE41.8030906>