Announcement

Collapse
No announcement yet.

how to associate a /home to a /system

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

    how to associate a /home to a /system

    Hello Everybody,

    You can read everywhere that it is advised to have a partition for the system and a partition for the data.
    Indeed, it's more convenient, but how to link a /system to a /home is a nightmare for someone who don't have peculiar knowledge in linux.
    I've been looking for a solution in a search machine.
    I've looked the five first ones, they were all different.
    I applied one and it did'nt work...
    And meanwhile the linux beside no longer works.

    I don't especially ask for help, but I would be happy if you could put a link for a simple solution.
    Last edited by nicrnicr; Oct 15, 2023, 09:03 PM.

    #2
    Originally posted by nicrnicr View Post
    You can read everywhere that it is advised to have a partition for the system and a partition for the data.
    Often you'll read here at KFN a recommendation to have one btrfs partition, that has subvolumes to separate the system from the data.

    how to link a /system to a /home is a nightmare ...
    I'm sorry, I can't understand the question. What is "/system"?

    Do you mean the system root, which is called "/"? But that doesn't make sense to link it to a /home.
    Regards, John Little

    Comment


      #3
      Thank you jlittle for your answer.
      With /system I mean the system. In our case it is Kubuntu 22.04.

      Comment


        #4
        Originally posted by nicrnicr View Post
        With /system I mean the system. In our case it is Kubuntu 22.04.
        I'm still floundering, sorry. Guessing what you might be trying to do... maybe you've got one partition for your 22.04 install, which includes /home. (You call this partition "/system", a name I've never seen before.) And you want to use another, perhaps on another device for /home, copying your existing data to it. I can imagine this being difficult, as it involves editing /etc/fstab.
        Regards, John Little

        Comment


          #5
          I suppose you don't want to change all your file system types from ext4 to btrfs

          A rough roadmap (you can leave out some of the less necessary steps in the linked article, if you wish to do so) to the solution for moving /home to another partition can be found here:
          https://help.ubuntu.com/community/Pa...ng/Home/Moving


          ("Setup Fstab - 1. Duplicate your fstab file")

          To make a backup of your /etc/fstab I would simply sudo cp /etc/fstab /etc/fstab.orig


          ("Setup Fstab - 3. Open the original fstab in a text editor")

          Just use Kate.

          The entry in the modified /etc/fstab should look something like this (replace /dev/sdXy in the comment line with the partition containing your new /home, e.g. /dev/sda12, and replace the UUID with the actual UUID of the partition containing your new /home - and don't forget the spaces between the different entries…):
          # mount /home partition (/dev/sdXy) to /media/home
          UUID=e1de1cd0-5c44-48cc-842c-7f33be81fdf6 /media/home ext4 noatime,defaults 0 2​


          You can get the UUIDs of the different partition with e.g. lsblk -f .


          ("Copy /home to the New Partition")

          You should be able to simply copy the whole /home/$USER (e.g. /home/nicrnicr) with Dolphin to the new /home partition.


          ("Preparing fstab for the switch")

          Later on when you will have to change /etc/fstab again, it should look something like this:
          # mount /home partition (/dev/sdXy) to /home
          UUID=e1de1cd0-5c44-48cc-842c-7f33be81fdf6 /home ext4 noatime,defaults 0 2​


          Addtional info for advanced usage:
          You would have to make the "Preparing fstab for the switch" steps for every system that shall share the same /home partition with the other systems - and rename you respective old /home before - and reboot afterwards, of course (but in my personal experience in the long run this is best to do only if the systems use the same Linux distribution base like e.g. Ubuntu and the same desktop environment like e.g. KDE Plasma.​​


          I hope I did not overlook anything important and this pushes you in the right direction.
          Last edited by Schwarzer Kater; Oct 16, 2023, 03:47 AM. 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


            #6
            Thank you very much jlittle and Schwarzer Kater.

            Originally posted by jlittle View Post
            I'm still floundering, sorry. Guessing what you might be trying to do... maybe you've got one partition for your 22.04 install, which includes /home. (You call this partition "/system", a name I've never seen before.) And you want to use another, perhaps on another device for /home, copying your existing data to it. I can imagine this being difficult, as it involves editing /etc/fstab.
            If you have three partitions for your computer, they could be /swap, /home and partition of the operating system. I wrote the last one /system.

            I found this tutorial which is not exactly what I was looking for, but which is a good tutorial in my case.
            https://itsfoss.com/replace-linux-from-dual-boot/

            I'm writing this but I still don't know if I succeeded to implement it...

            Thank you again Schwarzer Kater.
            I memorized what you wrote. I might use it later, as my computers don't have btrfs (I know that it isn't recommended to refuse progress).
            Last edited by Snowhog; Apr 15, 2024, 07:45 AM.

            Comment


              #7
              When doing a manual install, you can tell the installer to place /home directory on it's own partition, and then rest of / on a different partition. The installer will setup the partitions and place the /home in one and everything else in the other. The arrangement of partitions and directories will be written to the /etc/fstab file during installation.

              I do this all the time, and in fact, I also place the EFI on its own partition and the swap on its own partition.

              This is what my /etc/fstab looks like right now:

              # /etc/fstab: static file system information.
              #
              # Use 'blkid' to print the universally unique identifier for a
              # device; this may be used with UUID= as a more robust way to name devices
              # that works even if disks are added and removed. See fstab(5).
              #
              # <file system> <mount point> <type> <options> <dump> <pass>
              # / was on /dev/nvme0n1p2 during installation
              UUID=43f7aabd-aa47-4eef-b4f4-d49cbef8b875 / ext4 errors=remount-ro 0 1
              # /boot/efi was on /dev/nvme0n1p1 during installation
              UUID=C309-DC20 /boot/efi vfat umask=0077 0 1
              # /home was on /dev/nvme0n1p3 during installation
              UUID=870436af-1189-421f-8240-e35613dba718 /home ext4 defaults 0 2
              # swap was on /dev/nvme0n1p4 during installation
              UUID=4bfd3cbc-efd5-48cd-ba39-6c4186543565 none swap sw 0 0

              Last edited by jglen490; Oct 17, 2023, 07:18 PM.
              The next brick house on the left
              Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



              Comment


                #8
                Thank you jglen490.

                Comment

                Working...
                X