Announcement

Collapse
No announcement yet.

Replacing /Home with Home on different partition

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

    Replacing /Home with Home on different partition

    This will sound really stupid: I somehow managed to format my / (root); I was testing Chakra and I blindly installed grub on HD(2,0) which I thought was Windows (my main disk, where I also have Kubuntu grub).
    So I decided to reinstall Kubuntu. Thankfully I had Home on separate partition, which prevented that I would lose all of my documents (among them my diploma work).
    In installation I have chosen to set up partition tables manually. So that I could install only / (root).

    Now I would like to use my previous Home instead of the home that was made in root.
    I have already linked Home folder in Dolphins quick access with this home, but I still have to mount it.
    So how can I get this to work properly.
    Thanks!

    And happy new year (I guess)
    I'm magnet for errors, problems and bugs...

    #2
    Re: Replacing /Home with Home on different partition

    Probably the simplest thing to do would be to (a) using sudo privileges, rename the current /home directory to something like /home-old, (b) sudo mkdir a new /home directory (this will create it empty), then (c) edit /etc/fstab to mount the other partition on the new /home mount point.

    Then reboot your system, and when you log in, the old .kde and other hidden folders and files will be seen and used, so it will probably look the same as it did the last time you used it.

    Comment


      #3
      Re: Replacing /Home with Home on different partition

      Originally posted by dibl
      Probably the simplest thing to do would be to (a) using sudo privileges, rename the current /home directory to something like /home-old, (b) sudo mkdir a new /home directory (this will create it empty), then (c) edit /etc/fstab to mount the other partition on the new /home mount point.

      Then reboot your system, and when you log in, the old .kde and other hidden folders and files will be seen and used, so it will probably look the same as it did the last time you used it.
      OK I got to the point c), but now the problem is that I don't know how to edit home mount point.
      I have a really strange fstab:
      Code:
      # /etc/fstab: static file system information.
      #
      # <file system> <mount point> <type> <options>   <dump> <pass>
      proc      /proc     proc  defaults    0   0
      # /dev/sdb1
      UUID=c032f76b-0531-4fdc-ab97-ea84a737abca /       ext3  relatime,errors=remount-ro 0   1
      # /dev/sdb6
      UUID=66736552-73f5-4457-90c6-13d9f57df68c none      swap  sw       0   0
      # /dev/sdc6
      UUID=cb4c7a9c-c2bc-4175-b322-d8cdf39013e8 none      swap  sw       0   0
      /dev/scd0   /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0   0
      As you can see I have root, and two swaps (one for Kubuntu the other for Chakra).
      The problem is that I probably should add the home partition which is sdb5, but I don't know the UUID by heart, but now I can't access the
      Dolphin any more, as home is empty (no dolphinrc or whatever that file is called)
      I'll try to locate it through
      Code:
      dir /mnt
      hope it will work...
      Originally posted by midified
      OK the
      Code:
      dir /mnt
      doesn't work I have no idea why...
      On the end I think my fstab should look something like this:
      Code:
      # /etc/fstab: static file system information.
      #
      # <file system> <mount point> <type> <options>   <dump> <pass>
      proc      /proc     proc  defaults    0   0
      # /dev/sdb1
      UUID=c032f76b-0531-4fdc-ab97-ea84a737abca /       ext3  relatime,errors=remount-ro 0   1
      #/dev/sdb5
      UUID=uuid Home (what do i put under mount point (/)?) ext3 options??
      # /dev/sdb6
      UUID=66736552-73f5-4457-90c6-13d9f57df68c none      swap  sw       0   0
      # /dev/sdc6
      UUID=cb4c7a9c-c2bc-4175-b322-d8cdf39013e8 none      swap  sw       0   0
      /dev/scd0   /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0   0
      If this will work I'll write an how to for this (If there is none yet)
      I&#39;m magnet for errors, problems and bugs...

      Comment


        #4
        Re: Replacing /Home with Home on different partition

        You are on the right track there, primoz.

        You need to find the UUID number for the partition where your /home data is.
        Code:
        sudo blkid
        will help you. When you see it on the screen, then open the file for editing:

        Alt-F2 "kdesudo kate /etc/fstab" with no quote marks (or if it is 8.04, then "kdesu kate /etc/fstab")

        Now, you want to add a line that looks like this:

        Code:
        UUID={number goes here}  /home       ext3  auto,users,rw,exec,relatime 0   2
        Then "file>save" and exit the editor, and reboot your system.


        P.S. Since you can only boot one OS at a time, you only need one swap partition (it doesn't contain anything specific to any Linux OS).

        Comment


          #5
          Re: Replacing /Home with Home on different partition

          Man why must I change every simple task into an adventure?
          While doing this my Firefox died and I couldn't see your last reply and if I tried to start it again I couldn't as the home directory was empty.
          So I logged out and logged in to Windows and renamed home-old back to home and logged back to Kubuntu.
          Now I would like to merge some of configuratons from home-old to this "original" home.
          Especially the KWin settings, mouse settings andcolour theme, I'll try to find it in .kde (is it under share or something else?)
          I&#39;m magnet for errors, problems and bugs...

          Comment


            #6
            Re: Replacing /Home with Home on different partition

            Heh heh heh -- I call that a "character-building experience".

            For future reference, there's an easier way to arrange things, if you start from scratch. Make your Kubuntu partition the size you want it without a lot of user data in it. You do need to allow for things like ISO downloads and such, so maybe 10G or 12G is a good size. So you install the entire system in that.

            Then, your data goes on another partition or partitions. Let's say it's one large partition, and as soon as you've finished installing Kubuntu, you edit /etc/fstab to mount your other partition on /media/DATA. You make folders there on the other partition, such as "Docs" and "Music" and "Videos" and "Images", etc. In Kubuntu, you use Dolphin or Konqueror to open your /home/primoz folder, and then you can split the view or open another Dolphin session, whichever you wish, and in the second view you browse to your other partition (which should be mounted in /media/DATA), and you drag the folders over to your /home/primoz window and drop them and select "Link Here" to link them. Now, you will have your data folders available in your home user folder just as if they were physically there, but they are actually safe from a crash of your OS.

            The nice thing about this method is, all of your user "settings" are in the real /home folder, but your data are not touched by these things. So, if you need to reinstall the OS, you can do that with no worries about your data.

            Comment


              #7
              Re: Replacing /Home with Home on different partition

              Originally posted by dibl
              Heh heh heh -- I call that a "character-building experience".

              For future reference, there's an easier way to arrange things, if you start from scratch. Make your Kubuntu partition the size you want it without a lot of user data in it. You do need to allow for things like ISO downloads and such, so maybe 10G or 12G is a good size. So you install the entire system in that.

              Then, your data goes on another partition or partitions. Let's say it's one large partition, and as soon as you've finished installing Kubuntu, you edit /etc/fstab to mount your other partition on /media/DATA. You make folders there on the other partition, such as "Docs" and "Music" and "Videos" and "Images", etc. In Kubuntu, you use Dolphin or Konqueror to open your /home/primoz folder, and then you can split the view or open another Dolphin session, whichever you wish, and in the second view you browse to your other partition (which should be mounted in /media/DATA), and you drag the folders over to your /home/primoz window and drop them and select "Link Here" to link them. Now, you will have your data folders available in your home user folder just as if they were physically there, but they are actually safe from a crash of your OS.

              The nice thing about this method is, all of your user "settings" are in the real /home folder, but your data are not touched by these things. So, if you need to reinstall the OS, you can do that with no worries about your data.
              Very interesting! I might just do that (if only I could do the same thing in Windows) So that my Windows and Kubuntu would share documents etc.
              But for now I haven't find a way to link My Documents with /home/documents; My Pictures with /home/pitcures...
              I&#39;m magnet for errors, problems and bugs...

              Comment

              Working...
              X