Install Fedora with Btrfs + Snapper + Grub-Btrfs (100% WORKING)

Поділитися
Вставка
  • Опубліковано 10 гру 2024

КОМЕНТАРІ • 64

  • @therealgiant
    @therealgiant 10 місяців тому +3

    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!

    • @SysGuides
      @SysGuides  10 місяців тому +1

      Great to hear! I’m so glad it was helpful!

  • @ustrucx
    @ustrucx 9 місяців тому +1

    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!

    • @SysGuides
      @SysGuides  9 місяців тому +1

      You are most welcome. And thank you for subscribing!

  • @AlexChavezHome
    @AlexChavezHome Рік тому +5

    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.

    • @SysGuides
      @SysGuides  Рік тому +1

      Great to hear! I'm glad you liked it.

  • @MichaelSharpTechniSmart
    @MichaelSharpTechniSmart Рік тому +1

    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 ;)

  • @comesignotus9888
    @comesignotus9888 Рік тому

    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.

  • @rodfer5406
    @rodfer5406 11 місяців тому +9

    This should be default install for fedora!!!

  • @XlopPS2
    @XlopPS2 9 місяців тому

    I rarely comment on videos but I would like to thank you for the detailed guide ;)

    • @SysGuides
      @SysGuides  9 місяців тому

      You’re most welcome. I'm glad it was helpful!

  • @EvilCob
    @EvilCob 8 місяців тому

    First time ever done this kind of installation.. It was intense.. Everything works 👍

    • @SysGuides
      @SysGuides  8 місяців тому

      Great to hear!

    • @EvilCob
      @EvilCob 8 місяців тому

      @@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)

    • @SysGuides
      @SysGuides  8 місяців тому

      @@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

    • @EvilCob
      @EvilCob 8 місяців тому

      @@SysGuides thank you so much 👍👍

  • @jasonwood3949
    @jasonwood3949 7 місяців тому

    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

    • @SysGuides
      @SysGuides  7 місяців тому

      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.

  • @MichaelSharpTechniSmart
    @MichaelSharpTechniSmart 9 місяців тому

    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?

    • @SysGuides
      @SysGuides  9 місяців тому

      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.

    • @MichaelSharpTechniSmart
      @MichaelSharpTechniSmart 8 місяців тому

      @@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.

  • @TimFantasy
    @TimFantasy 7 місяців тому

    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 😊

    • @SysGuides
      @SysGuides  7 місяців тому +1

      Simply replace 'var/lib/gdm' with 'var/lib/sddm'. You don't need to change anything else.

    • @TimFantasy
      @TimFantasy 7 місяців тому

      Thanks a lot 😊 I'm going to install it 😁

  • @metl7734
    @metl7734 6 місяців тому

    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.

  • @renatowessmer9641
    @renatowessmer9641 11 місяців тому

    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?

    • @SysGuides
      @SysGuides  10 місяців тому

      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.

    • @renatowessmer9641
      @renatowessmer9641 10 місяців тому

      @@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"
      )

    • @SysGuides
      @SysGuides  10 місяців тому

      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.

    • @renatowessmer9641
      @renatowessmer9641 10 місяців тому

      @@SysGuides Thanks

  • @encapsulatio
    @encapsulatio Рік тому +1

    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!

    • @SysGuides
      @SysGuides  Рік тому

      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

  • @RKRK-e5f
    @RKRK-e5f 7 місяців тому

    Is there a reason behind not creating a ext4 /boot partition?

    • @SysGuides
      @SysGuides  7 місяців тому

      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.

    • @RKRK-e5f
      @RKRK-e5f 7 місяців тому

      @@SysGuides Thank you!

  • @rafli_sugiarto
    @rafli_sugiarto Рік тому +1

    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?

    • @SysGuides
      @SysGuides  Рік тому

      Yes, as long as you have the 'mlocate' package installed.

  • @renatowessmer9641
    @renatowessmer9641 10 місяців тому

    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

  • @kruderzzz
    @kruderzzz Рік тому +1

    Why not create all the subvolumes during the install ?

    • @SysGuides
      @SysGuides  Рік тому +2

      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.

  • @Abhinav_Nayana_Sailen
    @Abhinav_Nayana_Sailen Рік тому

    Brother I’ve got windows 11 installed on a partition with bitlocker turned off, should I follow this guide as it is?

    • @SysGuides
      @SysGuides  Рік тому

      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
    @cristianinujazznight3044 Рік тому

    Trying to install fedora with btrfs, if I add the SUSE thing to grub, after that, the system don't want to boot.

    • @SysGuides
      @SysGuides  Рік тому +1

      Have you made the system root a main or subvolume? The system root must be the main volume.

    • @cristianinujazznight3044
      @cristianinujazznight3044 Рік тому

      @@SysGuides Ohh, how I can made this ?

    • @SysGuides
      @SysGuides  Рік тому

      @@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.

    • @cristianinujazznight3044
      @cristianinujazznight3044 Рік тому

      @@SysGuides sudo btrfs su set-def 270 / or btrfs subvolume create / ?

  • @sharjeelmazharr
    @sharjeelmazharr 3 місяці тому

    Make a video on Arch Linux and snapper configuration

  • @pczeczora
    @pczeczora Рік тому

    i dont have EFI system partion like U on install process (im trying install on VMware)

    • @SysGuides
      @SysGuides  Рік тому

      You must boot from your Fedora installation media in UEFI mode.

    • @pczeczora
      @pczeczora Рік тому

      ​@@SysGuides i did and still no options to choose

    • @SysGuides
      @SysGuides  Рік тому

      @@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.

    • @pczeczora
      @pczeczora Рік тому

      @@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.

    • @SysGuides
      @SysGuides  Рік тому

      @@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

  • @harshhanny6354
    @harshhanny6354 7 місяців тому

    Can this also work on arch Linux ?

  • @nickholden585
    @nickholden585 Рік тому

    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

    • @SysGuides
      @SysGuides  Рік тому

      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.

    • @nickholden585
      @nickholden585 Рік тому +1

      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

  • @rodfer5406
    @rodfer5406 10 місяців тому +1

    If this is not default in Fedora, people will migrate away from it due to very unpleasant experiences (ie data loss)….IMPT***