1

On my laptop, I have Windows 8 installed (on the internal solid state drive). I have another external hard drive with an installation of Ubuntu (with the EFI, /, /home, and swap partitions located on it).

All of my data is located on my internal drive, because I don't bring my hard drive around with me everywhere. Thus, my /home folder (and all sub folders) don't really contain anything.

This isn't very major, but more of an inconvenience. To access any of my data, I have to manually select my internal drive, and go through a plethora of other folders. For example, most of my important data is located at /media/D0BC1650BC163208/Users/my_user_name/skydrive.

Of course, I can create symbolic links to get everywhere I want to, but it would be nice if I could simply change the /home folder (to my_user_name), my documents folder, etc.

Of course, I know I would have to make sure the internal drive always gets mounted first.

Is there a simple way to do this?

I think this might be the easiest way, but I'm not sure.

2 Answers 2

2

It is technically possible to do this using a bind mount in your fstab. However, having your home directory on a Windows NTFS filesystem, as you are suggesting, will cause problems as NTFS doesn't support Unix permissions. (For instance, sshd checks the permissions in your ~/.ssh directory and refuses to start if they are too liberal.)

Changing the document folder locations, as in the answer you linked, is a better solution. Well-behaved apps will default to the chosen location on your internal drive in their Save As dialogs, etc.; they will still store their configuration in your Linux home directory, avoiding permissions problems.

0

I had the same task and I ran these comands (in 12.04LTS) to solve it, using the explanation of the URL: http://efectoreinaroja.wordpress.com/2009/01/25/cambiar-ubicacion-de-directorio-home/ (In Spanish) and it WORK PERFECTLY!:

  1. I have a partition for Windows Data in ntfs: named /sda6 but you must use your ntfs partition) Atention this partition must not contain Windows OS! and you must have installed "ntfs-3g".
  2. I Mount this partition in /media (but you can use /mnt too): sudo mkdir /media/whome sudo mount /dev/sda6 /media/whome
  3. Now I copied the directory /home to the directory /media/whome (using cpio instead cp) cd /home/ sudo find . -depth -print0 | cpio --null --sparse -pvd /media/whome/
  4. Now I dismount the partition: sudo umount /media/whome
  5. Now to prevent keep the old home in backup folder: sudo mv /home /respaldo
  6. Now mount the new partition /home: sudo mkdir /home sudo mount /dev/sda6 /home
  7. Now the most important, to mount this partition every boot system: sudo cp /etc/fstab /etc/fstab.bk (security backup) sudo gedit /etc/fstab

    and add this line at the end: /dev/sda6 /home ntfs nodev,nosuid 0 2

and thats all

If all work well, then you can remove the backup home data: rm -r /respaldo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .