Nice example for the power of boot environments

There is a nice example of the power of boot environment. Boot environments are something like snapshots of your operating system installation made writeable. As you may already assume, they are based on ZFS snapshots and the clone functionality. This is possible due to the usage of ZFS as the root filesystem. So: Please don’t try this at home. Whey you try it, don’t try it on any Solaris 11 Express installation of any value. But don’t try it. I don’t want to hear any story. that you’ve deleted your ERP system by accident because you used the wrong terminal window. Leave that to trained professional stunt admins with the right equipment (Solaris 11 Express) ;) Assume you have a system, configured with all your application, everything is running fine. So you think it would be nice to have something like a freezed state of this situation. No problem. This command will do the trick.

# beadm create rescuenet
# init 6

When you reboot your system you will see it as a new entry in the grub menu.

Okay, but boot into the old environment starting “Oracle Solaris …” first by selecting it in the grub menu (it should be already selected, or you used beadm activate already. Now i will drop the atomic bomb on your installation.

# rm --no-preserve-root -rf /

Essentially we’ve just nuked the installation. After a moment the system should just freeze. Reset the system and boot again via grub into the boot environment starting with “Oracle Solaris …”:

Okay … on a normal system this would send you to the tapes. With Solaris 11: Reset the system. Boot into the boot environment “rescuenet” via selecting it in grub.

Tada! Just creating a boot environment with a single command after a config change may safe your butt later …. and btw … this even works in zones … they know the concepts of boot environment,too.