Implementation for set_persistent_boot

Hi, added some specs and implementation for `set_persistent_boot`. Not very elegant solution, but it works.