Announcement

Collapse
No announcement yet.

Separate /home partition (Closed)

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

    Separate /home partition (Closed)

    Hi,

    As my home directory is at breaking point I finally decided to give it its own partition and also because I would like to have it 'removed' from upgrades etc.

    I've followed the instructions at http://www.psychocats.net/ubuntu/separatehome

    As I have my main system on sda I used gparted from my other system on sdb which all worked well enough. When it came to mounting the sda partitions for the final leg I simply booted into that platform and carried on with the instructions. Sooooo this is where it goes pear-shaped: Excluding the 'mount' instructions I got to the point where fstab gets edited i.e gksudo gedit /old/etc.fstab (although not having gedit I substituted kate).

    Now, in terminal, I got the following error:

    Error copying ' /home/rupa/.Xauthority' to ' /tmp/libgksu-pb71vU': No such file or directory

    And in another window:

    Failed to run Kate '/old/etc/fstab as user root. Unable to copy the user's Xauthorization file.


    I've tried a few things in order to access this file but to no avail so looking for some (some?) a lot of help please.

    On a good note the partitioning itself went ok.
    Celeron CPU G1610@2.60GHz x 2
    GeForce 8400 GS/PCle/SSE2
    Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

    #2
    Re: Separate /home partition

    I didn't try to follow every step of the psychocats process, but I'll offer this -- you don't need to copy .Xauthority and .ICEauthority. Those files are dynamically created when you log in to the KDM greeter. Moreover, if you are working as root, with "kdesudo kate", you really do not want any such files that were used by root in your /home/rupa folder anyway.

    Just copy the "dot" files and folders that you can, and leave these two alone.

    Comment


      #3
      Re: Separate /home partition

      Yes, for kate please use "kdesudo" as dibl said.

      As for the copying errors, I don't know why they use this complicated command including cpio in the howto. I always do this:

      Code:
      cd /new
      sudo cp -p /old/* .
      It works great, even if you are cloning a root ("/") folder (as long at it is offline, that is, you are not currently using, in which case you'd have issues with some /dev, /proc and some other directories created by the kernel)

      The switch "p" in teh copy ("cp") command preserves all files attributes. You can do "Alt+F2" and then type "man:cd" for more info.

      Congrats, moving to a separate /home is a decision you'll enjoy in years and years to come

      Comment


        #4
        Re: Separate /home partition

        You might consider checking your home directory to make sure none of your files are root owned.

        In a terminal:

        ls -aR ~ |grep root

        Please Read Me

        Comment


          #5
          Re: Separate /home partition

          Thanks to all for the replies I'll update this post as soon as I can try all the options.
          Celeron CPU G1610@2.60GHz x 2
          GeForce 8400 GS/PCle/SSE2
          Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

          Comment


            #6
            Re: Separate /home partition

            Hello again - apologies for delay.

            Well obviously I've done something wrong as the new directories ('new' and 'old') are empty!

            However I have copied over the home directory to the new partition and edited the fstab that existed on sda1 as below:

            UUID=17471fbf-e28b-4c8a-b40d-28df36691af9 / ext3 defaults 0 1
            UUID=ba2dd8e6-bebe-47ff-b554-fec86441ba26 swap swap sw 0 0
            /dev/sda3 /home ext3 nodev,nosuid 0 2

            The green line being the addition.
            But I am getting the following error during log in:

            'Cannot enter home directory.
            Using /.

            OK.'


            Clicking 'ok' brings up another error:

            'Kstartupconfig4 does not exist or fails.

            The error code is 3

            Check your installation'

            Clearing this brings you back to the 'greeter'.


            Not done 'ls -aR ~ |grep root' yet.

            So as we sink deeper into the mire and my beloved wails about her misfortune in having to get her emails via web login instead of Thunderbird I can only await salvation(?).

            Happy Easter
            Celeron CPU G1610@2.60GHz x 2
            GeForce 8400 GS/PCle/SSE2
            Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

            Comment


              #7
              Re: Separate /home partition

              May I bumpity bump - seeing that this is generating quite a bit of interest

              And - the magic word 'solved' keeps appearing before me.

              And - I'd rather be playing with fstab than watching that wedding thingee.
              Celeron CPU G1610@2.60GHz x 2
              GeForce 8400 GS/PCle/SSE2
              Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

              Comment


                #8
                Re: Separate /home partition

                Let's have a look at a couple of things -- I guess you can boot the system more or less?

                Code:
                sudo blkid -c /dev/null -o list
                Code:
                sudo df -h
                Code:
                cat /etc/fstab

                That should be enough to at least get an idea of your setup there.

                Comment


                  #9
                  Re: Separate /home partition

                  Hi dibl,

                  blkid etc:

                  /dev/sda1 ext3 / 17471 . . ('old partition')
                  /dev/sda3 ext3 not mounted e445a169 . . (new partition with /home)
                  /dev/sda5 swap <swap> ba2dd8e6 . .
                  /dev/sdb1 ext4 not mounted d559 . . (my alternate 'basic' system)
                  /dev/sdb5 swap not mounted 5b5 . .
                  /dev/sdc1 ext3 Backup 5cbc . . (external backup)


                  df -h:

                  /dev/sda1 67G 12G 52G 19% /
                  none - 998m 308k 997m 1% /dev
                  none - 1004m 0 1004m 0% /dev/shm
                  none - 1004m 52k 1004m 1% /var/run
                  none - 1004m 0 1004m 0% /var/lock


                  cat:

                  UUID = 17471fbf-e286-4c8a-b40d-28df36691af9 / ext3 defaults 0 1

                  UUID = e445a169-89-4ld8-8fc3-12952c8cb49a / ext3 defaults 0 1

                  UUID = ba2dd8e6-bebe-47ff-6554-fec86441ba26 swap swap sw 0 0

                  Thanks.
                  Celeron CPU G1610@2.60GHz x 2
                  GeForce 8400 GS/PCle/SSE2
                  Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

                  Comment


                    #10
                    Re: Separate /home partition

                    OK thanks. Is the "a" that I see in the /etc/fstab file, immediately after the "/" a real part of the file, or a typo in your post?

                    So, is it your wish to simply incorporate the /dev/sda3 partition as a new /home folder in your root filesystem, or do you have an entire Linux system installed on /dev/sda3, that you wish to boot in lieu of the one on /dev/sda1?

                    BTW, one swap partition is all you need on the entire system. You could nuke one of the two that you have.

                    Comment


                      #11
                      Re: Separate /home partition

                      Arh good spot a typo now extinct!

                      To incorporate /dev/sda3 as my new /home folder in the root file system is the aim. Sda3 does actually have /home in it. That part at least appears to have worked.

                      Is that right? Sdb5 is the 'swap for a linux distro set up on sdb1 so can they in fact share a swap?

                      Many thanks.
                      Celeron CPU G1610@2.60GHz x 2
                      GeForce 8400 GS/PCle/SSE2
                      Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

                      Comment


                        #12
                        Re: Separate /home partition

                        If you are satisfied that all data of any use has been copied from your existing /home/rupa folder over to the /dev/sda3 partition, into a folder there named /rupa, then you should be OK to do the following:

                        1. In your running system, change /etc/fstab to add the mount line for /home. It should look about like this:

                        Code:
                        UUID=e445a169-89-4ld8-8fc3-12952c8cb49a /home ext3 defaults 0 0
                        2. Shutdown the system, and reboot with a Live CD of some kind (Parted Magic is my favorite for this kind of work).

                        3. With the Live CD booted and running, you need to manually mount /dev/sda1 (ask if you don't know how -- with Parted Magic you just push a button). Then you need to go in to that mounted partition, change to the /home directory, and delete all directories under /home, including all subdirectories and files. For example, at the "/home" directory prompt, issue
                        Code:
                        sudo rm -rf *
                        ("sudo" only needed if in *buntu). That's a dangerous command -- be double-damned certain you are at "/home" when you issue it, and NOT at "/" or you'll delete the entire OS.

                        4. Now shut down the Live CD session, and reboot the system.

                        I'm not entirely sure what you're going to see when you boot the new system. Your user already exists, and if you made a /rupa folder on the /dev/sda3 partition, then he has a place for his KDE stuff and all other settings. Upon first boot into KDE, a lot of settings are made automagically. We'll see how well that works on your setup.

                        NOTE: there should NOT be a "/home" directory on the /dev/sda3 partition -- that will exist in the root filesystem already. Make your /rupa folder in the root of /dev/sda3.


                        P.S. While running in the Live CD, please verify that the user has read-write-execute permissions within the /rupa folder on /dev/sda3 -- if he doesn't, you'll have to (a) mount it, change to /dev/sda3 root directory, and (b) (as root)
                        Code:
                        chown rupa:rupa /rupa

                        Comment


                          #13
                          Re: Separate /home partition

                          Thanks dibl,

                          I'll print your instructions off and run through them tonight.

                          If you don't hear anything within three days I've gone over the wall!

                          Celeron CPU G1610@2.60GHz x 2
                          GeForce 8400 GS/PCle/SSE2
                          Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

                          Comment


                            #14
                            Re: Separate /home partition

                            dibl,

                            I've followed everything and on booting up we get to the 'start-up' screen i.e. the colourful nine bar one in my case. The disc drive appears then nothing happens from that point. The screen is not frozen and I have tried going into the command line and running startx but that is already running. I do get one error message and that is:

                            xauth: timeout in locking authority file /home/rupa.Xauthority

                            but I assume that is sorted once the system actually starts up(?)


                            Almost there I think . . .

                            Celeron CPU G1610@2.60GHz x 2
                            GeForce 8400 GS/PCle/SSE2
                            Kubuntu 14.04 - 64 bit Linux - KDE 4.13.0

                            Comment


                              #15
                              Re: Separate /home partition

                              Hey -- I think you're getting close!

                              OK, it sounds like the residual issue is permissions in the hidden .kde folder. Let's try this, when you log in to the console:

                              Code:
                              sudo blkid -c /dev/null -o list
                              Look at the table and make sure the /dev/sda3 partition is in fact mounted on /home.

                              Code:
                              sudo service kdm stop
                              Now double-check that you are at your user's home directory with

                              Code:
                              pwd
                              and then, assuming it says you are at /home/rupa

                              Code:
                              mv .kde .kde_bak
                              Code:
                              sudo service kdm start
                              Now if it provides you a KDM login screen, you should be able to log into a default KDE desktop. From there, if it is important to reset things like you had them before, you can find the settings in various locations in the .kde_bak folder.

                              Comment

                              Working...
                              X