fixing a busted ZFS upgrade

Martin Matuska mm at FreeBSD.org
Thu Jul 29 22:35:15 UTC 2010


 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"


More information about the freebsd-fs mailing list