# Upgrading 8.0 -> 8.1 with "Installing FreeBSD Root on ZFS (Mirror) using GPT"-configu



## roddi (Sep 1, 2010)

Hi,

I installed 8.0 after these directions (which is a pain, but IMHO worth it): http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror

Now I have a pretty bad feeling about simply doing:

```
freebsd-update upgrade -r 8.1-RELEASE
```

Can someone give hints about:
 - when/if a new kernel is written
 - when/if the bootloader gets updated
 - any other side-effects to be reckoned with
 - can I leverage the new zfsloader from 8.1

My drives.

```
freeStore# gpart show
=>        34  1953525101  ad6  GPT  (932G)
          34  1953525101    1  freebsd-zfs  (932G)

=>        34  1953525101  ad8  GPT  (932G)
          34           6       - free -  (3.0K)
          40      409600    1  efi  (200M)
      409640  1952853344    2  freebsd-zfs  (931G)
  1953262984      262151       - free -  (128M)

=>       34  976773101  ad10  GPT  (466G)
         34        128     1  freebsd-boot  (64K)
        162    8388608     2  freebsd-swap  (4.0G)
    8388770  209715200     3  freebsd-zfs  (100G)
  218103970  758669165     4  freebsd-zfs  (362G)

=>       34  976773101  ad12  GPT  (466G)
         34        128     1  freebsd-boot  (64K)
        162    8388608     2  freebsd-swap  (4.0G)
    8388770  209715200     3  freebsd-zfs  (100G)
  218103970  758669165     4  freebsd-zfs  (362G)
```
Slice 3 of ad10 and ad12 form the system pool in a mirror config.


Thanks
   Roddi


----------



## alp (Sep 1, 2010)

My experience maybe not quite adequate (I experimented with 8.0 => 8.1 upgrade on VirtualBox VM with 1 MBR-labeled disk and zfsboot).  
1) freebsd-update (don't remember, on which state) installed non-zfs enabled booter.
2) I have a strong feeling that source upgrade would be faster


----------



## Nukama (Sep 1, 2010)

I've experienced troubles while updating a similar setup (RootOnZFS/GPTZFSBoot) after following command:`# [man]freebsd-update[/man] install` 
Don't reboot now, or you'll encounter the recovery shell.
To circumvent this you've to write the new bootloader to your disks. 

The first command in the update process described here will fetch needed files for upgrading and merge some configuration files.
`# freebsd-update upgrade -r 8.1-RELEASE`
And `# freebsd-update install` will install some files (kernel, bootloader, etc.). 
Now the bootcode can be written to both drives with these commands:
`# [man]gpart[/man] bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad10`
`# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad12`
Now it should be safe to run`# reboot`
and issue `# freebsd-update install` to install the userland components.

Further readings:
https://forums.freebsd.org/showthread.php?t=15131
https://forums.freebsd.org/showthread.php?t=12062


----------



## roddi (Sep 3, 2010)

Thanks Nukama!

everything went very smoothly. Only time I was worried when


```
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad10
```
told me


```
ad10s1 has bootcode
```

Which could mean 

(1)
	
	



```
"ad10s1 already has bootcode. I wont overwrite that!"
```

or

(2)
	
	



```
"bootcode was written to ad10s1"
```

Luckily it's (2)

I filed a bug on that, will add the link later.

Roddi


----------



## roddi (Sep 3, 2010)

here the link to the bug:

http://www.freebsd.org/cgi/query-pr.cgi?pr=150239


----------

