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

Thread: How to move /home or atleast doc., music, pic., etc.

  1. #1
    Join Date
    Oct 2011
    Beans
    8

    Question How to move /home or atleast doc., music, pic., etc.

    OK, let me begin by saying that I am a complete newbie to Ubuntu.

    Background: I am running Ubuntu 11.10 64-bit. I am dual booting with Windows 7. I have three partitions on my hard drive. The first one (/dev/sda1) is where I have Windows 7. Then on the second on (/dev/sda2) I have it labled "Storage" where I want to share files such as my pictures or documents between to the two OS's. And on the 3rd (/deva/sda3) I have sda5 and sda6. Sda5 has the files for Ubuntu and sda6 is Linux swap.

    Problem: As mentioned earlier, I want to share files on my partition marked "Storage" on /dev/sda2. It is formatted NTFS. I was wondering how to move /home/max/Documents, /home/max/Pictures, /home/max/Downloads, /home/max/Videos, and /home/max/Music to /media/Storage/.

    If I am not being clear enough let me know and I will do my best to try and explain myself. Thank you so much for the help in advance.

  2. #2
    Join Date
    Jul 2010
    Beans
    24

    Re: How to move /home or atleast doc., music, pic., etc.

    your best option would be soft links:
    to make /media/hd/home the new home folder
    # mv /home /media/hd/home DO NOT continue unless this step succeeds as you will lose everything
    # rm -r /home
    # ln -s /media/hd/home /home
    Even if I did have a super cool and unique signature, you don't think I would be dumb enough to put it here where you could steel it do you.

  3. #3
    Join Date
    Dec 2009
    Beans
    5,943

    Re: How to move /home or atleast doc., music, pic., etc.

    Is the /media/Storage partition mounted automatically when you boot? In other words do you have an entry in /etc/fstab for that partition?

    If you do then I would use "bind". Try the following as an experiment to illustrate what I mean:

    [1] Create a "test" directory in your home folder
    Code:
    mkdir /home/max/Test
    [2] Create an identical folder in your "Storage" partition
    Code:
     mkdir /media/Storage/Test
    [3] Bind the two together ( temporarily ):
    Code:
    sudo mount --bind /media/Storage/Test /home/max/Test
    Now add a file to /home/max/Test and look at the contents of /media/Storage/Test. They should be the same.

    If you unmount the bind:
    Code:
    sudo umount /home/max/Test
    The contents of Test in your home directory will be empty but the contents of Test in the Storage partition will contain the added file.

    I would not put your entire home directory on an NTFS partition but you can copy each of the subfolders in your home directory over to /media/Storage, use bind to have all these subdirectories connect back to your home directory, and you can have this done automatically at boot: http://ubuntuforums.org/showthread.p...2#post10899012

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How to move /home or atleast doc., music, pic., etc.

    I think 9072997 suggestion is dangerous as the hidden files & folder in /home have to have Linux ownership & permissions. You cannot move all of /home to NTFS and link back. It might work if the other partition was not NTFS but it is not necessary.

    I often refer to Morbius1's posts on mounting and using bindfs, but I use simple linking as I do not need all of the advantages that bindfs has.

    If you have partition mounted in /mnt/Storage and it has a folder Music you can do this. If you have the default /home/Music you have to rename or delete (if no data) first.

    #from home so default location of link is in /home/fred or your /home.
    mv Music oldMusic
    # Music is a folder in the partition mounted as /mnt/Storage
    ln -s /mnt/Storage/Music
    I have not tried it, but if your are in the folder /home/fred/max I think the above would put the link there or in the link command you can specify the to location rather than let it default to where you are.
    Last edited by oldfred; December 17th, 2011 at 09:42 PM.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

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

    Re: How to move /home or atleast doc., music, pic., etc.

    Quote Originally Posted by oldfred View Post
    You cannot move all of /home to NTFS and link back.
    +1

    You can link the individual folders in your home to another location, or you could mount them through /etc/fstab, but I wouldn't move your whole home folder.

  6. #6
    Join Date
    Dec 2009
    Beans
    5,943

    Re: How to move /home or atleast doc., music, pic., etc.

    For the record I'm not using bindfs but bind especially since bindfs won't install in the latest Ubuntu

    The only reason I don't line symlinks is because I use Samba and Samba doesn't allow any client to follow symlinks. It can be overridden but Samba's not hot on the idea.

    Nothing wrong with symlinks and that's the "normal" way this sort of thing is done, I've just never liked them. If the folders aren't being shared across the network then bind may be overkill I suppose. The way my system is set up I have a /Data partition and a /home directory not a separate home partition. I use bind to link them back so if I change OS's my data is preserved.

    Different paths to the same destination.

  7. #7
    Join Date
    Oct 2009
    Location
    apt-get
    Beans
    4,280
    Distro
    Xubuntu 16.04 Xenial Xerus

    Smile Re: How to move /home or atleast doc., music, pic., etc.

    Quote Originally Posted by Dragonpoet View Post
    OK, let me begin by saying that I am a complete newbie to Ubuntu.

    Background: I am running Ubuntu 11.10 64-bit. I am dual booting with Windows 7. I have three partitions on my hard drive. The first one (/dev/sda1) is where I have Windows 7. Then on the second on (/dev/sda2) I have it labled "Storage" where I want to share files such as my pictures or documents between to the two OS's. And on the 3rd (/deva/sda3) I have sda5 and sda6. Sda5 has the files for Ubuntu and sda6 is Linux swap.

    Problem: As mentioned earlier, I want to share files on my partition marked "Storage" on /dev/sda2. It is formatted NTFS. I was wondering how to move /home/max/Documents, /home/max/Pictures, /home/max/Downloads, /home/max/Videos, and /home/max/Music to /media/Storage/.

    If I am not being clear enough let me know and I will do my best to try and explain myself. Thank you so much for the help in advance.
    Hello and Welcome to Ubuntu Forum

    There is a better way with LESS headache, call it a shortcut if you want
    Instead of all that (moving, copying, etc), do one simple thing: use "sda2" which is your "Storage" drive to store these files (Photos, Music, Docs, etc) instead of having that on your /home folder (looks like you don't have a separate /home partition). End of story
    In this way, both Systems will have access to these files. You don't need two copies, you don't need copy-paste or move-paste, you just need to store them in one place which is accessible by both systems. Luckily, I don't need that anymore because I no more Dual-Boot nor Multi-Boot with Windows but I understand your case is different.

    Linux, by default, read/write from/to NTFS Partitions.
    Windows, by default, CAN NOT read/write from/to Linux File Systems (say ext4).

    This is what I would do if I were you.
    Last edited by amjjawad; December 18th, 2011 at 01:11 AM.

  8. #8
    Join Date
    Oct 2011
    Beans
    8

    Talking Re: How to move /home or atleast doc., music, pic., etc.

    Thanks everyone for the help. But instead of moving my entire /home, what if I just move the documents, pictures, download, videos and music folders and to the "Storage" partition? How would I go about doing that with Ubuntu recognizing that those 5 folders on the "Storage" partition (or sda2) are actually part of the /home files? Thanks for the help thus far!

  9. #9
    Join Date
    Oct 2009
    Location
    apt-get
    Beans
    4,280
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How to move /home or atleast doc., music, pic., etc.

    Quote Originally Posted by Dragonpoet View Post
    But instead of moving my entire /home, what if I just move the documents, pictures, download, videos and music folders and to the "Storage" partition? How would I go about doing that with Ubuntu recognizing that those 5 folders on the "Storage" partition (or sda2) are actually part of the /home files? Thanks for the help thus far!
    By default, you should be able to do so. While you are logged in to Ubuntu, go to your Home Folder and Move the Files/Folders to your other partition which MUST be mounted of course before that.

    Hope I understood your Q probably.

  10. #10
    Join Date
    Oct 2011
    Beans
    8

    Re: How to move /home or atleast doc., music, pic., etc.

    Quote Originally Posted by amjjawad View Post
    By default, you should be able to do so. While you are logged in to Ubuntu, go to your Home Folder and Move the Files/Folders to your other partition which MUST be mounted of course before that.

    Hope I understood your Q probably.
    I tried that. I was able to merge the folders, but it doesn't recognize that I want them to be the default folder locations.

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
  •