Skip to content

Commit

Permalink
initramfs: use correct dataset for rootfs on rollback=1
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Daniel Reichelt <[email protected]>
Closes openzfs#12585 
Closes openzfs#12586
  • Loading branch information
nachtgeist authored Oct 8, 2021
1 parent 97bbeeb commit a5b4642
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/initramfs/scripts/zfs
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ setup_snapshot_booting()
then
# Rollback snapshot
rollback_snap "$s" || retval=$((retval + 1))
ZFS_BOOTFS="${rootfs}"
else
# Setup a destination filesystem name.
# Ex: Called with 'rpool/ROOT/debian@snap2'
Expand Down

0 comments on commit a5b4642

Please sign in to comment.