Debian 12 Bookworm Installation w/BTRFS/XFCE/TIMESHIFT & GRUB-BTRFS
Вставка
- Опубліковано 18 чер 2024
- Installing Debian 12 with 6 partitions and zram swap.
With BTRFS/XFCE/TIMESHIFT and the grub-btrfsd daemon.
Software:
Distro: Debian 12 Bookworm (Stable)
www.debian.org/download
grub-btrfs
github.com/Antynea/grub-btrfs
=== Contents of this Video ===
0:00 - Intro
0:59 - Getting started with Expert Install
3:40 - Partitioning for BTRFS and Timeshift
13:49 - Installing the rest of the base system
16:09 - Installing Desktop Environment (XFCE)
18:35 - First login and Installing Zram Swap
20:47 - Installing build-essential and timeshift
22:37 - Setting up first snapshot with timeshift and RESTORE
25:50 - Installing grub-btrfs and demonstrating it
33:30 - Breaking the system and fixing it
37:00 - Setting up the grub-btrfsd service
40:55 - Destroying the etc directory and restoring snapshot
Proton Mail:
pr.tn/ref/CBK96TN0ZDAG
Github:
github.com/drewgrif/
Twitter:
/ justaguylinux - Наука та технологія
Omg you're really very good at it
Absolutely brilliant, it make take me awhile to get it sorted, as I'm still learning, but to be able to restore snapshots from GRUB is a very useful feature. Thanks Drew.
You're welcome!
While this isn’t all for me I did learn something neat about the expert install that will be quite neat to use.
Dude I’ve been using Linux for over 10 years, but have mainly focused on the enterprise space and haven’t kept up with the latest filesystem technologies on my local Linux desktop machines. This video was so insanely helpful for someone who still wants to stay on Debian but yearn for more modern features that are in other distros I personally don’t care much for. HUGE thank you
Perfect for me. I set up my xps 13 that way. works like a charme. Next will be your xfce customization vid. Great and much appreciated work. Thank you so much.
Enjoy!
Excellent method of recovering from a disaster. Thank you
Drew, this was awesome!! Thank you, sir!. Fortunately, I was close with a Dell 7480 but after slogging through to the first reboot I got the dreaded "no bootable devices found". Try as I might to resolve this issue, it failed repeatedly. Yet the SAME M.2 drive would load and boot Windows and Linux Mint with no problems... hmmm. I re-ran your process up to the GRUB install and selected YES to the "Force GRUB installation to the EFI removable media path" and it FINALLY showed up in the F2/Boot Sequence as UEFI/debian. Otherwise, the ONLY deviation from your install and my result was although it installed an launches Firefox-esr, the launcher icon is just the generic "web browser" blue earth icon.
But now I can really start to work on a debian based tool box for working with all my linux and freebsd devices and not have to worry about borking something so bad I get a brick.
Again, Thank you!!
That's a pretty neat setup. Great video.
Thanks!
Great video, easy to follow along and well paced. Now have a lean'n'mean debian nas server.
Welcome aboard!
You, sir, are a gentleman and a scholar! Thank you!
Worked for me. Thanks Drew.
I thought you made a great video, thank you sir. I use Linux as desktop, not an expert on anything. Therefore I like being spoon fed sometimes. I have a creator type laptop so that implies what I do on the desktop. You included right amount of details for me without chasing rabbits, that is a real skill. Enjoyed, thank you ! Intend to use it in the near future.👏
Nice one mate. Very resourceful
Thank you! Cheers!
Great information! Thanks!
You bet!
I recently redid an install of Debian with xfce and timeshift, myself. To minimize cruft with snapshots, I split my btrfs configuration across six subvolumes, like so:
/
/home
/opt
/srv
/tmp
/var
Easy enough. I do realize that this layout isn't ideal for flatpak usage, and whatever actually installs to /opt, as you exclude their contents in the snapshot process, but I am leaving flatpak behind to take full advantage of Debians predictable stability.
As for the xfce half, I only installed the bare minimum core components outlined in the official xfce documentation, which Debians packaging of xfce allows you to do. I did use substitutions for the volume knob, notifications, terminal, etc... Overall I am aiming for a less redundant desktop experience.
Excellent tutorial, maybe it would be great if you did the same thing but with LMDE + Setup secure boot
Thanks a lot.
Debian rules!🎉
WOW - great video!
sorry to ask - How about the part 2 Debian 'trixie' Hyprland video?
Hope that video is in the que to be done?
for ricing?
yes - I remember you saying you would do a 2nd video ricing the waybar. But again, maybe not. I have stopped using X11 wm's using only Hyprland now- it is the next software replacing X11. @@JustAGuyLinux
I'm kind of new to Linux and Debian. Does btrfs need to be maintained somehow? Like a series of commands that need to be run regularly? I would appreciate it if you also made tutorials about more basic stuff, like what the benefit of using btrfs over ext4 is. BTW you've got a new subscriber; thanks for your quality videos.
Update: I installed Debian with the btrfs filesystem in a virtual machine, and, oh boy, every snapshot only took a few megabytes instead of gigabytes! I can now take snapshots on every boot without sacrificing my SSD storage. Btrfs is just amazing.
You are probably thinking of BTRFS scrub and BTRFS balance. IMO there differences between EXT4 and BTRFS are vast! Performance, scalability, features are just a few
I need swap partition, while since I can't understand those complicated commands with btrfs and fstab, I had to follow the video exactly as it is. Can I just add swap partition during the partition part?
Excellent video! I was able to replicate these settings on my newer PC.
However, I have an older PC that doesn't work with EFI. It's BIOS Legacy only.
would like to use Debian with BTRFS and Timeshift on it. Could you please make a step-by-step guide or provide a link to some documentation or tutorial where I can accomplish this task?
I've tried everything so far but without success. Currently, the notebook is running Debian using Timeshift with RSYNC.
Any help would be greatly appreciated!
👋👌very cool, am still looking if to use timeshift ore snapper but I tested this in vm and cant find reason now why not use timeshift, thx
can i use gnome or cinnamon or KDE instead of XFCE ? i want my home pc for browsing, emails, e-shopping, banking and gaming. how to activate SELinux permissive or Enforcing ? What's Pro & Con of activating SELinux ?
How much difference is there going with 'expert' instead of 'graphical expert' for the install?
Going to fire up my Pentium M again!
Can you make a video showing how to do a dual boot install with windows?
One thing I noted when followed your Debian 12.5 BTRFS guide - Timeshift can derp with snapshots due to current rsync version. Happened to me, couldn't restore my snapshot, after restoration I had system with all changes made after snapshot was taken. Timeshift just can't delete some directories in subvolumes. Maybe Timeshift itself is broken in this version.
12.5 is just ridden with bugs - Nvidia drivers are broken due to missing symbols in kernel (needs kernel downgrade), Nouveau drivers are broken too, Timeshift is broken and a lot more complains on forums.
I will probably wait for 12.6 now. 12.5 wasn't properly tested.
Also, as a request, please make a guide for XRDP or any open-source remote desktop server for Debian with audio passthrough capability so Windows RDP client could work. I tried some ready script for Ubuntu/Debian but it required tinkering with TCP packet size to prevent audio bufferization/tearing over network. Most guides out there are just plain misleading even to the point of tinkering with pulseaudio/pipewire. Hours were wasted.
I have a few questions:
1. Why didn't you use ext4 for the boot partition?
2. Why didn't you create a subvolume for snapshots?
3. In the fstab file, why didn't you use noatime and compression in conjunction with defaults?
4. Why didn't you specify a compression level?
just the way I have always done it.... Thanks for giving me something to think about.
@@JustAGuyLinux Compression levels are a "newer" feature of btrfs. Just setting it to zstd defaults to 3. I personally recommend zstd:1. That's quite a bit lighter on the CPU without losing much compression rate (like 50% vs 47% space).
Do these sub volumes have to be created manually ? What if I used the GUI installer and partitioned disk using btrfs in GUI mode? Will that not be sufficient ?
WRT ZRAM what if I wanted to set a fixed amount of ZRAM such as 4 GB. How to achieve that in the Zram file ?
Manual is the only way. Edit the zram at /etc/default/zramswap, Uncomment the size line to SIZE=4096. Make sure the percent is commented.
@@JustAGuyLinux thank you.
25:57 EENNSSUURREE 😅
ctrl+alt+F.. is only needed when you are in a GUI. Otherwise just use alt+F..
Many thanks for your video. At your "/dev/sda2 /mnt", in my case "/dev/nvme0n1p1 /mnt", I get "permission denied". Any ideas?
I solved it. It should have read "/dev/nvme0n1p2 /mnt"
Why do you need Partitioning for BTRFS, wasn't BTRFS already selected during installation?
Timeshift needs this type of setup.
@@JustAGuyLinux ok,thank you!
Quick question before I try this.
What additional steps needed if I were to encrypt the BTRFS? Does it get more complicated?
Thank you in advance
Were you able to do the installation with encryption? I'm trying too, but without success
If anyone here is following along but decided to use KDE Plasma as their Desktop Environment of choice, after installing timeshift and attempting to launch it by clicking on the icon in the Application launcher, it won’t launch because a package needs to be installed. Run this command to fix it: sudo apt install pkexec -y
I got it working by issuing the following command: $ sudo chmod +x /usr/share/applications/timeshift-gtk.desktop
what if grub doesn't boot
I reinstall at the most minor of problems.
Graphical install Root Password Note that you can leave both fields empty if you want the root account to be disabled. In that case, the login for the root user will be deactivated and the first regular user - that will be created by the installer in the next step - will have administrative rights through sudo.
I wonder for whom you made this video. It can't be for people who can do it themselves already, the "experts", so it has to be people who need help. But you don't give any help at all. You race through the installation with your preferred settings and that's it. Nobody will learn from this. Create longer videos and really explain what it is you are doing. People will thank you.
I thought this video was long already but your point is understood. To understand the "bones" of btrfs I found this video to be insightful. ua-cam.com/video/RPO-fS6HQbY/v-deo.html
This is like a Gentoo install, grab the popcorn and enjoy!
Tell us you didn't watch the video without telling us you didn't watch the video.
I disagree, I learnt from it and will use it. If you find it too fast, slow the video down or pause it . . . easy.
Well, I think learned a lot. I was not aware I need special grub-btrfs to work with snapshots conveniently and that I need a daemon to auto-update the list. I also never saw the Timeshift application being used. I surely could have read through a lot of websites, but this gives a nice overview of how easy or difficult it is in real life. I've read thousends of Linux howto pages already, sometimes it's nice to see a person familiar with all the things show the full process. So, thank you JustAGuy! o)
ps: I did not get / understand why I need such many subvolumes and what subvolumes are affected when doing a snapshot. If all the subvolumes are included in a snapshot, then why have them? I can see why an additional home subvolume makes sense in addition to the rootfs, but all the others? I also seem to have missed how to restore the home subvolume separately?! I will watch again.. o)
mount boot/efi failed, says sda2 is already mounted, why?
23:09 @justaguylinux please help i did everything correctly now i cant create it says only Ubuntu type layouts with @ and @home subvolumes are currently supported. I have @ and @home i dont know why is happening to me please help
@JustAGuyLinux
I will do my best. But, the only thing I can do is verify that this procedure works and that I do not need to amend it. Not sure I can provide the support beyond that. Based on the error, I would say that you missed the step of renaming the subvolumes and then adding them manually to the fstab.
Update: confirmed that this sets up the subvolumes and timeshift is working with no errors.
Sir i did the steps again one by one and i am still getting the same error
followed everything and debian boot into black screen
Y