• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

ZFS Failed to boot: unsuported feature: org.illumos.sha512

ironudjin

Member

Thanks: 3
Messages: 31

#1
Hello,

Today I upgraded my FreeBSD 11-STABLE to recent version r322164. After that I cannot boot from my pool:
Booting from Hard Disk...
ZFS: unsuported feature: org.illumos.sha512
ZFS: pool zironroot is not supported
gptzfsboot: failed to mount default pool zironroot

FreeBSD/x86 boot
Default: zironroot:
boot:


After upgrade I did: zpool upgrade -a but there wasn't any new feature.

I tried to boot from ISO (FreeBSD-11.1-STABLE-amd64-20170807-r322164-disc1.iso) and reinstall bootcode:
# zpool import -m -fR /mnt zironroot
# mount -t devfs devfs /mnt/dev
# chroot /mnt
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0
partcode written ro vtbd0p1
bootcode written ro vtbd0

...but it didn't help. Also I tried install bootcode from ISO, without chroot with the same result.

Possibly some useful info:
# zpool get feature@sha512
NAME PROPERTY VALUE SOURCE
zironroot feature@sha512 active local


Could you please point me how can I fix this problem?

Thank you!
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,101
Messages: 26,992

#2
The vtbd0 implies virtio(4) and thus a virtual machine. On what hypervisor are you running the FreeBSD guest?
 

ironudjin

Member

Thanks: 3
Messages: 31

#3
I'm running VM under Linux KVM hypervisor.
I have a few HDDs where I have FreeBSD, Linux, Windows. In case I have any problem with FreeBSD, I start Linux and start VM where attached HDD with FreeBSD:
qemu-system-x86_64 -enable-kvm -cpu host -smp cpus=4,cores=4 -m 3072 -device e1000,netdev=net0,mac=52:54:00:5f:d0:b1 -netdev tap,id=net0 -balloon virtio -drive file=/dev/sdb,if=virtio,index=1,format=raw,cache=none -boot d -cdrom FreeBSD-11.1-STABLE-amd64-20170807-r322164-disc1.iso
...and fix problems in it. It's much faster than boot PC from CD-ROM.
 

mav@

Aspiring Daemon
Developer

Thanks: 216
Messages: 702

#4
Boot loader on 11-stable indeed does not support sha512 checksums, since that increases loader size a lot, that may break POLA. The main question I see here is whether you really have sha512 used on your pool. If yes, then failure is correct. Try to run `zpool get feature@sha512`.
 

ironudjin

Member

Thanks: 3
Messages: 31

#5
The main question I see here is whether you really have sha512 used on your pool. If yes, then failure is correct. Try to run `zpool get feature@sha512`.
I was using before checksum=sha512 for some of datasets. That's why zpool get feature@sha512 show me "active" state. Currently I disabled checksums at all.
Is there way to make pool bootable without send/receive each dataset?
 

mav@

Aspiring Daemon
Developer

Thanks: 216
Messages: 702

#6
Unfortunately disabling SHA512 checksum for dataset does not mean it is no longer used for some of already written blocks. IIRC some of ZFS features allow return from active state back to enabled when the last object of the kind is deleted, but looking on code in this case it does not look like it is implemented. I'm afraid you have only two choices: either send/receive or using bigger loader from FreeBSD 12 snapshot, which supports SHA512 on boot pools.
 

ironudjin

Member

Thanks: 3
Messages: 31

#7
I'm afraid you have only two choices: either send/receive or using bigger loader from FreeBSD 12 snapshot, which supports SHA512 on boot pools.
Ok, let's start from boot loader.
I'm just bootted VM from ISO (FreeBSD-12.0-CURRENT-amd64-20170703-r320599-disc1.iso), ran: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0 and got:
zfs1.png
How can I correctly install boot loader from 12-STABLE ISO?

Regarding send/receive datasets: do I need to re-create pool before "receive" datasets?
 

mav@

Aspiring Daemon
Developer

Thanks: 216
Messages: 702

#8
Ok, let's start from boot loader.
I'm just bootted VM from ISO (FreeBSD-12.0-CURRENT-amd64-20170703-r320599-disc1.iso), ran: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0 and got:
View attachment 3893
How can I correctly install boot loader from 12-STABLE ISO?
The error message looks odd to me. Make sure that your boot partition is big enough to fit the 12'th /boot/gptzfsboot. After that check that your boot pool indeed has the mentioned file. I guess you may need that file from 12 too.

Regarding send/receive datasets: do I need to re-create pool before "receive" datasets?
That is actually the goal of the whole process, since there is no other way to deactivate pool feature.
 

ironudjin

Member

Thanks: 3
Messages: 31

#9
Make sure that your boot partition is big enough to fit the 12'th /boot/gptzfsboot
My "freebsd-boot" partition is 512K. File /boot/gptzfsboot from ISO is 111K.
That is actually the goal of the whole process, since there is no other way to deactivate pool feature.
I thought when I send/receive all datasets one by one, feature@sha512 has to change from "active" to "enabled" state. Isn't it?
 

mav@

Aspiring Daemon
Developer

Thanks: 216
Messages: 702

#10
I thought when I send/receive all datasets one by one, feature@sha512 has to change from "active" to "enabled" state. Isn't it?
It could be so if this feature would have use reference counter, as IIRC some others do. But I haven't found it while quickly grepping through the code, so I guess this may not work. Though may be I missed something.
 

ironudjin

Member

Thanks: 3
Messages: 31

#11
Oh... Ok. I see only one way which solve the problem for sure: backup datasets, install OS from zero, "receive" some datasets with needed data.

Thank you.
 

ShelLuser

Son of Beastie

Thanks: 1,271
Messages: 2,695

#12
Oh... Ok. I see only one way which solve the problem for sure: backup datasets, install OS from zero, "receive" some datasets with needed data.
And one other important aspect: don't rely on a developer snapshot but instead use an official release. Despite what their names might suggest -CURRENT and -STABLE are not considered to be useful for production. See the snapshot release overview.
 

ironudjin

Member

Thanks: 3
Messages: 31

#13
And one other important aspect: don't rely on a developer snapshot but instead use an official release.
In my opinion, new features come to FreeBSD very slow. That's why I prefer to use -STABLE on my desktop, test new features/fixes and then implement them to production servers.

I've used -STABLE on desktop and production since first merge to 10-STABLE tree and still happy with it.

I know very well that's dangerous and nobody can guarantee stable work of the changes. But for me it's the best way.
 
Last edited by a moderator:
Top