Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Cloning and Partitions with Ubuntu

  1. #1
    Join Date
    Nov 2011
    Beans
    27

    Question Cloning and Partitions with Ubuntu

    Hey, I was wanting to partition my Hard drive, but want to keep my data and ubuntu system separate, but I will have multiple users (3-4 users). I assume /home will house my data (which will be shared between all users, if this is not the case with /home, please correct me) but where will our user profiles be located? in /home or /usr or elsewhere?

    I was asking so that I can clone my / directory but I also want the image file to include user profiles (but not my data).

    This is in case of system corruption or if I just wanted to use the cloned image for a different computer system.

    I would like to know where the user profiles are stored though, that way if I want to update my cloned image I could save the user profile data, wipe the partition, re-image it from the clone, and then update the older user profiles.
    -----------------------------------------------
    BONUS Question: If I encrypt the entire /home folder for better security, can my other users read from it? And can I easily move files between it and a external HD?

    Thanks for your help!

  2. #2
    Join Date
    Sep 2007
    Location
    England / U.S.
    Beans
    277
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Cloning and Partitions with Ubuntu

    user direcotories and their data such as Documents, Pictures and some application settings are stored in the /home directory (partition if separate).

    For example, for a user jimmy and jenny:
    jimmy = /home/jimmy
    jenny = /home/jenny

    Jimmy's /home directory and data is not shared (by default) with Jenny's, neither are any application settings including Unity desktop.
    Linux is not windows // Ubuntu (Quantal:12.10) Guide
    Use descriptive thread titles // Linux... is... not... windows // OSX... is... not... Linux

  3. #3
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Cloning and Partitions with Ubuntu

    Quote Originally Posted by benbrockn View Post
    BONUS Question: If I encrypt the entire /home folder for better security, can my other users read from it? And can I easily move files between it and a external HD?
    The only way they could read your data was if they knew the passphrase.

    As far as I know you can encrypt your home directory during installation, but I am not sure if you can do it post install (but I'm sure it is possible).
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  4. #4
    Join Date
    Nov 2011
    Beans
    27

    Re: Cloning and Partitions with Ubuntu

    Hmm...

    This is a tough decision. I know that if I separate /home from /, I would be able to keep my data (I should say our data since it is a combo of mine and my wife's) separate, but this would exclude user profiles from the main root partition.

    If I leave /home in root, and store our data in a separate partition, I know she would just put her pics and videos, and music in her /home directory and defeat the purpose.

    Is there any way at all to separate the user profiles from /home in a separate directory or Partition maybe? Or any way to disable the pictures/video/music/ etc folders from home or rather, make them shortcuts to a separate data partition?

    I want to keep root as small as possible for quick cloning/upgrading (max 20 GB) and not clone our data (I have 1 TB of random junk that doesn't need to be cloned).

    --------------

    As for encryption, yes I was thinking of encrypting /home from a fresh install, but I may not now until I get the former issues resolved.
    Last edited by benbrockn; November 22nd, 2012 at 12:30 PM.

  5. #5
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Cloning and Partitions with Ubuntu

    Quote Originally Posted by benbrockn View Post
    this would exclude user profiles from the main root partition.
    Is that a big problem? Many people deliberately set their system up to separate /home from /, so that they can reinstall over the top of / and leave the user profiles untouched.

    Or any way to disable the pictures/video/music/ etc folders from home or rather, make them shortcuts to a separate data partition?
    Yep, you can easily link the various folder in a user's home to another location. When she clicks on "Pictures" in her home folder she would actually go to wherever you choose to link to.

    I want to keep root as small as possible for quick cloning/upgrading (max 20 GB)
    20GB is pretty big for a root partition. A clean install is under 5GB IIRC, and you'd need to install a lot of stuff to even get near 10GB (Linux is very efficient about sharing libraries between apps, so it doesn't bloat as much as Windows). The main advantage of having spare space in your root partition is so that the system can create big temp files in /tmp if you're doing something like authoring a DVD that creates GB-sized temp files.

  6. #6
    Join Date
    Nov 2011
    Beans
    27

    Re: Cloning and Partitions with Ubuntu

    @Paqman

    20GB is pretty big for a root partition...The main advantage of having spare space in your root partition is so that the system can create big temp files in /tmp if you're doing something like authoring a DVD that creates GB-sized temp files.
    I would be encoding dvds, audio, etc. How big do you think I should go for root then? Between 10-20GB?

    And as with your suggestions, I will probably set up my HD like this:


    • root
    • swap
    • /home (with picture/music/vid/etc folders linked to Data)
    • data (ext4)


    I think this is a good setup, what does everyone else think? If I do this, how big should I make the /home?

    Also, I know there is the big debate on how big swap space should be and I've read several articles on each side. If I have 6GB RAM (laptop) and 4GB RAM (desktop) I was thinking 2GB of swap for both. (but I will NOT use hibernation on either).

    Let's say I just have 600GB of hard-drive space for both, what would be good for root, swap, and /home with the remaining going on Data?

  7. #7
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Cloning and Partitions with Ubuntu

    Quote Originally Posted by benbrockn View Post
    I would be encoding dvds, audio, etc. How big do you think I should go for root then? Between 10-20GB?
    20GB would be a good conservative amount, 15GB would almost undoubtedly be fine too.


    • root
    • swap
    • /home (with picture/music/vid/etc folders linked to Data)
    • data (ext4)


    I think this is a good setup, what does everyone else think? If I do this, how big should I make the /home?
    Looks fine. How big home is depends on how much data you'll have there. Besides config files you'll also have caches and such.

    However, if you're looking to keep /home as minimalist as possible, is there much point in having it on a partition? If it's only config files and such then it would be really easy to back up if you needed to reinstall. You'd get it all onto a cheap USB stick that you've probably got kicking around in a drawer.

    Also, I know there is the big debate on how big swap space should be and I've read several articles on each side. If I have 6GB RAM (laptop) and 4GB RAM (desktop) I was thinking 2GB of swap for both. (but I will NOT use hibernation on either).
    You have heaps of RAM, so your machines probably won't use swap much. Personally I use a 512MB swap file on my root partition. I don't think there's any need for you to have a swap bigger than 1GB, whether it's a file or a partition.

    Let's say I just have 600GB of hard-drive space for both, what would be good for root, swap, and /home with the remaining going on Data?
    / = 20GB
    swap = 1GB
    /home = 20GB (just in case someone or something puts data there)
    /data = everything else

    Don't sweat about getting it perfect. You can always change the sizes afterwards (although it can be very slow to change large partitions).

  8. #8
    Join Date
    Nov 2011
    Beans
    27

    Re: Cloning and Partitions with Ubuntu

    Looks fine. How big home is depends on how much data you'll have there. Besides config files you'll also have caches and such.
    Yeah, I do want /home to be minimalist but if cache files are/could be located there I want to play it safe.

    I think this model looks good. And yeah I want to try to plan it out perfect, because I have done this before on windows and linux and it is such a pain formatting everything and customizing it, and when done find out that C: or root needs more space.

    Thanks for your help!

  9. #9
    Join Date
    Nov 2011
    Beans
    27

    Re: Cloning and Partitions with Ubuntu

    Other than the user's config file, you also mentioned cache and other stuff. I do not currently have Ubuntu with me so I can't look at it myself. Define "other stuff".

    Is there a way (and if so could you show me it) how to send the user's cache files and any other files of significant size to another location?

    I would be set then! I really only want user config data in /Home (if this is even possible). [I'm assuming that the entire user profile is only compromised of the user's config file, please correct me if I'm wrong, but this is what I gathered from earlier posts]

    This is what I'll do:


    • / (20GB ext4)
    • swap (1 GB)
    • /home (5-10GB ext4 with all docs/photos/music/vids/etc linked to Data, and all cache sent to /)
    • Data (~5XXGB ext4)

    Or if cache/other files cannot be linked elsewhere (or if this is proving difficult) then I'll do this:


    • / (20GB ext4 with all docs/photos/music/vids/etc linked to Data)
    • swap (1 GB)
    • Data (~5XXGB ext4 with user profiles backed up here)
    Last edited by benbrockn; November 23rd, 2012 at 02:25 AM.

  10. #10
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Cloning and Partitions with Ubuntu

    Quote Originally Posted by benbrockn View Post
    Other than the user's config file, you also mentioned cache and other stuff. I do not currently have Ubuntu with me so I can't look at it myself. Define "other stuff".
    All sorts of bits and pieces. Settings for individual apps. The whole contents of their Ubuntu One (ie: files, music, etc). Plus databases. Essentially anything that's specific to a user rather than the system itself.

    If they use Wine then their home folder will also contain an entire fake Windows directory structure (ie: C:\ drive) including the entirety of any Windows apps they install (but not including Windows system files, obviously). If they install a few chunky Windows apps this can get pretty massive.

    Is there a way (and if so could you show me it) how to send the user's cache files and any other files of significant size to another location?
    That would start getting pretty fiddly, and would have to be done for every single app that has a cache. So a fair bit of work to set up and maintain. Essentially however in Linux is completely possible to link any location on a filesystem to any other location.

    You can create a symlink in the file manager using Edit > Make link, or you can hold CTRL-SHIFT and drag it to the new location. Multiple tabs are handy for the latter.

    [I'm assuming that the entire user profile is only compromised of the user's config file, please correct me if I'm wrong, but this is what I gathered from earlier posts]
    It's composed of heaps and heaps of little config files. Conceptually Linux isn't a single system, it's a highly modular collection of little programs all cooperating. So each wee component will have it's own config file.

Page 1 of 2 12 LastLast

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
  •