Announcement

Collapse
No announcement yet.

Converting a root BTRFS install to a subvolume install in 4 easy steps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Sorry, now I understood that you are talking about completely different installer altogether.

    Comment


      #17
      Originally posted by MarkkuE View Post
      Sorry, now I understood that you are talking about completely different installer altogether.
      Yeah, I stuck it here in BTRFS under miscellaneous because it didn't really apply directly to Kubuntu. Still, there's some useful content here I think like converting from EXT4 and then transitioning into subvolumes, which really applies to any distro.

      It appears Ubuntu still uses Ubiquity but has put in in a snap making it difficult to modify. This How To makes it possible to transition in subvolumes after install.

      Please Read Me

      Comment


        #18
        Well, yes. I've tried all distros, and even made benchmarchs, where kubuntu was always last. However when I have to do actually something in real life, Kubuntu is always fastest.

        Comment


          #19
          Maybe I missed something in this long thread, TL-DR

          I just had the time to mess with the new Kubuntu 24.04 ISO. During install I selected the erase the disk and in the drop down I just selected no swap and btrfs instead of ext4. After the install finished I have the follow sub volumes:

          Code:
          jim@jim-nucboxg3:~$ sudo btrfs su li /
          [sudo] password for jim:
          ID 256 gen 113 top level 5 path @
          ID 257 gen 113 top level 5 path @home

          My fstab looks like this:

          Code:
          # <file system> <mount point> <type> <options> <dump> <pass>
          UUID=F816-11F0 /boot/efi vfat defaults 0 2
          UUID=045b3a38-b87c-474d-9696-f6ee27415e8b / btrfs subvol=/@,defaults,noatime,autodefrag 0 0
          UUID=045b3a38-b87c-474d-9696-f6ee27415e8b /home btrfs subvol=/@home,defaults,noatime,autodefrag 0 0
          tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
          ​If I'm using timeshift all I have to do is install it.

          I would normally add compress-zstd and do
          Code:
           btrfs fi defragment / -r -czstd
          Sometimes I want to have separate subvolumes for things like /var/log, /var/cache, and /var/tmp. I usually follow a guide here:
          https://www.lorenzobettini.it/2022/1...rfs-in-ubuntu/

          Comment


            #20
            You indeed missed something: This issue applies to Ubuntu not Kubuntu. Kubuntu uses the Calamares installer but Ubuntu uses Ubiquity in a snap as it's installer. As you discovered, the Calamares configuration for Kubuntu does indeed use subvolumes when installing. Also worth noting; a simple edit of a python file in the installer configuration folder will allow one to use "custom" subvolume names during install.

            I have also run into other non-buntu distros that install to the root BTRFS file system rather than subvolumes as default during install. I thought this worth noting on this forum in case others here, like me, occasionally install other distros (usually in a VM) for testing or reviewing.

            As far as additional subvolumes for /var or anything else, I find it unnecessarily complicated for little benefit. Nested subvolumes require many additional steps to make a complete backup. I could see adding additional subvolumes for special use cases but not for a regular day-to-day desktop users like myself (currently, anyway - having been unemployed since Jan. 12th). My weekly automated incremental system and home backups take all of 30 seconds to complete and can I see no need to complicate things further.

            On the other hand, I have configured my server with 20 separate subvolumes (mostly media content) so the backup procedure is more complex and lengthy. Thanks goodness for cron and my mid-level ability to write a bash script, LOL.
            Last edited by oshunluvr; Jul 11, 2024, 06:32 AM.

            Please Read Me

            Comment


              #21
              Thanks for pointing out my bad assumption

              As to nested subvolumes and backups and restores I've found out that on Debian based and Arch based systems that if you install snapper but install and use btrfs-assistant to configure snapper and use it. You don't have to worry about complications due to nested subvolumes. I talked with the author about that. When I test stuff I usually install the basics and add the rest later. I snaphot with btrfs-assistant right after install so I can restore to that point for my next test. btrfs makes the restore instant as you know. It really made evaluating windows managers on Debian 12 very easy. I could try one, screw it up and restore to basics again and try another.

              Comment


                #22
                I can see your point, but early on in BTRFS years - those tools like snapper caused a lot of problems - like filled drives and users unaware of where to find their snapshot in an emergency. Those reports left a bad taste in my mouth and so I created my own tools and have stuck with them.

                The one thing I've considered installing is the tool to allow the direct booting to a snapshot. I can see a valid benefit to that and at least a couple distros install it by default.

                Still, since I already use a "nested" boot structure it's simple enough to re-snapshot and remove a "bad" subvolume if things go that poorly. Most of the time, I simply rename the failed subvolume, make a snapshot of the saved subvolume, and reboot. It's really too easy to require yet another tool.

                Please Read Me

                Comment


                  #23
                  I have noticed on Linux Mint 21.3 and LMDE they include Timehift and If you choose BTRFS it automatically gives you @ and @home. The snapshots that Timeshift takes seem to all be level 5 non-nested subvols. That also works for my "try this, throw it away and try something else" method of exploring.
                  Last edited by jfabernathy; Jul 15, 2024, 04:03 PM.

                  Comment


                    #24
                    I was able to do this to an EFI install in a VM as well.

                    I mounted the drive to another install, ran "btrfs-convert" and edited /etc/fstab and rebooted and it just worked. Then following the steps until the GRUB re-install, do this instead:

                    Code:
                    sudo update-grub
                    sudo grub-install --efi-directory=/boot/efi​
                    reboot​
                    Last edited by oshunluvr; Jul 15, 2024, 02:11 PM.

                    Please Read Me

                    Comment


                      #25
                      Is that syntax correct? "...grub-install grub-install..."
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                      • oshunluvr
                        oshunluvr commented
                        Editing a comment
                        Thanks - fixed!

                      #26
                      Originally posted by jfabernathy View Post
                      I have noticed on Linux Mint 21.3 and LMDE they include Timehift and If you choose BTRFS it automatically gives you @ and @home. The snapshots that Timeshift takes seem to all be level 5 non-nested subvols. That also works for my try this, throw it away and try something else method of exploring.
                      I just did a fresh Ubuntu EFI install to test my How-To using EFI but also so I can play with timeshift and see how it works.

                      Please Read Me

                      Comment


                        #27
                        Originally posted by oshunluvr View Post
                        This How To will guide you to having an Ubuntu install with the default subvolumes of @ and @home as previous Ubuntu installs had.
                        Hi, I am new here. Just preparing to install 24.10 Kubuntu. I am curious will this guide work there or is it only for Ubuntu ? Thanks

                        Comment


                          #28
                          Originally posted by Marko94 View Post

                          Hi, I am new here. Just preparing to install 24.10 Kubuntu. I am curious will this guide work there or is it only for Ubuntu ? Thanks
                          The Kubuntu installer already uses subvolumes if you choose BTRFS via manual partitioning so you shouldn't need to use it. Ubuntu is using a different installer. IF you installed Kubuntu 24.10 to EXT4 instead of BTRFS, you can convert to BTRFS with subvolumes by following this guide.
                          Last edited by oshunluvr; Aug 30, 2024, 02:09 PM.

                          Please Read Me

                          Comment

                          Working...
                          X