 Tom here from Orange Systems. It's January of 2023, and we're going to talk about PF Sense boot environments. I figured it's a great topic because we have the release candidate here available as of the recording right now for PF Sense Plus, and I've been testing it out. And boot environments are a great way to test without the risk of having to reload your firewall if it doesn't work for you or if you find a bug with your configuration that, well, just makes you want to roll back to the previous version. And rolling back doesn't mean reloading the firewall, it just means selecting the previous boot environment. There's a couple of prerequisites. First one is ZFS. You have to have a PF Sense that has been loaded with ZFS. There's not an in-place conversion from UFS. So if you have a system that you would like to convert, the only way to do this is going to be to download your config file, reload the system, push your config file back, and it will restore with all of your settings, and then you'll have ZFS. There's no in-place just click button, convert here type of upgrade. Next, boot environments are only available for PF Sense Plus. Even though ZFS is supported since, well, it has been the default, I should say, since 2.6 on Community Edition and the 22 series of PF Sense Plus that was released in 2022, you only get the boot environments inside the PF Sense Plus Edition. If you'd like to get PF Sense Plus, it comes free with any Neckate device. You can get a free home user license, a free lab license, or you can get a business with support license all from subscriptions from Neckates. There's some other differences you get with PF Sense Plus. I have a separate video linked down below to dive into that topic. Now, the advantage of boot environments is that ability to just migrate between different versions very quickly, and that's what I wanna walk through. I also will leave a link to the PF Sense documentation, but we'll actually walk through the upgrade process of going from 22 to 23 and using a boot environment so we can revert back if this upgrade doesn't go well. This is my lab system that is running the 22.05 release. It is loaded with ZFS, so we have our boot environment option here. This is the 22.05 working edition, base version 22.05, and let's go ahead and clone it before we start messing with things because we're gonna do an upgrade to version 23. Tells you how much space it's using. Let's go ahead and snapshot this. So we'll call it 22.05 working. Before upgrade, seems like a good name, and you can give the same descriptive name, but descriptive names allow you to have spaces and be more descriptive about what this is. So we'll call this 22.05 working before YouTube demo. So hit save, now we have this one. It's only taken a few kilobytes because these are ZFS snapshots. They're points in time for the entire OS, not just the config here, but the entire operating system is snapshotted. They don't take up a lot of room unless there's a lot of changes in them. Now currently the little star here means that is the next boot environment as in the boot environment that will be booted when this system reboots. If I would like this system here to be rebooted, so we'll click this. Now this one will be the one on next reboot, but the green check mark here means the current one we are working from is this. Now the next options are gonna be obviously edit, you can rename existing ones, you can delete them, or you can activate a one-time reboot. So if I just wanted to change something in this and I could hit the play button here essentially and it would reboot one time to that, but then the next reboot would be back to this one because it doesn't set it as default. But pretty easy just to choose these back and forth. You can also quick click the quick create and it'll quickly just create a snapshot and give it a date. And once again, the same option pulls up here if I wanted to set this one to be the boot environment. But we're gonna ahead and delete that one. We only need this one here. Now let's go ahead and walk through an upgrade. So this system is working fine. I hope it works fine with the upgrade, but just in case it doesn't, that's why I made this working before upgrade one. So let's go ahead and do an update to this by going to system update. And we're gonna choose the 2301 beta here and hit confirm. And it's gonna go ahead and update the system to the new beta. We'll fast forward through the update process, but basically it's gonna download all the packages, apply the update and reboot. The good news is it looks like it pulled up the web interface. Let's see if we can log in, click accept, close. And we are now on the 231 beta. That's awesome. Hopefully everything works. But of course, this is about boot environment. So what if something doesn't work? It did create an auto snapshot or boot environment. Let's me know the base version for that. So the base version is the same because this is the one we created before upgrade just so I had a snapshot. And here is the one that was automatically created by the system update. Now let's suppose I wanted something back in 2205. Now any changes I'm making now are always going to the active version. And this is the one active of boot. But if I wanted to revert back to this one here, I just simply click the star and that will set this to be the boot environment that I wanna go back to. So we've set this and I'm gonna go ahead and restart the system. So we'll go to diagnostics and just reboot. And we can see the boot environment is going to be this one. This is a nice feature of the restart features. They've added it here as well. So you can see the different ones. Now it's probably worth noting and let's go back over to our boot environments here that I should rename these real quick because if I don't, I could create my own confusion. So I know this is 2301 release candidate. So we'll save that as this one's name just to remove any confusion. I see the base version here but you'll see later when I show where we do this from the command line it will only show these parts of the names. And it's important to have those clear so you don't get mixed up. But let's reboot it and show you what happens when we revert back. It's pretty simple here. So diagnostics reboot. We know it's going to go to the 2205 normal reboot hit submit, let the system restart. Now we're here at the console. We can see it's gone back to the 2205 release. We'll refresh the page, log back in. And here we are back at the 2205 just like nothing happened. Now any changes I make here are not going to reflect into 23 version and vice versa. It's always writing to whichever the active boot environment is. But if we wanted to go back and forth and maybe try this or maybe there's another update or some other configure we found a workaround because we want to go back to this. We can simply go here and go back to it. And if we wanted to export changes between this version and that version we could just take the diagnostic backup restore file and push it to this version by booting into that environment and loading it on there. But the next thing and let's go ahead and show you what happens on a reboot if you want to choose a environment from the console because well, your upgrade didn't go so well or you made a change that has now put you all the way back to not being able to get into the web environment here. So if you can't get to the web environment yes, you can do it from the console and let's walk you through that real quick. Actually we'll just leave this one at default and reboot it and just bring you to that menu so you can set the next boot environment. So from the console we're gonna just gonna choose a reboot system. Yes, reboot normally. Now from this menu we're gonna choose option eight boot environments. Now this is where it can be a little bit confusing. We have the active and we have the boot FS. So currently is active on 20205. And if we wanna choose a different one because it says one of three, we keep pressing two and it chooses a different one. This is the auto one here and this is a 23 version here. So it cycles through them. It does not list them. So it can be a little bit of a nuance. It's in the documentation but it's something that can be easily overlooked like, hey, what is it doing? And just to be clear you're cycling through the different options and the different boot environments you have. And this is why because it does not give the description it only gives the name of the boot environment having them clearly named like 2301 working RC for release candidate. Now we know this will be the active one and we just go one back to main menu. Now this is also letting you know what the ZFS route is the working before upgraded to one that would normally boot our override is what we see here in option two. So if we choose three you see it says the active one. And what three is actually doing it reverted number two back to what it's going to be. So if you cycle through them and maybe you had 10 of them you just want to get back to whichever one is the current boot pressing three we'll bring you back to that. Like I said, this is covered in documentation I just wanted to make it clear. So let's go ahead and boot back up into the 2301 environment. Choose that option, press one, press center and it's going to boot up into our 23 environment. So we're back in our 2301 beta go here to boot environments and I want to point out the 2205 is still the default when you do something from the boot menu option in the console it's only setting the temporary boot environment it is up to you to make it the permanent one by well simply clicking the star right here and now this one will be the boot environment that you will have on reboot. Pretty simple to do and easily I could have selected any one of these as needed. Now I think the boot environment feature is super cool. It allows me to easily take firewalls that I want to test or even ones I'm testing at home because maybe I want to try out the release candidate but I'm not sure if all the complexities of my system will work fully or maybe it will get me almost there and I'll find some bug and I want to be able to quickly just hey I just want to reboot and revert back and I don't want to have to go through any reload, revert process. Boot environments are great for doing that great for testing ideas and scenarios that if you want to make permanent you just change it to say hey I want to go ahead and make this one permanent and I can always delete that old boot environment but I think this is just great for hardware firewalls when you don't have them virtualized I know someone's going well just virtualize it because that solves the problem too solves the problem in a different way but I do really recommend it for many of our clients they are running hardware firewalls. Now one caveat here this is no substitute for a backup at all you should always grab a copy of your config.xml file out of the system because that is the backup because there's still unless you've set up ZFS RAID in your system which is still resiliency and not a backup you still are at risk to lose all of it if that drive dies even if there's boot slices on there as good as ZFS is it can't protect you from a major hardware failure so as always backup head over to the documentation for more details and leave your thoughts and comments down below head over to my forums for more in-depth discussion head over to NetGate's forums for a more in-depth discussion and questions about PSNs thanks and thank you for making it all the way to the end of this video if you've enjoyed the content please give us a thumbs up if you would like to see more content from this channel hit the subscribe button and the bell icon if you'd like to hire a short project head over to laurancesystems.com and click the hires button right at the top to help this channel out in other ways there's a join button here for YouTube and a Patreon page where your support is greatly appreciated for deals, discounts and offers check out our affiliate links in the description of all of our videos including a link to our shirt store where we have a wide variety of shirts that we sell and designs come out well randomly so check back frequently and finally our forums forums.laurancesystems.com is where you can have a more in-depth discussion about this video and other tech topics covered on this channel thanks again for watching and look forward to hearing from you