I have a working ZFS on ROOT FreeBSD 9.0-RELEASE amd64 install, booting successfully from tank/ROOT dataset:
I wanted to clone that dataset, and boot from its clone, so I did these:
... and after reboot it still boots from tank/ROOT instead of tank/NEWROOT, state after reboot here:
Am I doing something wrong here or is it just do not work?Blue
Code:
# [color="Blue"]mount[/color]
tank/ROOT on / (zfs, local, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
I wanted to clone that dataset, and boot from its clone, so I did these:
Code:
# zfs snapshot tank/ROOT@new
# zfs clone tank/ROOT@new tank/NEWROOT
# zfs promote tank/NEWROOT
# zfs set mountpoint=legacy tank/NEWROOT
# zpool set bootfs=tank/NEWROOT tank
# sed -i '' -E s/"^vfs.root.mountfrom=.*$"/"vfs.root.mountfrom=zfs:tank\/NEWROOT"/g /boot/loader.conf
Code:
# [color="Blue"]cat /boot/loader.conf[/color]
zfs_load=YES
vfs.root.mountfrom="zfs:tank/NEWROOT"
# [color="blue"]zpool get bootfs tank[/color]
NAME PROPERTY VALUE SOURCE
tank bootfs tank/NEWROOT local
# [color="blue"]zfs get -r canmount tank[/color]
NAME PROPERTY VALUE SOURCE
tank canmount off local
tank/NEWROOT canmount on default
tank/NEWROOT@new canmount - -
tank/ROOT canmount on default
# [color="blue"]zfs list[/color]
NAME USED AVAIL REFER MOUNTPOINT
tank 652M 1.32G 31K none
tank/NEWROOT 651M 1.32G 651M legacy
tank/ROOT 554K 1.32G 651M legacy
# [color="blue"]zfs list -t snapshot[/color]
NAME USED AVAIL REFER MOUNTPOINT
tank/NEWROOT@new 1K - 651M -
# [color="Blue"]mount[/color]
tank/ROOT on / (zfs, local, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
# [color="Blue"]dmesg | grep Trying[/color]
Trying to mount root from zfs:tank/ROOT []...
Am I doing something wrong here or is it just do not work?Blue