Solved Rollback to snapshot from Single User USB boot

## Goal

The goal was to upgrade the OS from 12 to 12.1 and during the update something went wrong. I could not reboot my server. Instead of switching back the old kernel, I did a upgrade again which resulted in the old kernel to be overwritten with the wrongly not working kernel.

As I took a snapshot on the ZFS disk, I could normally easily rollback to snapshot. But doing following steps below, it does not work. Anybody an idea?

## Steps

1. Insert boot USB (with FreeBSD 12.0)
2. Simply restart NUC, it will automatically go in boot modus
3. Boot from USB , when getting the blue screen to reinstall select SHELL
4. kbdmap -> choose keyboard
5. gpart show
6. geli attach nvd0p3
7. geli attach ada0p3
8. zpool import
9. Mount the zpool zroot: mkdir -p /tmp/zroot
9. zpool import -fR /tmp/zroot zroot
10. zfs rollback -r zroot@backup
11. zpool export -f zroot
12. Type command : *reboot* to reboot.

Not a single step fails still when I reboot i get the upgraded and failing Kernel.

Anybody an idea why?

Best Regards,

R
 
Last edited:
I suspect you only made a snapshot of zroot and didn't use a recursive snapshot. So you basically only made a snapshot of an empty dataset. Check if zroot/ROOT/default@backup actually exists.
 
Ok sorry to react so late. i just tested what i did on my physical pc in a vm on virtualbox. The snapshot of zroot was created recursively, however it seems the snapshot is not rolling back all mountpoints. Basically i need to rollback every mountpoint that is visble in zfs list.

As you are moderator and administrator, you might consider to delete the thread completely , it's rather a noobie problem :).

But thanks so much for you help.
 
Back
Top