- #Deep freeze software or similiar install
- #Deep freeze software or similiar update
- #Deep freeze software or similiar manual
- #Deep freeze software or similiar free
Save and close ( Ctrl + X answer Y to save) Finally run sudo crontab -e, select an editor and put /bin/bash /root/steadystate.sh at the end of the file.sbin/lvconvert -merge /dev/ubuntu-vg/steadystateĮcho -n "Starting lightdm. While Įcho -n "Scheduling reset to snapshot. # make sure root comes online before trying to merge sbin/lvcreate -s -n steadystate -l +100%free /dev/ubuntu-vg/root & merging=0Įcho -n "Creating new snapshot. usr/sbin/service lightdm stop #prevent the auto-login/login screen from loading
#Deep freeze software or similiar update
Note that if you changed the volume group name when setting up LVM, you'll need to update that in the script below as well.Įcho -n "Reverting to snapshot if present.
#Deep freeze software or similiar install
When install is finished go ahead and reboot into the newly installed system.
#Deep freeze software or similiar manual
Now install Ubuntu using manual partitioning.
#Deep freeze software or similiar free
Leave the rest of the free space in ubuntu-vg unused for now. If the free space left in the volume group is equal to the the size of the partition I want to freeze, I should be able to wipe out the entire partition and still be able to recover with a reboot. In my case, I have 506.44g free in ubuntu-vg and my root partition is 506.44g large.
I recently started digging into LVM and it occured to me that one could feasibly create a "frozen" state on a machine using LVM and it's snapshot capabilities. LVM snapshots + cron + script = "frozen" state I have taken advantage of this possibility to update "frozen" systems, but again, this too can increase time it takes to merge (revert to) the snapshot! During this wait period, it may appear to users that the system is hanging!Īlso beware that anyone who has sufficient knowledge to mount the snapshot, could make changes to the "frozen" state. Warning: I have implemented this solution and it does work, but the merge times to get back to the snapshot can cause the boot process to take a long time if large changes were made to the system during it's last boot.