Find the answer to your Linux question:
Results 1 to 6 of 6
Hi- I am wondering how to go about moving the /home, /usr, /var, and /tmp directories to separate logical partitions away from the / root partition? My current HD partitions ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6

    Moving Directories/Folders To Separate Partitions


    Hi-
    I am wondering how to go about moving the /home, /usr, /var, and /tmp
    directories to separate logical partitions away from the / root partition?
    My current HD partitions are:
    Boot is on hda1 (Primary1)
    Linux swap is on hda2 (Primary2)
    / Root Partition is on hda3 (Primary3)
    hda4 (Extended1) contains:
    hda5 (Logical1) (would like /home to go in here)
    hda6 (Logical2) (would like /usr to go in here)
    hda7 (Logical3) (would like /var to go in here)
    hda8 (logical4) (would like /tmp to go in here)
    Also, how can I access these directories/folders once they are moved to their
    new locations?

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,045
    I'd boot from a live CD, manually mount root and other partitions, cp the info across to the partitions, and modify fstab to point to the new location. I have only moved home folders to a home partition after the install & keep forgetting to preserve properties and have to chown the home folders afterwards.

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6
    Thanks Jonathan for your reply- however, it doesn't elaborate
    enough for me to proceed with this because I am not familiar with
    how to "manually mount root and other partitions" nor how to
    "cp the info across to the partitions" as well as how to "modify
    fstab to point to the new location". Maybe you or someone else
    can please enlighten me...

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,045
    The easy way to set these things up is during the install ... but I guess thats a bit late this time round ... but keep it in mind for your next install.
    Do you have a live CD to boot from? if not then something like Partedmagic will do the job.

    Which distro are you using? and which live CD will you be using?

    Post the output of
    Code:
    fdisk -l
    and
    Code:
    cat /etc/fstab
    Given these we can post commands for your distro and live CD combination.

    I'm not sure why you need separate partitions I usually stick with root and home for each distro plus a swap, that way I don't need to think about how big to make each of the other partitions and won't run out of space on one partition.

  6. #5
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6
    I'm using DSL 4.2.5 (Knoppix 2.7., and read somewhere about the
    pluses of having the /root partition, /home, /usr, /var, and /tmp placed on individual partitions. Mainly so when DSL releases a newer version, I can install it with my current settings, data, and applications left intact, since this version of DSL isn't upgradeable.
    Last edited by RicVic; 04-11-2008 at 03:20 AM. Reason: spelling

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    There is no need to create separate /usr, /tmp and /var partitions unless you are running Server. Separate /root and /home are enough partitions are enough for Desktop machines.
    Its possible to create separate partitions after installation too and thats an easy process.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •