Results 1 to 3 of 3

Thread: Move externally mounted directories back into root drive

  1. #1
    Join Date
    Jul 2006
    Beans
    20
    Distro
    Ubuntu 10.04 Lucid Lynx

    Move externally mounted directories back into root drive

    When i set up my system i seperated out some of the folders into their own partitions. i have since realiased that i provisioned the partitions way too much space. i know i could resize them to gain the space back, but what i would like to do instead is move the folders back into the filesystem but on the root partition.

    Currently i have this setup:
    Code:
    sdd
       1 - /
       5 - /tmp
       6 - /var
       7 - /usr
    Is there an easy way for me to move /tmp, /var and /usr back into the / partition? or will i have to boot into a live disc so they aren't mounted and then copy the folders onto the root partition and then remove their entries from the fstab?

  2. #2
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Move externally mounted directories back into root drive

    Quote Originally Posted by its_me_gb View Post
    Is there an easy way for me to move /tmp, /var and /usr back into the / partition? or will i have to boot into a live disc so they aren't mounted and then copy the folders onto the root partition and then remove their entries from the fstab?
    You've answered your own question! The easy way is to boot into a live CD, copy the contents of the /tmp, /var and /usr partitions into the /temp, /var and /usr directories of the root partition and then edit /etc/fstab.

    You won't be able to do that from "inside" your permanent installation, because if you try to copy the files from the /usr partition (for example) into the /usr folder (in which your /usr partition is mounted), you'll be attempting a circular copy, since the system will be trying to copy the files back onto themselves. I guess the process would error out.

    By the way, use the command "sudo cp -av" for the copy. Option -a for recursion and permissions perservation among other things (check man cp for details) , and option -v to get visual feedback. The /usr copy in particular is going to take some time.
    Ubuntu 15.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  3. #3
    Join Date
    Jul 2006
    Beans
    20
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Move externally mounted directories back into root drive

    Heh, i though i might have!

    Thanks for your advice regarding the cp command. i'll give this a go tonight.

Tags for this Thread

Bookmarks

Posting Permissions

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