Arch Linux is an RPG. You bite the bullet and install it, despite your friends warning you that it's going to eat SO MUCH of your free time. Your girlfriend is confused by it, but she's glad you're enjoying yourself...at least when you're not yelling at the screen. Character creation is insane. You spend your first day customizing and don't actually do anything productive. Your coworkers are tired of you talking about it. They run Ubuntu. Casuals. Your boss is tired of losing productivity hours to it. And, periodically, you fight a big boss called "Oh shoot, this update did something bad, I should have paid attention". Pretty sure that's a callback to a world boss in Guild Wars 2, but I could be wrong.
@@rafaelmorales1926 # Just put these into your fish config # Functions needed for !! and !$ function bind_bang switch (commandline -t)[-1] case "!" commandline -t -- $history[1] commandline -f repaint case "*" commandline -i ! end end function bind_dollar switch (commandline -t)[-1] case "!" commandline -f backward-delete-char history-token-search-backward case "*" commandline -i '$' end end function fish_user_key_bindings bind ! bind_bang bind '$' bind_dollar end # Welcome
@@driden1987 It really is a rabbit hole. I realized that snapper works flawless on openSUSE and other distros have some problems with it, so I get why ppl use Timeshift instead of snapper.
Timeshift-autosnap does the same. I have automatic snapshots every time I do yay -Syu. What do you prefer about snapper? I’m a beginner Linux user and timeshift does all I need from it, so I’m curious what else is there.
Small correction: At 16:38 you said grub-btrfsd picked up the change but in fact the grub reconfiguration here is done by the pacman hook from timeshift-autosnap. As you can see at 15:40 you have set updateGrub=true
🤘Former Arch user here. Arch is super cool, but NixOS let's me be a mad scientist in a safe environment with Btrf and rollobacks out the box. Oddly enough the only Linux distro I ever broke was...wait for it...Debian stable.
arch and gnome = most underrated system - all aspects of cool prety stuff like osx etc but cooler - great with a iwm or something for zen like work environment! rate it !
Lots of people have already mentioned it, but last year I switched to NixOS after having broke my Arch install for the last time. There's a learning curve, it's quite different from any other Linux distro, but the benefits are absolutely worth it. And you can use it like a rolling release when you want the latest packages, or pin packages to specific versions when you want, you are in complete control.
Oh and one thing I might add, if you do look into NixOS, also look into a thing called Snowfall, which provides a set of conventions for writing your NixOS config, which is otherwise very open-ended which makes things a little harder to learn IMO, since you can organize your config into modules a thousand different ways and every other NixOS config you come across will be doing things its own way. I intend to rewrite my NixOS config using Snowfall lib at some point in the future.
Just curious do you use any of the redundancy features of BTRFS. I have mostly stayed away from BTRFS because of the write-hole bug but i guess if you strear clear of Raid 56 you should be fine. Anyways this setup was cool & very helpful thanks (& you need it with Arch BTW 😝)
I hate to admit it, but I noticed a very big speed difference in pacman between btrfs and ext4. Some time ago I was setting up Arch on WSL, and it was just blazing fast. With BTRFS it is like 2-3x slower even when no snapshots are made and the FS is balanced.
Time shift is a lifesaver. At my previous job they let me use Arch and my computer shut down in the middle of an update and it screwed everything 😂 I ended up having to reinstall everything. That was the day I became diligent about using time shift
Exactly the reason why i just install Garuda since it has BTRFS and grub snapshots out of the box..snapshots with Arch is must for me, just in case something weird happens. I usually only update on the frist of the month as well.
These settings are great and you explained very well, but I want to say here there is one Linux OS which comes with all the setting to do the snapshot for your system out of the box. It is OpenSuse Tumbleweed. Great video though. Keep up the good work nerd.
I did that too. I had the terrible feeling of doom when I realized what I had done. However, I had backups for everything in my home directory. I had it completely restored in a few minutes, thank God!!
I prefer to use the cli for rollback, because GUIs can be unreliable (although I don't mind them). I mainly use this bundle: Snapper + grub-btrfs + snapper-rollback (which works for the recommended layout of the btrfs file system on Arch Linux) + snap-pac
FYI timeshift also has a terminal version. I've rolled by to a previous snapshot many times using it. It goes to show how many times I have screwed it up. Not so much any more.
Why not just set up a crontab for checking for new snapshots and updating GRUB? The easiest way to do this is if the timeshift --check command returns true in a root crontab, also update the grub-btrfs snapshot registry. No need for an additional service or some seedy package that's able to view the file system.
That was excellent, thank you. Does booting from a snapshot, restore the snapshot, so that the next time you reboot you can accept the grub default menu item?
Why would i schedule a daily snapshot if ive hooked up the 'take snapshot before update'? The only time ive ever broken my install was after an update. Also i used to update daily.
Just rewind to the checkpoint or snapshot that was created before doing the risky work. Gosh. Run Tieshift on btrfs and make hourly snapshots. Hell be fine, because he did these things. Other people who don't know will be 😭😭😭 crying.
Installed my Arch (BTW) in 2019 and broke it once with... you guess, partial upgrade. I don't remember for which (terrible) reason I interrupted a system upgrade. ... clonezilla saved my ass. It's been some time since I did a snapshot, it would probably be a good idea after I finish your video :)
@@donaldmickunas8552 : clonezilla works differently, you boot on a live USB and the utility let's you save/restore partitions to/from an external hard drive. So you can't automate it :)
I tried to test this system and got super confused. I setup new arch. Installed a bunch of soft like in vid, configured it. Finally when i wanted to test i snapshoted system without neofetch, and after installed it. I booted with my created snapshot but it still was there. I tried to do thing like that to understand why do snapshots changes with the main system but got nothing. At the end i got a problem that system couldnt mount my home dir for some reason. Still cant resolve it
@@ygvanz you need to NOT include home dir to snapshots because @home's id change every time u backup. Thats why system cant mount it. I got 1 more issue that after first backup u will be forced to use one of your snapshots. But what will happen if your snap will automatically deleted by for example limit of snaps? So i just switched to nixos
Hi, I ran in the same issue! Here is a little fix: - in emergency mode enter your password - open your fstab file with your prefered editor and delete the entries with "subvolid=xxx" - reboot I don't know if it's a clean solution, but it works for me. there is also the possibility to mount your /home directory manually: - in emergency mode enter your password - identify your Btrfs device-/partitionname with "lsblk -f" - mount your subvolume with "mount -o subvol=@home /dev/"your device- or partitionname" /home" I think it is because timeshift ID's are distributed and these are not included in the fstab file. For more details see also the command “btrfs subvolume list /mnt” first entries.
That will not work if your kernel update is generated on /boot partition on non Btrfs (e.g, an ESP). To recover from the previous snapshot, you should also have backup for /boot partition. Otherwise, you will have panic kernel after recovery.
Now after watching this video I have to wait until my system break after the update and I'll be wondering why I didn't do this thing right after watching it XD. Thanks nerd.
Oh... Then what are the options come when I press shift key while booting . it shows different kernal versions to boot from I through they are enough for the system. Please someone explain
Every time the kernel is updated on your system, the record of the previous version still exists on your system. That press shift while booting feature is probably provided by your computer manufacturer. It's purpose is for the rare chance that a new kernel doesn't work at intended. This makes it easier to change to an older kernel.
If you had time shift on that system, you could have used a live USB stick for something like Linux Mint which includes timeshift. Then use time shift to access the location where your snapshots were stored and have hit restore your system. Generally, timeshift will create a directory /timeshift automatically unless you specify somewhere else.
Imagine, I use Debian stable with btrfs format and timeshift. I can go back 20 different snaps during boot. After so many failures with many distros, I have settled with the Debian. I love all the distros of GNU/Linux but the Debian is the one for me.
This is a big reason why I'm not using Linux on Desktop. I want the latest packages, so Arch seems like a perfect choice, but the fact that a simple upgrade can break the OS is a huge no. On my home server is a different story, I don't need the latest software since most of it is using Docker so I use Debian and never worry about any of this. Immutable distros are the closest thing to my current setup (macOS), where the system is separate from the software installed.
Just saying and please correct me if I'm wrong grub not working properly with secure boot (I already tried to sign it with sbctl) so think twice before switching to grub. if anyone knows how to easily sign that grub font file please correct me.
@@danielemoncada65 no. You are booting on your default disk, but if smth breaks you boot with snapshot Ps. After restore you should be able to boot on default disk because it is overwrited(?) by snapshot
I use fedora and dnf never broke my system lol That's how you never break your arch install: Step 1: uninstall arch Step 2: install literally any other linux distro
Go to nordpass.com/typecraft and use code: "typecraft" to get a NordPass Business free 3-month free trial. No credit card is required!
Arch Linux is an RPG.
You bite the bullet and install it, despite your friends warning you that it's going to eat SO MUCH of your free time.
Your girlfriend is confused by it, but she's glad you're enjoying yourself...at least when you're not yelling at the screen.
Character creation is insane. You spend your first day customizing and don't actually do anything productive.
Your coworkers are tired of you talking about it. They run Ubuntu. Casuals.
Your boss is tired of losing productivity hours to it.
And, periodically, you fight a big boss called "Oh shoot, this update did something bad, I should have paid attention". Pretty sure that's a callback to a world boss in Guild Wars 2, but I could be wrong.
Haha funny man sorry to ask but do you happen to know any similar video to this but with debian instead ?
I use Mac OSX, I practically left RPG and went into a platformer, where I can still have fun but things just work lol
Great moment to just start using nixos and never have to worry again. And you also got to say "I use nixos btw"
I might have to!
@@typecraft_devit is soooooo much easier
"I use Arch btw" is original and better
I use Arch
@@typecraft_dev one of us one of us one of us one of us one of us one of us one of us
btw if you run something and you forget to add sudo you can run "sudo !!" and itll prepend sudo to your previous command and run it
only on bash or zsh! I really miss doing this on fish
@@rafaelmorales1926 can't you make it into a macro yourself?
@@rafaelmorales1926use the command fuck that fix the error in a command ran and it can fix forgetting sudo
This is probably my most used command lol
@@rafaelmorales1926
# Just put these into your fish config
# Functions needed for !! and !$
function bind_bang
switch (commandline -t)[-1]
case "!"
commandline -t -- $history[1]
commandline -f repaint
case "*"
commandline -i !
end
end
function bind_dollar
switch (commandline -t)[-1]
case "!"
commandline -f backward-delete-char history-token-search-backward
case "*"
commandline -i '$'
end
end
function fish_user_key_bindings
bind ! bind_bang
bind '$' bind_dollar
end
# Welcome
I was waiting for the "My solution was.... NixOS!":P
It’s the only real solution.
Mankind should not hold such power, we will be corrupted by the absolute power
Just switched from NixOS to Arch..
Just wanted to write the same comment.
Yeah same.
i prefer snapper over timeshift
also nice snap-pac pac-man hooks to automatically create snapper snapshots before and after doing pac-man operations
Thank you for the rabbit hole
@@driden1987 It really is a rabbit hole.
I realized that snapper works flawless on openSUSE and other distros have some problems with it, so I get why ppl use Timeshift instead of snapper.
Timeshift-autosnap does the same. I have automatic snapshots every time I do yay -Syu. What do you prefer about snapper? I’m a beginner Linux user and timeshift does all I need from it, so I’m curious what else is there.
You have a fantastic way of making something sound super exciting lol. Great video!
Small correction: At 16:38 you said grub-btrfsd picked up the change but in fact the grub reconfiguration here is done by the pacman hook from timeshift-autosnap. As you can see at 15:40 you have set updateGrub=true
ah, good catch!
B.T.R.F.S ❌
Baturfs ❌
ButterFS ✅
BetterFS 👑
Butt terfs
I switched to NixOS and it’s a breath of fresh air!
Damn I gotta look into this
@@typecraft_dev just fyi, you can also check out vimjoyer, he has really nice tutorials to help you get started
🤘Former Arch user here. Arch is super cool, but NixOS let's me be a mad scientist in a safe environment with Btrf and rollobacks out the box. Oddly enough the only Linux distro I ever broke was...wait for it...Debian stable.
Hah! I gotta try nix huh
@@typecraft_dev Yep. NixOS with Arch on a VM. Best of two great systems.
Amazing tutorial. That basically enables NixOS-like rollback capabilities on any Linux system. Great stuff!
Hey thanks!
Dude reinvented NixOS.
You just summoned nix army
arch and gnome = most underrated system - all aspects of cool prety stuff like osx etc but cooler - great with a iwm or something for zen like work environment! rate it !
Lots of people have already mentioned it, but last year I switched to NixOS after having broke my Arch install for the last time. There's a learning curve, it's quite different from any other Linux distro, but the benefits are absolutely worth it. And you can use it like a rolling release when you want the latest packages, or pin packages to specific versions when you want, you are in complete control.
Oh and one thing I might add, if you do look into NixOS, also look into a thing called Snowfall, which provides a set of conventions for writing your NixOS config, which is otherwise very open-ended which makes things a little harder to learn IMO, since you can organize your config into modules a thousand different ways and every other NixOS config you come across will be doing things its own way. I intend to rewrite my NixOS config using Snowfall lib at some point in the future.
“This will then start and update our Matt Daemon to start automatically.” 😂
Wow, I was also recently playing with grub-btrfs in my fedora. Helpful video.
Next video: "I Broke my grub bootloader..."
It has a really steep learning curve but nixos would solve this forever and give you magic sysadmin powers should you keep a pure config.
just fyi, `systemctl enable --now ` will enable and start the unit
Great time to try and start doing videos on nix 👍🏻
this is why you use templeOS (no complicated things)
Just curious do you use any of the redundancy features of BTRFS. I have mostly stayed away from BTRFS because of the write-hole bug but i guess if you strear clear of Raid 56 you should be fine. Anyways this setup was cool & very helpful thanks (& you need it with Arch BTW 😝)
You didn't explain about btrfs subvolumes, which is quite confusing to me atm, also do you need to have created the volymes during arch install?
I hate to admit it, but I noticed a very big speed difference in pacman between btrfs and ext4.
Some time ago I was setting up Arch on WSL, and it was just blazing fast.
With BTRFS it is like 2-3x slower even when no snapshots are made and the FS is balanced.
If your distro comes with timeshift preinstalled, you can just launch it from a boot USB and change your snapshot there.
Time shift is a lifesaver. At my previous job they let me use Arch and my computer shut down in the middle of an update and it screwed everything 😂 I ended up having to reinstall everything. That was the day I became diligent about using time shift
Exactly the reason why i just install Garuda since it has BTRFS and grub snapshots out of the box..snapshots with Arch is must for me, just in case something weird happens.
I usually only update on the frist of the month as well.
These settings are great and you explained very well, but I want to say here there is one Linux OS which comes with all the setting to do the snapshot for your system out of the box. It is OpenSuse Tumbleweed. Great video though. Keep up the good work nerd.
I still remember the day i did rm -rf on my home directory by accident
I keep my data on a root folder i personally created
That avoid my fucking up my home dir and losing all data
I did that too. I had the terrible feeling of doom when I realized what I had done. However, I had backups for everything in my home directory. I had it completely restored in a few minutes, thank God!!
Could be worse... try /etc lol.
The more control you have - the easier it's to step on your own tail. That's especially true with Arch.
i'm gonna listen to this while doing homework
I prefer to use the cli for rollback, because GUIs can be unreliable (although I don't mind them). I mainly use this bundle: Snapper + grub-btrfs + snapper-rollback (which works for the recommended layout of the btrfs file system on Arch Linux) + snap-pac
FYI timeshift also has a terminal version. I've rolled by to a previous snapshot many times using it. It goes to show how many times I have screwed it up. Not so much any more.
Why not just set up a crontab for checking for new snapshots and updating GRUB?
The easiest way to do this is if the timeshift --check command returns true in a root crontab, also update the grub-btrfs snapshot registry. No need for an additional service or some seedy package that's able to view the file system.
this is great, tanks mate!
I was so excited when I saw the title, but meh, its just about snapper. Thought I'd see some troubleshooting
That was excellent, thank you.
Does booting from a snapshot, restore the snapshot, so that the next time you reboot you can accept the grub default menu item?
Why would i schedule a daily snapshot if ive hooked up the 'take snapshot before update'? The only time ive ever broken my install was after an update. Also i used to update daily.
Just rewind to the checkpoint or snapshot that was created before doing the risky work. Gosh. Run Tieshift on btrfs and make hourly snapshots. Hell be fine, because he did these things. Other people who don't know will be 😭😭😭 crying.
Installed my Arch (BTW) in 2019 and broke it once with... you guess, partial upgrade. I don't remember for which (terrible) reason I interrupted a system upgrade.
... clonezilla saved my ass.
It's been some time since I did a snapshot, it would probably be a good idea after I finish your video :)
nice!
You might set up a cronjob so that. Let take a snapshot weekly or whatever.
@@donaldmickunas8552 : clonezilla works differently, you boot on a live USB and the utility let's you save/restore partitions to/from an external hard drive.
So you can't automate it :)
I tried to test this system and got super confused.
I setup new arch. Installed a bunch of soft like in vid, configured it. Finally when i wanted to test i snapshoted system without neofetch, and after installed it. I booted with my created snapshot but it still was there. I tried to do thing like that to understand why do snapshots changes with the main system but got nothing. At the end i got a problem that system couldnt mount my home dir for some reason. Still cant resolve it
Ran into the same issue. Had to reinstall Arch again...
@@ygvanz you need to NOT include home dir to snapshots because @home's id change every time u backup. Thats why system cant mount it.
I got 1 more issue that after first backup u will be forced to use one of your snapshots. But what will happen if your snap will automatically deleted by for example limit of snaps?
So i just switched to nixos
Hi, I ran in the same issue! Here is a little fix:
- in emergency mode enter your password
- open your fstab file with your prefered editor and delete the entries with "subvolid=xxx"
- reboot
I don't know if it's a clean solution, but it works for me.
there is also the possibility to mount your /home directory manually:
- in emergency mode enter your password
- identify your Btrfs device-/partitionname with "lsblk -f"
- mount your subvolume with "mount -o subvol=@home /dev/"your device- or partitionname" /home"
I think it is because timeshift ID's are distributed and these are not included in the fstab file. For more details see also the command “btrfs subvolume list /mnt” first entries.
Great content!
thanks!
zfs is still the elegant solution
Interestingly, OpenSUSE implements this configuration perfectly when you select a BTRFS installation.
First time? Welcome to Arch.
god damn you just amazing AF thx for the useful info
No YOU ARE
I also write everytime when I'm using pacman... yay😉
That will not work if your kernel update is generated on /boot partition on non Btrfs (e.g, an ESP). To recover from the previous snapshot, you should also have backup for /boot partition. Otherwise, you will have panic kernel after recovery.
Now after watching this video I have to wait until my system break after the update and I'll be wondering why I didn't do this thing right after watching it XD. Thanks nerd.
I actually prefer Yabsnap, its much simpler and better than any other alternative.
Oh... Then what are the options come when I press shift key while booting . it shows different kernal versions to boot from I through they are enough for the system. Please someone explain
Every time the kernel is updated on your system, the record of the previous version still exists on your system. That press shift while booting feature is probably provided by your computer manufacturer. It's purpose is for the rare chance that a new kernel doesn't work at intended. This makes it easier to change to an older kernel.
@@donaldmickunas8552 appreciate man. But shift key thing isn't from computer manufacturer, it is from grub
You have alerted the NixOS crowd
Time shift will work with ext4 too
YES, but it uses rsync instead of the built in btrfs stuff. But yes of course
time to switch into nixos
omg. so many of these comments. haha
@@typecraft_dev btw, u can achieve auto snap using this packages "timeshift-bin timeshift-autosnap" easily
You could give NixOS a try btw... :D
Yet another day that's pushing me towards nix.
Garuda Linux does all of this for you out of the box. The only difference is that their version uses Snapper.
Finally I won't need to carry archiso usb everywhere
I remember when I broke something and all I had was a black screen. Nothing else. Had to re install it again
If you had time shift on that system, you could have used a live USB stick for something like Linux Mint which includes timeshift. Then use time shift to access the location where your snapshots were stored and have hit restore your system.
Generally, timeshift will create a directory /timeshift automatically unless you specify somewhere else.
@@donaldmickunas8552cant you chroot into arch and use timeshift from there?
Great, thanks
You didn't show us how to boot a pervious snapshot
Better Tree File System, but Baterfs works too 😂
Wao
Just like any arch linux user.
Imagine, I use Debian stable with btrfs format and timeshift. I can go back 20 different snaps during boot. After so many failures with many distros, I have settled with the Debian. I love all the distros of GNU/Linux but the Debian is the one for me.
What happens if you don't have enough disk space to a create a 4GB snapshot each time you install/update a package?
It is not 4gb each snapshot. Lots get cached and it’s only mb after that
@@typecraft_dev Thanks for clarifying that to me. For a moment, I was scared I'll need to use all of my hard drive in backups to use this method.
@@souvlaki42its limit by default is 3. So even if they are 4g each its not so much
Why were you doing partial upgrade?
rookie move
pacman < portage
My arch install has not broken yet - touch wood
I had the same fear when I was using Arch. That's why I switched to another Distribution. I wanted more stability.
Back In Time
Honestly this is half the reason I use Garuda. having the ability to load snapshots from grub already set up from the jump is awesome.
Ruby on Rails NVIM Configuration series when?
Come to our workshop next week! learn.typecraft.dev/neovim-and-zellij-ruby-on-rails-edition/
@@typecraft_dev It was great talking with you today on your stream. I'll try to make it!
Arch btw. I still remember the first time my system crashed during pacman -Syu..... Took me 2 days to recover
i use restic just for its performance and repo like approach
everybody's gansta until "I broke my arch install...", no offense tho, why gnome?
I use Debian btw (yes never breaks)
Can anyone catch the text that appears at 8:42? Even going frame by frame, I am only catching a couple of letters.
Systemd boot ftw
systemd boot is pretty good but not as feature rich as grub
Spectacular.
was exploring this while back but it kind of take space, i maybe wrong
I love and use Arch like crazy. The comments are terrifying 😮 Am I gonna break my system? I literally update at least 2 times a week
I use Arch BTW! and i will die by it. LUL
This is a big reason why I'm not using Linux on Desktop. I want the latest packages, so Arch seems like a perfect choice, but the fact that a simple upgrade can break the OS is a huge no.
On my home server is a different story, I don't need the latest software since most of it is using Docker so I use Debian and never worry about any of this.
Immutable distros are the closest thing to my current setup (macOS), where the system is separate from the software installed.
NixOS is for you
@@vincentnthomas1 would you recommend Fedora too? It seems like a good middle ground
its a problem with partial upgrades, for me using endeavourOS for months and never had update issues, mb it can have, but so far so good.
@@vincentnthomas1 I might have to try it.
Bro PLEASE make a btrfs tuto for arch I don't understand it 😢
hehe, what ever to use but NixOs
Windows 11 Pro WSL2 Ubuntu workstation.... Linux Mint 22 on server... Life is to short...
the solution to avoid breaking arch is to use NixOS btw.
Just saying and please correct me if I'm wrong grub not working properly with secure boot (I already tried to sign it with sbctl) so think twice before switching to grub. if anyone knows how to easily sign that grub font file please correct me.
Hey I broke mine to, about a 1000 times.
Haha
I broke my 3 year old Arch by the way, and I'm an idiot, so don't feel too bad!
Bro summoned the whole Nix cult with just 5 words damn
Lol
Why not just not do a partial upgrade...?
But how can I restore my system after reboot it from a snapshot?
It IS your restore point
@@liteflow10 you mean i Need to reboot my system from that Snapshot Forever(?),
@@danielemoncada65 no. You are booting on your default disk, but if smth breaks you boot with snapshot
Ps. After restore you should be able to boot on default disk because it is overwrited(?) by snapshot
@@liteflow10 so if something brake the system, booting from a snapshot, btrfs overwrite that snapshot on the default disk automatically?
Its breaking my home directory. Looking for fixes@@danielemoncada65
what browser is that
zen! I made a video on it
@@typecraft_dev Thanks! Ill cheack it out!
@@typecraft_dev Amazing thanks! i watched to video and tryd it out, this is going to be perfect for my hyprland setup!
I use fedora and dnf never broke my system lol
That's how you never break your arch install:
Step 1: uninstall arch
Step 2: install literally any other linux distro
lol
if you dont break your system at least once are you a real (arch)linux user?
nix solves that
Use Gentoo!
Shame you don't have nix flakes. It's declarative....btw.
bro i have been using fedora on my old notebook for 10 years now, my system never broke
ah yes, nix with extra steps