# ZFS unsupported ZFS version 5000 (should be 28) can't find /boot/zfsloader



## meteor8488 (Mar 27, 2013)

I have two zpool*s*:

a raidz2 zpool named zroot, made up by 6 HDDs, root is on this zpool
a mirrored zpool named ssd, made up by 2 SSDs

I upgraded the zpool version yesterday. *T*oday when I reboot the server, the server can't boot. Below is the error message:

```
ZFSï¼š unsupported ZFS version 5000 (should be 2Cool
can't find /boot/zfsloader

default: ssd::/boot/kernel/kernel
boot:
can't find /boot/zfsloader
```
I tried to use FB9.1 current FreeBSD 9.1-CURRENT to boot the server to fix this issue, but if I run [cmd=]fixit#zpool import -f zroot[/cmd] the / on the LiveCD will be replaced by / on zroot, and there is no device in /dev.

If I run [cmd=]fixit#zpool set mountpoint /mnt zroot[/cmd] then I'll get an error message:

```
can't open zroot: dataset doesn't exist
```
I have no idea about how to fix it, can anyone help?


----------



## SirDice (Mar 27, 2013)

Try updating the bootcode in the freebsd-boot partition.


----------



## meteor8488 (Mar 27, 2013)

SirDice said:
			
		

> Try updating the bootcode in the freebsd-boot partition.



The problem is that if I don't import the zroot. I can't update the bootcode in freebsd-boot partition. But if I import zroot, the /dev on zroot will overwrite /dev on livecd, and I can't find any HDD.


----------



## ondra_knezour (Mar 27, 2013)

meteor8488 said:
			
		

> If I run
> 
> ```
> fixit#zpool set mountpoint /mnt zroot
> ...



Do you have /mnt in your filesystem when booting from LiveCD?

As far as I can remember, I have to mess with creating mountpoint somewhere, something like
`# mkdir /tmp/mnt`
`# zpool import -o altroot=/tmp/mnt zroot`

Even better may be


> -R _root_		Sets  the  "cachefile"	property to "none" and the "altroot" property to "root".



Consult zpool(8) about it.


----------



## SirDice (Mar 27, 2013)

You don't need to import it to update the bootcode.

`# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0`
(That's assuming the disk is ada0 and the freebsd-boot partition is the first)


----------



## meteor8488 (Mar 27, 2013)

SirDice said:
			
		

> You don't need to import it to update the bootcode.
> 
> `# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0`
> (That's assuming the disk is ada0 and the freebsd-boot partition is the first)



Hi, the /boot is on zfs, so I think /boot/gptzfsboot is in zroot. If I don't import it, I'm not sure that I can use part to recreate the bootcode.

*A*nyway, let me try first.


----------



## SirDice (Mar 27, 2013)

meteor8488 said:
			
		

> Hi, the /boot is on zfs, so I think /boot/gptzfsboot is in zroot.


Not if you booted from the Live CD.


----------



## ondra_knezour (Mar 27, 2013)

SirDice is right, you don't need read access to anything on disk in this case, in fact you only want to "infect" couple of sectors on HDD with something available on live medium (CD/USB).


----------



## kpa (Mar 27, 2013)

There's a catch here. The updated bootcode has to be from a recent 9-STABLE. I would download a snapshot ISO from allbsd.org and use that to update the bootcode.

https://pub.allbsd.org/FreeBSD-snapshots/amd64-amd64/9.1-RELENG_9-r248681-JPSNAP/


----------



## meteor8488 (Mar 27, 2013)

SirDice said:
			
		

> Not if you booted from the Live CD.



Thanks very much, it works!


----------

