If you have freshly installed system, maybe the easiest way is to install it again and on partitioning you can choose to create /home
partition on other disk and that is basically all you need.
It is not too much to modify working system too. In Linux definition of usage of disks is in config file /etc/fstab
. Every non-comment line there defines how to mount particular filesystem. On your case I suppose you have there something like:
# / was on /dev/sda1 during installation
UUID=ae6abc58-956d-4a4f-9a07-6aa5ab02eb56 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda2 during installation
UUID=6fc82ee1-de18-447b-ac59-443a12c0eabd none swap sw 0 0
Now you need know what is UUID of the partition you want to use as home
-part. For that you may use this command:
$ lsblk -f
This command lists all available filesystems and their UUID-s, also filesystem types. All following assumes your new home-partition uses ext4
filesytem and it is umounted.
Now you could add entry to /etc/fstab
(to edit this file you need root
-permissions, use your preferred editor, for example sudo nano /etc/fstab
):
UUID=[uuid-you-found-in-previous-step] /home2 ext4 defaults 0 2
After creating mounting point with
$ sudo mkdir /home2
you can mount with
$ sudo mount -a
Next problem: you already have directories inside /home
-directory. You can't use /home
directory as mounting point, if this directory contains anything. That's why you can't move your home-directories with one step. For next steps is strongly suggested to log out from grahpical session and to use text console in. You need:
- move all files from
/home
to /home2
(mv /home/* /home2/
)
- change mounting point in
/etc/fstab
: home2 -> home
- reboot
EDIT. Using NTFS-filesystem as /home
will not work. But you can link symbollically from NTFS-tree into your home directory. You may make just one robust link like :
$ ln -s /media/USER/DISK/folder /home/myuser/winfolder
But you may refine it like:
$ ln -s "/media/USER/DISK/folder/My music" /home/myuser/Music
$ ln -s "/media/USER/DISK/folder/My documents" /home/myuser/Documents
$ ln -s /media/USER/DISK/folder/Downloads /home/myuser/Downloads
etc
Last examples assume you remove those directories (Music
etc) before linking.
NEWHOMEFOLDER is not a block device
– KuSpa Feb 24 '17 at 22:44