Pop!_OS 22.04 with btrfs, luks encryption, automatic system snapshots with Timeshift & rollback demo

preview_player
Показать описание

----------------------------------------------
In this video we'll install Pop!_OS 22.04 with the following structure:
- an encrypted btrfs partition (with LVM) for the root filesystem
- an encrypted swap partition which works with hibernation
- an unencrypted EFI partition for the systemd bootloader
- an unencrypted partition for the Pop!_OS recovery system
- automatic system snapshots and easy rollback using:

----------------------------------------------
Contents
00:00 - Intro
00:44 - Boot into live system (I use Ventoy for that)
01:54 - Choose Language, Region and Keyboard Layout
02:08 - Create Partition Layout by simply doing a clean install (without btrfs first)
04:27 - (Optional) Understand default partition layout, i.e. how luks and LVM are used by POP!_OS
10:23 - Do the second and actual Install with BTRFS as the filesystem inside encrypted LUKS partition
13:26 - Why we need post-installation steps when using BTRFS in POP!_OS
15:13 - Unlock luks partition
15:28 - Mount top level root of btrfs partition to /mnt using optimized mount options
18:05 - Create btrfs subvolumes @ and @home and move files into the subvolumes
21:08 - Make changes to fstab
23:24 - Crypttab: see encrypted swap and make discard work
24:01 - Add rootflags to kernelstub
25:08 - Mount EFI partition to add rootflags to systemd bootloader conf files (and optional timeout)
26:26 - Chroot into your system and update the initramfs
29:03 - Reboot
30:45 - Some checks whether everything is set up correctly
32:43 - Update and upgrade your system
33:36 - Install and set up timeshift for btrfs
36:52 - Install and set up timeshift-autosnap-apt
40:24 - Some details on automatic timeshift snapshots and where they can be found on the disk
42:29 - Demo how to restore system to a certain snapshot using Timeshift from the Recovery system
47:10 - Outro

----------------------------------------------
IMPORTANT NOTES AND CORRECTIONS
-

Рекомендации по теме
Комментарии
Автор

This was an AMAZING Video! Thankyou!!! I got my system set up - it will TRULY be a time saver! By the way, in your video, you said that we could name cryptdata anything we wanted, but I would recommend not too. On my first attempt, I named my volumn awesomezone, instead of cryptdata, and then it never booted after the final step. I probably left something out somewhere. So I had to redo all steps. For any new people watching this awesome demo, just follow his steps exactly.

BDFire
Автор

Thanks a lot for your awesome guides for Pop!_OS! I just recently discovered the related setup guides on your website while I had already been using Pop!_OS for 1-2 years. I was already using luks encryption and Timeshift but with ext4. Your guide helped me get some confidence to convert my filesystem from ext4 to btrfs and I also started using timeshift-autosnap-apt and I love this setup with the fast snapshots.

Автор

Perfect, it should be the default installtion

Techonsapevole
Автор

Installed it, love it.
Just thought I would mention, in your demo of what happens when you have managed to rm -rf /etc... you don't actually need sudo to reboot if you are on the console...

denlun
Автор

Wonderful tutorial!
Thanks for taking the time to create this.

LucS
Автор

Amazing guide. Thank you, sir!
I'm gonna try to daily drive Pop!_OS. Hoping for smooth gaming on nVidia GPU and IT work. So far it seems promising.

wiciu
Автор

Thank you so much for this, incredible guide, even for someone as clueless as myself! Only minor issue was the EFI vars mount mentioned by ven in the comments, without which I couldn't get this to work.

Aphova
Автор

Holy moly, if I could, I would "like" this video more than once! thank you for such a nice guide,

gpoleze
Автор

Thanks for the tutorial. I did it and works great. 😀

jkommisar
Автор

Thanks Willi for this amazing video.
I have been able to setup all the things and tested the restore.
Very accurate video. Thanks.

lestutospythondupentester
Автор

Thank you Willi for this detailed walkthrough 😄

chromacobble
Автор

Thanks for sharing in such detail, this is all very new to me. I've read a few things suggesting accelerated wear on SSD's from huge write amplification (up to 30x). Have you looked at SSD lifespan with btrfs, or optimizations to reduce the write amplification?

aintnuthinbuta
Автор

Sadly the installation fails for me with the error that it can't find the root partition. This is after redoing the installation and manually selecting the partitions. I tried this multiple times, I only got it to work when I created a custom partition with / instead of the inbuilt root one. Somehow that seems to have fixed my problem.
Thanks for the in-depth tutorial!

klaesregis
Автор

Espero que um dia Pop_OS padrão BTRFS ! ♥

brunocesar
Автор

The btrfs partition is quite lengthy. Suggest for manual partition for mbr legacy case btrfs

praveenbharadwaj
Автор

Actually, if you snapshot more often, you can make more snapshots, use less space, and they will probably be more useful. macOS for example does hourly, then deletes after 24 hours

tutacat
Автор

2. Can you incorporate Secure Boot (actually signed grub, initramfs, everything that gets loaded) + TOTP attestation against evil maid using TPM into this setup next time?

qmster
Автор

Willi thank you so much for this informative video! I am a Linux Noob, Is there any possibility of you doing a video similar to this one demonstrating the use of gparted (for those of us who are not terminal proficent yet) to create BTRFS logical (@) subvolumes and doing all of this without Luks encrypted partion for those of us who do not use encrypt data option on Pop_OS 22.04? I know I and perhaps others would greatly benefit from it. Again thanks, Kindest regards Lynette

lynettegarrido
Автор

Hi Wili, thanks for this great video! I don't understand because you use LVM on the ecrypted /dev/sda3, I mean, as BTRFS has all the features of LVM and more, wouldn't it be easier to just put use BTRFS over cryptodev over /dev/sda3 instead of BTRFS over LVM over cryptodev over /dev/sda3?

DiegoCortassa
Автор

using and a SATA SSD, the Default Clean Install does not configure 4 partitions as mentioned in 04:27 . It configures 3 partitions and forces the /boot to be on ext4 rather than fat32

seanyu