Announcement

Collapse
No announcement yet.

[SOLVED] Need help setting up multi-boot with btrfs

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Seems like - unless kali would update the sysmlinks if you created them - you'll have to specify the kernel version to boot. Or write a script that updates the symlinks automagically. Probably a little sleuthing may reveal where in the system that is done and you could replicate it in kali.

    Please Read Me

    Comment


      #47
      TwoFistedJustice :
      You are welcome, but I would suggest writing "100 MB minimum, 320-512 MB recommended" - so people will not start resizing their EFI partition of an existing Windows installation…

      Also for the swap partition generally choosing 1,5 x RAM is debatable nowadays (and always has been )- a more moderate suggestion would be something like ">= RAM for hibernation" (because you really don't know how and for what people use their computer).
      And perhaps an additional link to something like https://help.ubuntu.com/community/Sw...p_do_I_need.3F (and these are just Ubuntu's suggestions - other distributions have other ones and as mentioned: it heavily depends on the use case, too).
      Last edited by Schwarzer Kater; Jul 18, 2023, 01:21 PM. Reason: typos
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

      Comment


        #48
        Hmm, that was easy (maybe). Kali is debian based.

        linux-update-symlinks is the package.

        /etc/kernel-img.conf is the config file.

        Contents:
        Code:
        # Kernel Image management overrides
        # See kernel-img.conf(5) for details
        do_symlinks = yes
        do_bootloader = no
        Fun experiment to see if it works that simply
        Last edited by oshunluvr; Jul 18, 2023, 11:37 AM.

        Please Read Me

        Comment


          #49
          OK so I installed Kali in a VM and the file above is installed with two additional lines:
          Code:
          do_initrd = yes
          do_link_in_boot = no
          but not the deb package. However, it's not installed on my KDEneon install either.
          I went ahead and edited the above file to
          Code:
          do_link_in_boot = yes
          ​ and updated the system, which installed new kernels - and viola!​


          Click image for larger version  Name:	Screenshot_20230718_143135.jpg Views:	0 Size:	102.9 KB ID:	672533

          Please Read Me

          Comment


            #50
            Originally posted by oshunluvr View Post

            Obviously Kali does not use the vmlinuz/initrd.img symlinks like *buntus do. So 6.4 is there but you're booting 6.3? Or did you update between posts?
            As per the end of Post #32, those are actually copies of the 6.1 kernel that I renamed to see what would happen. ( all the file 6.1 & 6.4 files are the exact same size as its analog )

            Comment


              #51
              Originally posted by oshunluvr View Post
              OK so I installed Kali in a VM and the file above is installed with two additional lines:
              Code:
              do_initrd = yes
              do_link_in_boot = no
              but not the deb package. However, it's not installed on my KDEneon install either.
              I went ahead and edited the above file to
              Code:
              do_link_in_boot = yes
              ​ and updated the system, which installed new kernels - and viola!​
              I successfully tried this on my test system. But rather than pulling a system update, I made the symlinks manually.

              I will update the write up to reflect this improved information -- but not tonight \(´O`)/

              Comment


                #52
                I updated it the tutorial. https://github.com/TwoFistedJustice/...ure-primary-os


                I added the parts about the symlinks, changed the other related parts about grub.cfg, and added some TOCs to help get around.

                Comment


                  #53
                  I've been messing around with sharing subvolumes between distros and have found that I can share not only my documents and pictures between distros, but also config files and even some programs, including flatpaks.

                  I think it's possible without too much trouble to set a system up such that a lot of stuff can be shared between distros. Maybe even going so far as syncing the shared files between machines so you can have two or more machines set up similarly such that a change on one is soon automagically replicated in the other. The benefit would be that you can have your at-home box, office-box, and to-go-box all share certain functionality that you can rely on while keeping them all up to date with each other in near real time. It may also simplify backups because you'd be able to back up the shared files at one go from one machine, instead of having a full back up of each machine.

                  Do I sound like a crazy Linux nutso yet? I'd love some help putting this together. Does anyone want to collaborate with me on creating this?

                  Comment


                    #54
                    *cough* syncthing *cough*cough*
                    *burp* Nextcloud* *burp* *belch* (though this probably works best on a separate computer/nas/VPS/etc)

                    Some people use github/gitlab to store and sync their 'dot' files between machines.
                    THIS project seems popular and active,. but there are tons of things out there for this specific purpose.
                    Sooooooo, not even the slightest bit crazy in any fashion.
                    But this topic will reveal many rabbit holes, many of them deep and long

                    Comment


                      #55
                      Originally posted by TwoFistedJustice View Post
                      […] The benefit would be that you can have your at-home box, office-box, and to-go-box all share certain functionality that you can rely on while keeping them all up to date with each other in near real time. […]
                      I think they call it "Activities" in KDE Plasma
                      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                      Comment


                        #56
                        Originally posted by TwoFistedJustice View Post
                        I've been messing around with sharing subvolumes between distros and have found that I can share not only my documents and pictures between distros, but also config files and even some programs, including flatpaks.

                        I think it's possible without too much trouble to set a system up such that a lot of stuff can be shared between distros. Maybe even going so far as syncing the shared files between machines so you can have two or more machines set up similarly such that a change on one is soon automagically replicated in the other. The benefit would be that you can have your at-home box, office-box, and to-go-box all share certain functionality that you can rely on while keeping them all up to date with each other in near real time. It may also simplify backups because you'd be able to back up the shared files at one go from one machine, instead of having a full back up of each machine.

                        Do I sound like a crazy Linux nutso yet? I'd love some help putting this together. Does anyone want to collaborate with me on creating this?
                        One obvious way to make this happen is to use BTRFS and subvolumes. By simply replacing any folder you want to share across distros with a subvolume, one could mount it on as many distros as one likes on a single machine. This is much different than "syncing." Syncing implies a duplicate copy is being made. Sharing subvolumes in this way would provide only a single copy so backups would still be required. Also, all kinds of measures would have to be taken to insure things like user IDs were the same across distros, etc.

                        If one was to attempt to implement something like this on separate machines (I assume via a network connection) anything needing to be present on the machine prior to network availability would have to obviously be on the machine. In this case the file system choice would be irrelevant because you'd be mounting network shares. I'm not familiar enough with Flatpaks to know how or if that would work.

                        I do this sort of sharing with Media (Documents, Music, Videos, etc.). I have a dedicated server that has a set of shared "folders" that mimic the same media folders Kubuntu installs by default. My concept was to allow any user on any system to add and access any file to the shared folders, but still retain "private" files. I mount these shared folders in the "Public" folder on every user account and every PC thus making it clear anything there is shared.

                        One could actually have a remote home folder so that whenever you logged into any system on your network, you'd have the same home. Again, some effort to keep things on par would probably be required.

                        Note that the term "server" has more than one meaning. In the physical sense, a dedicated machine. In the software sense, a service provided to one or many machines. My point here is the above could be undertaken by any system on the network without being a separately dedicated piece of hardware. But obviously it would have to be on-line to access it.

                        Please Read Me

                        Comment


                          #57

                          Originally posted by claydoh View Post
                          *cough* syncthing *cough*cough*
                          *burp* Nextcloud* *burp* *belch* (though this probably works best on a separate computer/nas/VPS/etc)

                          Some people use github/gitlab to store and sync their 'dot' files between machines.
                          THIS project seems popular and active,. but there are tons of things out there for this specific purpose.
                          Sooooooo, not even the slightest bit crazy in any fashion.
                          But this topic will reveal many rabbit holes, many of them deep and long
                          Originally posted by Schwarzer Kater View Post

                          I think they call it "Activities" in KDE Plasma

                          Nextcloud and Activities aren't quite what I was thinking.

                          I was specifically thinking of Syncthing. But before I set that up I want to have my file systems set up in a helpful way. Which is where btrfs shared subolumes comes into play. I already have my dot files backed up to github.

                          Shared subvolumes make for some really cool possibilities.

                          For example:
                          I could have my dotfiles on a subolume called @dotfiles which is shared between various distros, which all reside on the same partition. I wouldn't need symlinks. Just a little modification to each distro's .bashrc.

                          Change

                          if [ -f ~/.bash_aliases ]; then
                          . ~/.bash_aliases
                          fi


                          to

                          if [ -f /dotfiles/.bash_aliases ]; then
                          . /dotfiles/.bash_aliases
                          fi

                          Now every distro on that machine can use the same aliases.

                          I have already tested it and it works just dandy.

                          You could also have a subvolume called @apps or @programs or @whatever and have your flatpaks all installed there and accessible from every distro. I have already tested this and confirmed that it is possible.

                          I can also have my Jetbrains IDEs all installed there and accessible the same way.

                          I'm less confident about Snaps.


                          Comment


                            #58
                            Cool idea! Sounds like a fun project.

                            I serious doubt snaps would work this way but maybe. depending on how they are stored. I don't use snapd but could be an interesting experiment.

                            Please Read Me

                            Comment


                              #59
                              Originally posted by oshunluvr View Post
                              Cool idea! Sounds like a fun project.

                              I serious doubt snaps would work this way but maybe. depending on how they are stored. I don't use snapd but could be an interesting experiment.
                              Snaps are sort of like btrfs in that they mount snapshots (compressed ones). But they scatter files all over the system in order to operate. Frankly I don't understand why anyone would want to use them when Flatpaks have all the same functionality and are less resource intensive. The auto-update advantage that Snaps had, they no longer have because Flatpak does that too now. (or so I have read)

                              I was digging through flathub and just about every program I would want that is available in Snaps is also available in Flatpak. There are also a lot of other programs I like that are now available that way too like all the Jetbrains IDES and DIY Layout Creator. Also Firefox and Chromium.

                              I'm actually considering making use of Schwarzer Kater's Snap-terminator scripts. But one thing at a time.
                              Last edited by TwoFistedJustice; Jul 22, 2023, 10:44 AM. Reason: clarity

                              Comment


                                #60
                                Feel free to do so (they are more meant for other people than for myself, but it is convenient to have them) - and removing snapd etc. is not irreversible (at least for the stuff that is installed by default), that's what the "reinstall Snap (for release-upgrade)" script is for.
                                Programming always has been more a hardship than a joy for me, and I would be glad if you told me something that can be improved (code- or language-wise).

                                PS: Oh, and the "Activities" comment above was only meant as a (bad) joke.
                                Last edited by Schwarzer Kater; Jul 22, 2023, 12:58 PM.
                                Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                                Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                                get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                                install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                                Comment

                                Working...
                                X