Linux Mint: Moving /home onto separate partition

Tested and worked on Mint 8.1 Serena.

Source: https://help.ubuntu.com/community/Partitioning/Home/Moving

If I want independent /home partition.

1. Run LiveCD/LiveUSB to partition disk as pleased [backup data if don’t want any risk in loosing it]

  • to partition use GParted – if not present – install from repository [Software Manager]
  • if password is set – needs to be entered whenever needed
  • format partition as ext4

2. Create mount point [copy-paste text in dark black field into TERMINAL and hit enter]

  • red text means this needs to be taken from my Linux as it is different to everyone or could  change after next installation
    sudo mkdir /mnt/home

3. Find out the UUID= for your data partition

sudo blkid

200017

4. Open your fstab file and make an entry to auto-mount the data partition on boot

gksu gedit /etc/fstab

if nothing is happening install from repository gedit                 

5. Add these two lines to the end of fstab file

  • Ext4 formatted partition
# Mount HOME partition under /mnt/home

UUID=ceee2524-7df2-4d21-a1f7-9e7e55c722cc  /mnt/home ext4  defaults  0  2

6. Run in terminal

sudo mount -a

for now newly created /home partition will be mounted under /mnt/home

7. Below command will copy everything from original /home folder to newly created /mnt/home

sudo rsync -aXS --exclude='/*/.gvfs' /home/. /mnt/home/.

8. Change fstab file

gksu gedit /etc/fstab

replace /mnt/home  with /home

# Mount HOME partition under /home

UUID=ceee2524-7df2-4d21-a1f7-9e7e55c722cc  /home ext4  defaults  0  2

6. Run in terminal

sudo mount -a

now newly created /home partition will be mounted under /home

7. Run application Disks

2017

after highlighting home partition it will show /home if everything was done correctly

to make sure all is OK, system can be rebooted

*mnt – this location is universal and will always work, although different one can be used, and other guides can use instead of mnt other locations like: home / media

Advertisements

Linux Mint: creating and using data partition in already installed system

Worked on Mint 8.1 Serena

If I want separate data partition.

  1. Run LiveCD/LiveUSB to partition disk as pleased [backup data if don’t want any risk in loosing it]
  • to partition use GParted – if not present – install from repository [Software Manager]
  • if password is set – needs to entered whenever needed]
  • format partition as ext4

2. Create mount point [copy-paste text in dark black field into TERMINAL and hit enter]

  • red text means this needs to be taken from my Linux as it is different to everyone or could  change after next installation
    sudo mkdir /mnt/data

3. Mount the partition [start application to find out which one it is: Preferences >> Disks]

screenshot-from-2017
sudo mount /dev/sda4 /mnt/data

4. Take ownership of the mount point

sudo chown -R yourusername: /mnt/data

5. Find out the UUID= for your data partition

sudo blkid

screenshot-from-2017

6. Open your fstab file and make an entry to auto-mount the data partition on boot

gksu gedit /etc/fstab
  • if nothing is happening install from repository gedit                                                                 

7. Add these two lines to the end of fstab file

  • if it is an Ext4 formatted partition
# Mount DATA partition under /mnt/data

UUID=ceee2524-7df2-4d21-a1f7-9e7e55c722cc  /mnt/data ext4  defaults  0  2
  • if it is NTFS formatted partition
# Mount DATA partition under /mnt/data

UUID=747D4C9C1EFAD1F2     /mnt/data     ntfs-3g     defaults,windows_names,locale=en_US.utf8     0     0

8. Save the changes to fstab and close the text editor.

9. Run in terminal

sudo mount -a

10. Run application Disks  again

screenshot-from-2017

after highlighting data partition it will show /mnt/data if everything was done correctly

to make sure all is OK, system can be rebooted

*mnt – this location is universal and will always work, although different one can be used, and other guides can use instead of mnt other locations like: home / media

source: https://community.linuxmint.com/tutorial/view/1609