Announcement

Collapse
No announcement yet.

How to: use home on different partition instead of /home

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

    How to: use home on different partition instead of /home

    First of all I would like to thanks dibl, who helped me with this process.
    Now I don't know if this was written before, but I think it wasn't.
    Sometimes you want /must to reinstall your Kubuntu, but the problem is that you can't keep your settings.
    So what to do that your personal data is not lost in this new install?
    This how to supposes that you already have home on different partition (I'll try to write what to do if this is not the case, but I might be wrong)

    For easiest way to complete this How-to you'll need Yakuake.

    Step 1; Partitioning of the "original" install:
    So first thing is to choose set partitions manually in your installation of Kubuntu.
    You make three (3) partitions:
    - / (root)
    - home
    -swap
    Step 2; reinstalling of Kubuntu:
    When you are reinstalling the system and the current system has the above partitions, you just add a root partition but no home or swap, as you'll
    use the existing partitions.
    Once you're finished installing Kubutu, you'll notice that you have to mount the old home partition and that the root has new home.
    So now you have to change the new home with the old home.
    Step 3; changing new home with old home (on other partition):
    Step 3.1; getting the UIID of old home partition:
    First you'll need UUID of the old home partition. You'll get it with this command (the best thing is to use Yakuake for all the console work):
    Code:
    sudo blkid
    Now locate the partition that is called home (if your disk with Kubuntu is your primary disk partition with home is most likely to be sda5).
    You copy the UUID.
    Step 3.2; renaming new home and making a new home (which will link to old home on other partition):
    Then you rename your current home (which was made with your new install). Rename it in something like home-old or home-newinstall...
    You rename it with:
    Code:
    sudo mv /home /home-newinstall
    Now you renamed the home now make new home with:
    Code:
    sudo mkdir /home
    useful (but a bit outdated site for all the basic commands Linux Newbie Guide
    Step 3.3; editing /etc/fstab:
    In yakuake write:
    Code:
    sudo nano /etc/fstab
    if you prefer CLI
    or
    Code:
    kdesudo Kate
    if you prefer GUI (note that this might not work as your home is now empty and all of the config and . files are in home-newinstall. So it might be better to use nano instead.)
    Your fstab will look something like that:
    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
    that's my Kubuntu disk...
    Anyway you'll have to add this to fstab:
    Code:
    UUID= "number goes here" /home       ext3  auto,users,rw,exec,relatime 0   2
    And save the fstab.
    Then you have to restart/logout and it should work.

    1.a; What if your current Kubuntu installation doesn't have different partition for home?
    If that's the case you'll need gParted or install qtParted:
    Code:
    sudo apt-get install qtparted
    After you burn gParted to CD you boot it and resize (or go to qtparted) your Kubuntu disk and add a new partition which
    you designate as home.
    Then you just copy home to this new partition:
    Code:
    sudo cp /home /media/"newpartition"
    Then you just go with all the other steps and it should worktm

    Hope that this will help anyone, any comments, corrections ... are welcomed!
    I&#39;m magnet for errors, problems and bugs...

    #2
    Re: How to: use home on different partition instead of /home

    i get it, ty for your guide.

    question: how about sharing the same /home partition for different versions of kubu?
    potential problems concerns when doing so?

    i've installed 8.04(rock solid) and 8.10 to different partitions.
    atm different /home partitions for both.
    1/ hardy
    2/home hardy
    3 extended partition
    5/ intrepid
    6/home intrepid

    4/swap

    can i use just one /home partition with no errors/problems?



    compaq presario v5208TU, <br />intel mobile 945GM/PM/GMS 943/940GML<br />&nbsp; &nbsp; &nbsp; &nbsp; celeron M 410 @1.46GHz, 1.96G ram<br />&nbsp; &nbsp; &nbsp; &nbsp; Broadcom BCM94311MCG wlan mini-PCI (rev 01)<br />&nbsp; &nbsp; &nbsp; &nbsp; #! 9.04(solid!) and LMDE

    Comment


      #3
      Re: How to: use home on different partition instead of /home

      You are using the mv command on /home - whoa!!! I'd honestly NEVER dare. Always copy or rsync or tar. All you need is the cat to trip over a wire and you can kiss everything good-bye with mv. Also, when copying I am sure you want hidden files and directories to be included which
      Code:
      cp /home /media/"newpartition"
      falls short of.

      I wrote a howto many moons ago when I first felt the need to repartition my install (rather than just reinstalling everything). It is by no means perfect but may help make yours complete

      http://ubuntuforums.org/showthread.p...rtitioningsudo

      BTW and wildly off topic - you mentioned that you wanted to learn programming. Have a look at this course of lectures from Stanford University, the Havard of the West.

      http://www.youtube.com/view_play_lis...A56BC7F4A1F852
      Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

      Comment


        #4
        Re: How to: use home on different partition instead of /home

        Originally posted by ventper

        question: how about sharing the same /home partition for different versions of kubu?
        potential problems concerns when doing so?
        That's a bad idea, IMO. Your customized settings go in the hidden .kde, .mozilla, .config, .mplayer, and many other hidden files. Unless you intend to run 100% identical desktops on your various versions, you'll end up screwed up trying to share the same /home partition among them.

        The better approach, IMO, is to make separate data partition(s) on your hard drive(s), and mount them in /media:

        /media/docs
        /media/videos
        /media/music
        /media/images

        etc. Then, you can symlink them into your /home/user folder for easy access. With your data on its own hard drive partition(s), you can install any Linux version in a 10G partition of its own, complete with /home, and link in your data from its location, with zero risk to your data.


        Comment


          #5
          Re: How to: use home on different partition instead of /home

          thank you dibl for advising on the dangers.
          compaq presario v5208TU, <br />intel mobile 945GM/PM/GMS 943/940GML<br />&nbsp; &nbsp; &nbsp; &nbsp; celeron M 410 @1.46GHz, 1.96G ram<br />&nbsp; &nbsp; &nbsp; &nbsp; Broadcom BCM94311MCG wlan mini-PCI (rev 01)<br />&nbsp; &nbsp; &nbsp; &nbsp; #! 9.04(solid!) and LMDE

          Comment

          Working...
          X