Shared $HOME folder between live persistent and regular install?

Forum Forums General Tips and Tricks Shared $HOME folder between live persistent and regular install?

  • This topic has 3 replies, 2 voices, and was last updated Sep 20-8:44 pm by anti-apXos.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #116651
    Member
    anti-apXos

      I’d like to set up two installs of antiX-23 on my system, one a regular install and the other a frugal install with root persistence. Is this going to work? It seems like it shouldn’t be a problem, but is there some hitch I’m not thinking of?

      If there’s not likely to be any issues, does anyone have a brief howto for setting it up? I tried searching, but didn’t find anything.

      #116663
      Member
      abc-nix

        Hi.

        I have never done this myself, but I think it is possible. You will need to configure root persistence, and edit /etc/fstab to mount your home partition in the frugal system (you may copy the lines for mounting /home from the /etc/fstab of your installed system).

        Edit /usr/local/share/excludes/persist-save-exclude.list to exclude /home/* from being saved into the persistence device.

        Then save persistence changes and reboot, and see if it worked.

        As explained, I have never tested this, but it should be possible. If you are able to make it work, we would be thankful if you could provide a mini-tutorial so that others interested could learn from your experience.

        #116721
        Member
        anti-apXos

          Great, thanks for tips. I’ll give it a try and see how it goes.

          #117321
          Member
          anti-apXos

            I’ve been using this shared $HOME for a bit now, testing it out, and I think I can say it works pretty well. As a bonus, this finally got me to start using a separate partition for $HOME, which I’ve wanted to do for a while.

            abc-nix’s tips are all it really takes, but I’ll clarify a few tricks based on my experience.

            Trick 1: The main issue I ran into was getting my changes to fstab to stick.

            The problem is that antiX Live sessions, including frugal installs, run make-fstab during every boot and this can undo changes you made to /etc/fstab. The solution is to do exactly what abc-nix suggested and paste entries into the frugal install /etc/fstab from elsewhere, like the /etc/fstab of your full install.

            After tons of unsuccessful attempts to simply modify the entries generated by make-fstab (since that seemed like it was easier than copying-and-pasting…HAH!), change kernel boot options, or disable make-fstab, I found that new entries written or pasted into /etc/fstab will be left alone by make-fstab while modified entries will be over-written.

            Trick 2: I’m not sure adding ‘/home/*’ to /usr/local/share/excludes/save-persistance-changes.list is needed.

            If you mount a different partition to /home, persistence changes don’t seem to affect it. I found that a default user folder does get created on the rootfs version of /home at login before your HOME partition is mounted over it, but it’s only a few 100k and doesn’t interfere with your “real” $HOME on the other partition. I still added the line anyway, just to be sure, though.

            Trick 3: The only other issue I’ve run into is if you use hibernation, which not many people do on antiX, I don’t think.

            Consider this scenario:

            1. Hibernate the full install
            2. Switch to the frugal install on reboot
            3. Do things
            4. Reboot into the full install

            The full install will come out of hibernation into a changed environment. That could potentially cause deep hurting, though in my testing it was not too bad. My advice is not to use hibernation if you’re sharing $HOME (or any partitions) between two installs.

            A partial solution is to enable swap on the frugal install so that any existing restore info from your full install will be lost when frugal boots. You lose everything from the hibernated session this way, but that’s better than filesystem corruption.

            I think another solution would be to add the restore module to the frugal install’s initrd.gz so that (2) above is not possible. Instead, you’d just restore back into your main install if you pick the frugal. I haven’t tried this, but I think it would work.

            That’s really it. Otherwise, this just seems to work fine. Here’s a couple tips I’ve found to make this more useful, though.

            First tip: If you’re having trouble with the fstab not mounting your HOME partition, you can manually mount the partition to /home from a terminal and then ‘sudo killall slimski’ and you’ll reset your session with /home mounted. This way it might be easier to make whatever changes you need until the mount is permanent.

            Second tip: I sometimes got confused about which version I was in, the full install or frugal, since they look and behave almost identically with a shared $HOME. So what I did was modify start.xpm and taskbuttonactive.xpm in /usr/share/icewm/themes/FX-dark/taskbar on my frugal install. I just gave them a red tint using mtPaint. This way I always (as long as I’m in iceWM) have an onscreen reminder of which version I’m in.

            Third tip: One use for this is to spin off snapshots of my full install. When I want to do that, an easier method than running iso-snapshot and then extracting the frugal files from the ISO is to just make the linuxfs on its own: sudo mksquashfs / linuxfs -comp lz4 -one-file-system -noappend -quiet
            That makes an lz4 compressed version of your root file system called linuxfs. The ‘-one-file-system’ switch is great because it automatically ignores anything that’s a different mountpoint, including your /home partition, as well as /boot, /sys, /proc and so on. All the stuff you don’t want, basically.

            This linuxfs can be used together with the initrd.gz taken from an antiX ISO, but that initrd does not need to be updated together with the linuxfs, so you only need to keep one initrd.gz on hand.

            My GRUB entry for for the frugal install looks like this:

            menuentry 'antiX-23-runit Arditi del Popolo snapshot w/ frugal_root' {
            	linux /vmlinuz-6.1.42-antix.1-amd64-smp frugal_root fdir=snapshot fuuid=d1247db9-b33f-4a1a-bfb4-95f6c2b55e67 quiet disable=
            	initrd /initrd.antix-live.gz
            }

            The kernel is the same one as my full install and I renamed the initrd.gz and put it in the same location on my EFI partition, so that GRUB finds it automatically. As long as fdir is pointing to the location of the new linuxfs on the fuuid partition, this works and is nice and quick.

            If there’s an existing rootfs persistence file in your frugal directory, you can delete or rename it and a new one will be created when you boot. I also found that you can keep using the same rootfs file with a new linuxfs, though, if you want to preserve your previous persistence changes. This is useful especially for things like the /etc/fstab and iceWM theme changes, so they don’t have to be redone every time.

            Anyway, I’ve always liked antiX’s Live and Frugal support and this just makes it better. Until recently, frugal was the only way I’d used antiX. Now with shared $HOME it feels like those features are well integrated with the advantages of a full install. Cool.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.