initramfs: use correct dataset for rootfs on rollback=1
When booting with root=zfs:rpool/myrootfs@foosnapshot rollback=1, myrootfs and its descendants get rolled back to foosnapshot, however ZFS_BOOTFS still contains myrootfs@foosnapshot instead of the actually desired value of myrootfs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Daniel Reichelt <hacking@nachtgeist.net> Closes #12585 Closes #12586
This commit is contained in:
parent
97bbeeb938
commit
a5b464263b
|
@ -630,6 +630,7 @@ setup_snapshot_booting()
|
||||||
then
|
then
|
||||||
# Rollback snapshot
|
# Rollback snapshot
|
||||||
rollback_snap "$s" || retval=$((retval + 1))
|
rollback_snap "$s" || retval=$((retval + 1))
|
||||||
|
ZFS_BOOTFS="${rootfs}"
|
||||||
else
|
else
|
||||||
# Setup a destination filesystem name.
|
# Setup a destination filesystem name.
|
||||||
# Ex: Called with 'rpool/ROOT/debian@snap2'
|
# Ex: Called with 'rpool/ROOT/debian@snap2'
|
||||||
|
|
Loading…
Reference in New Issue