I've just successfully followed your guide (the written one), and I have to say, that was one of the best guides I've read. Easy to follow, well written and to the point. Thanks a lot!
I saw the written guide and had to stop by to subscribe and ring the bell, thank you so much for the detailed written instructions. I tested it on a VM and it worked great, I'll be doing this on my notebook very soon. Thanks again!
Wow such attention to detail in your guide both in the video and online. I have been struggling with Fedora 38 - Sway with Nvidia and have had to reinstall multiple times and recreate (from memory) my configs and such... very painful. I followed your guide line by line and it works wonderfully. You have my heart-felt gratitude and sub + notification.
Thank you Madhu, this is the ultimate guide. I am now a lifetime subscriber to you, given your fine attention to detail and documenting every step in notes and explaining things no one else does. It beats squinting to see tiny text on a screen where other creators babble when they should be explaining as they type at high speed. You have won me, even the AI voice with the inserted errrrs ;)
Not that I'm going to implement btrfs snapshots, but watched with much pleasure, you did a great job! A very well-made, interesting and easy to comprehend video.
@@SysGuidesDo you know if an upgrade from Fedora 39 to 40 will break this installation? Apparently you can upgrade versions via dnf (if I’m not mistaken)
@@EvilCob When Fedora 40 becomes available, you can easily upgrade to it. There will be absolutely no problem. Check out my blog post (near the end) on how to upgrade. Link: sysguides.com/install-fedora-with-snapshot-and-rollback-support
Hi, nice tutorial, just a question regarding all those subvolumes.. I've watched a few other guides and they usually just stick with @ for root and @home, is there a reason why you add all of those, coming from POPOS using EXT4, BTRFS is very new to me. Never mind.. I see someone else asked a very similar question below which you've answered.... cheers
Unlike other distributions, Fedora stores its package database in two locations: /usr (/usr/lib/sysimage/rpm) and /var (/var/lib/dnf). So you must keep /var for rollback and only exclude those that are not required. Hopefully, this will be resolved once DNF5 is released.
Madhu, at 27:59 the Snapshot submenu does not show on the Grub menu your tutorial, just like mine. So the only way to rollback is through Snapper. Can you make your tutorial complete?
The grub-btrfs menu does not appear because the snapper script has not yet created any snapshots. Install any package with the dnf command or create a snapshot manually with the snapper command, and the grub-btrfs menu will appear automatically.
@@SysGuides Not the grub-btrfs menu, I am referring to the snapshots submenu not appearing on the GRUB menu. I am using Btrfs-Assistant GUI for now and it's author said it may be due to your setup not using a separate EXT4 boot partition and instead, including the boot partition in the Btrfs system root. Hence the Error loader: sparse file not allowed and you overrode it in grub2-editenv.
Hi, thank you for this amazing tutorial . I'm happy to install Fedora 40 Kde Plasma. 😊 I have a question; since I’m installing the kde version, do I need to change anything about the subvolumes? In your video I rightly see var/lib/gdm but kde uses sddm. Can you help me with this? Thank you 😊
First, congratulations on the tutorial, even for me who is migrating to Linux, I managed to understand most things. I have a question, if I install Fedora following your tutorial, but put the home on a HD and the operating system on an SSD, what would be the steps I need to do differently?
On the SSD, create an EFI partition and mount it in /boot/efi. Then, create a BTRFS volume and mount it on '/'. In HD, create a btrfs volume and mount it as '/home' (just like you did for btrfs volume in '/'). After installation is complete, create separate subvolumes for '/' and '/home'. For example, if you want to create opt subvolume in /, issue command like this: sudo btrfs subvolume create /opt To create .mozilla subvolume in /home, issue command like this: sudo btrfs subvolume create /home/$USER/.mozilla Make sure the UUIDs are unique for each btrfs subvolumes in /etc/fstab. To list subvolumes in /, issue the command sudo btrfs subvolume list / To list subvolumes in /home, issue the command sudo btrfs subvolume list /home There may be other changes as well, so it's best to try it in a virtual machine first.
@@SysGuides Did the commands to create additional volumes remain the same as those in your article? As I don't program, I'm unsure if I need to make any changes to your article? What subvolumes should I create for '/' and '/home'? This set of commands are in the article, but I imagine they cannot be created this way. $SUBVOLUMES=( "opt" "var/cache" "var/crash" "var/log" "var/spool" "var/tmp" "var/www" "var/lib/AccountsService" "var/lib/gdm" "var/lib/libvirt/images" "home/$USER/.mozilla" )
Yes, you cannot use the script as is. Remove the 'home' wherever it is in the script and create it separately. In section 3, you need to make these changes: Set the OPTIONS variable manually: OPTIONS="compress=zstd:1" Remove home from the SUBVOLUMES array: SUBVOLUMES=( "opt" "var/cache" "var/crash" "var/log" "var/spool" "var/tmp" "var/www" "var/lib/AccountsService" "var/lib/gdm" "var/lib/libvirt/images" ) Then rest are same. Next create subvolumes for home: Get /home UUID: HOME_UUID="$(sudo grub2-probe --target=fs_uuid /home)" Create SUBVOLUMES2 array and put any subvolumes you want in /home: SUBVOLUMES2=( "$USER/.mozilla" ) And run the modified script: for dir in "${SUBVOLUMES2[@]}" ; do if [[ -d "/home/${dir}" ]] ; then sudo mv -v "/home/${dir}" "/home/${dir}-old" sudo btrfs subvolume create "/home/${dir}" sudo cp -ar "/home/${dir}-old/." "/home/${dir}/" else sudo btrfs subvolume create "/home/${dir}" fi sudo restorecon -RF "/home/${dir}" printf "%-41s %-24s %-5s %-s %-s " \ "UUID=${HOME_UUID}" \ "/home/${dir}" \ "btrfs" \ "subvol=${dir},${OPTIONS}" \ "0 0" | \ sudo tee -a /etc/fstab sudo chown -R $USER: /home/${dir} done sudo systemctl daemon-reload sudo mount -va Rest is all sould be same. Just make sure UUIDs are different for / and /home subvolumes. Try all this first in virtual machine.
I want to install Fedora KDE 38. I currently have Fedora KDE 36 installed. I want to manually create the partitions. I do not want to delete any of the current partitions, just the installation of Fedora 36 itself. How can I manually make that the new Fedora 38 uses the older Home , Swap and EFI partitions? Also I'm considering using encryption but before using it want to know how much is raw performance on pretty much any task you can imagine affected by everything being encrypted on disk? I also have NTFS external HDD. How can I make it stop asking for password every time I click on the partition after a fresh boot of the OS? Thank you!
If you want to upgrade your Fedora OS without affecting the filesystem structure, follow this link docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/. Execute the commands listed in the 'Performing system upgrade' section. You will successfully upgrade to Fedora 38. When it comes to LUKS, newer Intel processors support dm-crypt (AES encryption) and are hardware accelerated. So, there will be far less overhead. You should be fine as long as your LUKS is set to use AES, which is the default (aes-xts [512b]), and your processor supports it. Check to see if your processor supports aes. $ grep 'aes' /proc/cpuinfo Check that your kernel also supports it. $ grep 'xts.*aes' /proc/crypto Benchmarks ciphers for encryption and decryption speeds. The default for LUKS is aes-xts algorithm with 512b bit key. $ sudo cryptsetup benchmark Then check your disk speed without encryption/decryption and compare. The values are approximate. Replace /dev/vda2 with your system root partition. $ sudo hdparm -t /dev/vda2 Regarding your external HDD, I'm not sure; perhaps adding the following command will help, but I haven't checked. $ sudo usermod -aG disk $USER
Yes. So that it is part of the root file system. When you undo changes or rollback, you will also undo the contents of the /boot directory. If /boot is in a separate partition, an undo or rollback will result in a mismatch.
Do you have a video that teaches you how to leave the folder of files such as documents, music and videos on another hard drive, in this case you would install the system on the SSD and the documents and automatic downloads would be saved on the mechanical hard drive
Because the installer does not allow you to create subvolumes with names like '/var/log'. You must name the subvolume 'log' and the mount point '/var/log'. This will create two directories, one named '/log' and the other '/var/log'. They will both be clones.
You certainly can. Because you already have Windows 11 installed, the EFI partition will already be created for you. So, you do not need to create or format the EFI partition. However, in order to install Fedora, you will need to create a separate Linux partition (code: 8300). To install Fedora, simply replace /dev/vda1 with your EFI partition and /dev/vda2 with the Linux partition you created and formatted using the btrfs file system in the video guide.
@@cristianinujazznight3044 Other directories can be converted without difficulty from subvolumes to main volume. This is not the case for the system root (/). I suppose you'll have to reinstall. I recommend first installing in a virtual machine step by step using this video tutorial and the accompanying text version, the URL of which I've included in the description.
@@pczeczora Does your motherboard support EFI? What method did you use to create Fedora installation media? If you're using Linux and a USB flash drive to create installation media, run this command and try again. # dd if= of= bs=4M conv=fdatasync status=progress If you're using Windows, try Rufus.
@@SysGuides yes my MB support EFI. Im new to linux and thats why i need some app to rollback system. Ive got set virtual disk on VM to install from USB and used Rufus and many other app and on install progress i cant choose EFI sys part.
@@pczeczora I haven't used VMware Workstation, but from what I've read, EFI isn't enabled by default for some odd reason. Try this link and see if it helps. www.fosstools.net/how-to-enable-uefi-in-vmware-workstation-player
Can't you just use the stock standard fedora subvolumes of home and root and then just create snapshots and rollback manually with the native commands ? All this additional work seems really tiresome
You can manually create and roll back snapshots, but this will be tricky for beginners. The steps below, while intended for Arch Linux, are also applicable to Fedora Linux. wiki.archlinux.org/title/snapper#Restoring_/_to_its_previous_snapshot I'm working on it, though. As of now, successfully rolling back from the grub-btrfs boot menu is tricky.
What do you mean? This is all I do, no snapper or timeshift just standard barebones btrfs, mv and mount commands. # 1. Create a Directory for Snapshots sudo mkdir /snapshots # 2. Create Snapshots of / and /home Subvolumes sudo btrfs subvolume snapshot / /snapshots/root_snapshot sudo btrfs subvolume snapshot /home /snapshots/home_snapshot # 3. Simulate Disaster Recovery Scenario (Optional) sudo rm /etc/fstab # 4. Boot into a Live ISO via GRUB # - Reboot the system. # - During boot, press the appropriate key to enter the GRUB menu. # - Select the live ISO option from the GRUB menu and boot into it. # 5. Mount the Root Filesystem # Replace /dev/sdX# with the correct partition sudo mount -t btrfs -o subvolid=5 /dev/sdX# /mnt # 6. Restore Root and Home Subvolumes sudo mv /mnt/root /mnt/root_backup sudo mv /mnt/home /mnt/home_backup sudo mv /mnt/snapshots/root_snapshot /mnt/root sudo mv /mnt/snapshots/home_snapshot /mnt/home # 7. Unmount and Reboot sudo umount /mnt sudo reboot
I've just successfully followed your guide (the written one), and I have to say, that was one of the best guides I've read. Easy to follow, well written and to the point. Thanks a lot!
Great to hear! I’m so glad it was helpful!
I saw the written guide and had to stop by to subscribe and ring the bell, thank you so much for the detailed written instructions. I tested it on a VM and it worked great, I'll be doing this on my notebook very soon. Thanks again!
You are most welcome. And thank you for subscribing!
Wow such attention to detail in your guide both in the video and online. I have been struggling with Fedora 38 - Sway with Nvidia and have had to reinstall multiple times and recreate (from memory) my configs and such... very painful. I followed your guide line by line and it works wonderfully. You have my heart-felt gratitude and sub + notification.
Great to hear! I'm glad you liked it.
Thank you Madhu, this is the ultimate guide. I am now a lifetime subscriber to you, given your fine attention to detail and documenting every step in notes and explaining things no one else does. It beats squinting to see tiny text on a screen where other creators babble when they should be explaining as they type at high speed. You have won me, even the AI voice with the inserted errrrs ;)
Thank you so much 🙂
Not that I'm going to implement btrfs snapshots, but watched with much pleasure, you did a great job! A very well-made, interesting and easy to comprehend video.
Many thanks!
This should be default install for fedora!!!
I rarely comment on videos but I would like to thank you for the detailed guide ;)
You’re most welcome. I'm glad it was helpful!
First time ever done this kind of installation.. It was intense.. Everything works 👍
Great to hear!
@@SysGuidesDo you know if an upgrade from Fedora 39 to 40 will break this installation? Apparently you can upgrade versions via dnf (if I’m not mistaken)
@@EvilCob When Fedora 40 becomes available, you can easily upgrade to it. There will be absolutely no problem. Check out my blog post (near the end) on how to upgrade.
Link: sysguides.com/install-fedora-with-snapshot-and-rollback-support
@@SysGuides thank you so much 👍👍
Hi, nice tutorial, just a question regarding all those subvolumes.. I've watched a few other guides and they usually just stick with @ for root and @home, is there a reason why you add all of those, coming from POPOS using EXT4, BTRFS is very new to me.
Never mind.. I see someone else asked a very similar question below which you've answered.... cheers
Unlike other distributions, Fedora stores its package database in two locations: /usr (/usr/lib/sysimage/rpm) and /var (/var/lib/dnf). So you must keep /var for rollback and only exclude those that are not required. Hopefully, this will be resolved once DNF5 is released.
Madhu, at 27:59 the Snapshot submenu does not show on the Grub menu your tutorial, just like mine. So the only way to rollback is through Snapper. Can you make your tutorial complete?
The grub-btrfs menu does not appear because the snapper script has not yet created any snapshots. Install any package with the dnf command or create a snapshot manually with the snapper command, and the grub-btrfs menu will appear automatically.
@@SysGuides Not the grub-btrfs menu, I am referring to the snapshots submenu not appearing on the GRUB menu. I am using Btrfs-Assistant GUI for now and it's author said it may be due to your setup not using a separate EXT4 boot partition and instead, including the boot partition in the Btrfs system root. Hence the Error loader: sparse file not allowed and you overrode it in grub2-editenv.
Hi, thank you for this amazing tutorial . I'm happy to install Fedora 40 Kde Plasma. 😊 I have a question; since I’m installing the kde version, do I need to change anything about the subvolumes? In your video I rightly see var/lib/gdm but kde uses sddm. Can you help me with this? Thank you 😊
Simply replace 'var/lib/gdm' with 'var/lib/sddm'. You don't need to change anything else.
Thanks a lot 😊 I'm going to install it 😁
Is there any reason to do this since fedora ships with btrfs default? Just curious if I should watch this to install or go default.
First, congratulations on the tutorial, even for me who is migrating to Linux, I managed to understand most things.
I have a question, if I install Fedora following your tutorial, but put the home on a HD and the operating system on an SSD, what would be the steps I need to do differently?
On the SSD, create an EFI partition and mount it in /boot/efi. Then, create a BTRFS volume and mount it on '/'. In HD, create a btrfs volume and mount it as '/home' (just like you did for btrfs volume in '/').
After installation is complete, create separate subvolumes for '/' and '/home'.
For example, if you want to create opt subvolume in /, issue command like this:
sudo btrfs subvolume create /opt
To create .mozilla subvolume in /home, issue command like this:
sudo btrfs subvolume create /home/$USER/.mozilla
Make sure the UUIDs are unique for each btrfs subvolumes in /etc/fstab.
To list subvolumes in /, issue the command
sudo btrfs subvolume list /
To list subvolumes in /home, issue the command
sudo btrfs subvolume list /home
There may be other changes as well, so it's best to try it in a virtual machine first.
@@SysGuides Did the commands to create additional volumes remain the same as those in your article?
As I don't program, I'm unsure if I need to make any changes to your article?
What subvolumes should I create for '/' and '/home'?
This set of commands are in the article, but I imagine they cannot be created this way.
$SUBVOLUMES=(
"opt"
"var/cache"
"var/crash"
"var/log"
"var/spool"
"var/tmp"
"var/www"
"var/lib/AccountsService"
"var/lib/gdm"
"var/lib/libvirt/images"
"home/$USER/.mozilla"
)
Yes, you cannot use the script as is. Remove the 'home' wherever it is in the script and create it separately.
In section 3, you need to make these changes:
Set the OPTIONS variable manually:
OPTIONS="compress=zstd:1"
Remove home from the SUBVOLUMES array:
SUBVOLUMES=(
"opt"
"var/cache"
"var/crash"
"var/log"
"var/spool"
"var/tmp"
"var/www"
"var/lib/AccountsService"
"var/lib/gdm"
"var/lib/libvirt/images"
)
Then rest are same.
Next create subvolumes for home:
Get /home UUID:
HOME_UUID="$(sudo grub2-probe --target=fs_uuid /home)"
Create SUBVOLUMES2 array and put any subvolumes you want in /home:
SUBVOLUMES2=(
"$USER/.mozilla"
)
And run the modified script:
for dir in "${SUBVOLUMES2[@]}" ; do
if [[ -d "/home/${dir}" ]] ; then
sudo mv -v "/home/${dir}" "/home/${dir}-old"
sudo btrfs subvolume create "/home/${dir}"
sudo cp -ar "/home/${dir}-old/." "/home/${dir}/"
else
sudo btrfs subvolume create "/home/${dir}"
fi
sudo restorecon -RF "/home/${dir}"
printf "%-41s %-24s %-5s %-s %-s
" \
"UUID=${HOME_UUID}" \
"/home/${dir}" \
"btrfs" \
"subvol=${dir},${OPTIONS}" \
"0 0" | \
sudo tee -a /etc/fstab
sudo chown -R $USER: /home/${dir}
done
sudo systemctl daemon-reload
sudo mount -va
Rest is all sould be same. Just make sure UUIDs are different for / and /home subvolumes.
Try all this first in virtual machine.
@@SysGuides Thanks
I want to install Fedora KDE 38. I currently have Fedora KDE 36 installed. I want to manually create the partitions. I do not want to delete any of the current partitions, just the installation of Fedora 36 itself.
How can I manually make that the new Fedora 38 uses the older Home , Swap and EFI partitions?
Also I'm considering using encryption but before using it want to know how much is raw performance on pretty much any task you can imagine affected by everything being encrypted on disk?
I also have NTFS external HDD. How can I make it stop asking for password every time I click on the partition after a fresh boot of the OS?
Thank you!
If you want to upgrade your Fedora OS without affecting the filesystem structure, follow this link docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/.
Execute the commands listed in the 'Performing system upgrade' section. You will successfully upgrade to Fedora 38.
When it comes to LUKS, newer Intel processors support dm-crypt (AES encryption) and are hardware accelerated. So, there will be far less overhead. You should be fine as long as your LUKS is set to use AES, which is the default (aes-xts [512b]), and your processor supports it.
Check to see if your processor supports aes.
$ grep 'aes' /proc/cpuinfo
Check that your kernel also supports it.
$ grep 'xts.*aes' /proc/crypto
Benchmarks ciphers for encryption and decryption speeds. The default for LUKS is aes-xts algorithm with 512b bit key.
$ sudo cryptsetup benchmark
Then check your disk speed without encryption/decryption and compare. The values are approximate. Replace /dev/vda2 with your system root partition.
$ sudo hdparm -t /dev/vda2
Regarding your external HDD, I'm not sure; perhaps adding the following command will help, but I haven't checked.
$ sudo usermod -aG disk $USER
Is there a reason behind not creating a ext4 /boot partition?
Yes. So that it is part of the root file system. When you undo changes or rollback, you will also undo the contents of the /boot directory. If /boot is in a separate partition, an undo or rollback will result in a mismatch.
@@SysGuides Thank you!
19:40 The initial state of my /etc/updatedb.conf file is empty, there is no "PRUNEFS" and "PRUNEPATHS" as in the video, is that okay?
Yes, as long as you have the 'mlocate' package installed.
Do you have a video that teaches you how to leave the folder of files such as documents, music and videos on another hard drive, in this case you would install the system on the SSD and the documents and automatic downloads would be saved on the mechanical hard drive
No, I haven't.
Why not create all the subvolumes during the install ?
Because the installer does not allow you to create subvolumes with names like '/var/log'. You must name the subvolume 'log' and the mount point '/var/log'. This will create two directories, one named '/log' and the other '/var/log'. They will both be clones.
Brother I’ve got windows 11 installed on a partition with bitlocker turned off, should I follow this guide as it is?
You certainly can. Because you already have Windows 11 installed, the EFI partition will already be created for you. So, you do not need to create or format the EFI partition. However, in order to install Fedora, you will need to create a separate Linux partition (code: 8300). To install Fedora, simply replace /dev/vda1 with your EFI partition and /dev/vda2 with the Linux partition you created and formatted using the btrfs file system in the video guide.
Trying to install fedora with btrfs, if I add the SUSE thing to grub, after that, the system don't want to boot.
Have you made the system root a main or subvolume? The system root must be the main volume.
@@SysGuides Ohh, how I can made this ?
@@cristianinujazznight3044 Other directories can be converted without difficulty from subvolumes to main volume. This is not the case for the system root (/). I suppose you'll have to reinstall. I recommend first installing in a virtual machine step by step using this video tutorial and the accompanying text version, the URL of which I've included in the description.
@@SysGuides sudo btrfs su set-def 270 / or btrfs subvolume create / ?
Make a video on Arch Linux and snapper configuration
i dont have EFI system partion like U on install process (im trying install on VMware)
You must boot from your Fedora installation media in UEFI mode.
@@SysGuides i did and still no options to choose
@@pczeczora Does your motherboard support EFI? What method did you use to create Fedora installation media?
If you're using Linux and a USB flash drive to create installation media, run this command and try again.
# dd if= of= bs=4M conv=fdatasync status=progress
If you're using Windows, try Rufus.
@@SysGuides yes my MB support EFI. Im new to linux and thats why i need some app to rollback system. Ive got set virtual disk on VM to install from USB and used Rufus and many other app and on install progress i cant choose EFI sys part.
@@pczeczora I haven't used VMware Workstation, but from what I've read, EFI isn't enabled by default for some odd reason. Try this link and see if it helps. www.fosstools.net/how-to-enable-uefi-in-vmware-workstation-player
Can this also work on arch Linux ?
Nope.
Can't you just use the stock standard fedora subvolumes of home and root and then just create snapshots and rollback manually with the native commands ?
All this additional work seems really tiresome
You can manually create and roll back snapshots, but this will be tricky for beginners. The steps below, while intended for Arch Linux, are also applicable to Fedora Linux.
wiki.archlinux.org/title/snapper#Restoring_/_to_its_previous_snapshot
I'm working on it, though. As of now, successfully rolling back from the grub-btrfs boot menu is tricky.
What do you mean?
This is all I do, no snapper or timeshift just standard barebones btrfs, mv and mount commands.
# 1. Create a Directory for Snapshots
sudo mkdir /snapshots
# 2. Create Snapshots of / and /home Subvolumes
sudo btrfs subvolume snapshot / /snapshots/root_snapshot
sudo btrfs subvolume snapshot /home /snapshots/home_snapshot
# 3. Simulate Disaster Recovery Scenario (Optional)
sudo rm /etc/fstab
# 4. Boot into a Live ISO via GRUB
# - Reboot the system.
# - During boot, press the appropriate key to enter the GRUB menu.
# - Select the live ISO option from the GRUB menu and boot into it.
# 5. Mount the Root Filesystem
# Replace /dev/sdX# with the correct partition
sudo mount -t btrfs -o subvolid=5 /dev/sdX# /mnt
# 6. Restore Root and Home Subvolumes
sudo mv /mnt/root /mnt/root_backup
sudo mv /mnt/home /mnt/home_backup
sudo mv /mnt/snapshots/root_snapshot /mnt/root
sudo mv /mnt/snapshots/home_snapshot /mnt/home
# 7. Unmount and Reboot
sudo umount /mnt
sudo reboot
If this is not default in Fedora, people will migrate away from it due to very unpleasant experiences (ie data loss)….IMPT***