Tuesday, April 2, 2024

User's Home Mounting Point in Linux: File System Table

 While ago, I decided to dedicate a separate hard-disk to the $HOME directory during the installation of Debian. Recently, after the complete removal of Windows from my PC, and deletion of the associated partition, I found enough space to mount $Home along with the root on the main NVME disk. What I needed to do was to First, open a terminal and login as the root system administrator:

su

Password: ***

The next step was to logout from the current user, take a copy and unmount $HOME partition:

init 1 

mkdir temp_home

cp -r /home/* /temp_home

umount -fl /home

Now, it was time to change the name of the temporary directory:

mv /temp_home /home

By commenting out the corresponding line in the file system table "/etc/fstab", the system would forget about the other partition with the mounting point of $HOME. Saving fstab, it is needed to reload daemons:

systemctl daemon-reload

The last step was to override the ownership of the /home directore:

chown -R user /home/*