1

I installed a new ubuntu but I didn't delete my home folder because I have essential data in it. but after reinstalling I have a new home folder and my previous home folder mounts as drive. how I can merge this drive or add to my previous home folder?

thanks

mchid
  • 44,904
  • 8
  • 102
  • 162
user1099913
  • 127
  • 1
  • 8

1 Answers1

2

To achieve that you will have to set which partition gets mounted as /home. That involves editing your /etc/fstab.

First make sure your present home folder is empty. Then find out what is the partition name of your home drive, use sudo fdisk -l for that. I am going to assume its /dev/sdaX for this post, replace it with yours.

Then find out its uuid

sudo blkid | grep /dev/sdaX

Take note of UUID and TYPE. Now open your fstab file for editing

gksudo gedit /etc/fstab

Fill in a new entry like this,

UUID=xxxxx  /home  ext4  rw,relatime,data=ordered   0 2

Replace xxxxx with your uuid and ext4 with your TYPE. You could change spaces between columns as you see fit. Reboot your linux and you're done!!

IMPORTANT NOTE! If you have a separate partition for /home already , you will have to remove its entry from /etc/fstab as you can't mount two drives to same folder.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
H. Freeze
  • 531