(Solved)Moving Home Folder

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
LjH
Level 1
Level 1
Posts: 6
Joined: Tue Feb 06, 2018 7:06 pm

(Solved)Moving Home Folder

Post by LjH » Wed Feb 28, 2018 11:05 am

I have a Dell E6430 ATG, Core i7, 1T WD Black 7200rpm HDD.
I just purchased a Crucial MX500 250 GB 2.5" SSD. and a HHD caddy to replace the existing DVD drive.
I plan to physically move my existing 1T WD drive to the DVD bay and install the SSD as the "boot drive" and maintain my Home folder in the 1T.
I will install Mint 18.3 on the SSD from a DVD after I remove the 1T drive and replace it with the SSD.
Now for my question:
Will I be able to remove the operating system from the 1T drive while retaining the Home folder ?
If so what commands will I need to link the 1T to the SSD boot drive?
I have seen a lot of discussion about moving the Home folder to a second HD, but in my situation I am moving the 1T HD to a new location and relegating it to storage only.
Thanks]
Last edited by LjH on Fri Jul 20, 2018 12:24 pm, edited 1 time in total.

Lysander666
Level 3
Level 3
Posts: 124
Joined: Mon Apr 10, 2017 7:06 am

Re: Moving Home Folder

Post by Lysander666 » Wed Feb 28, 2018 12:07 pm

LjH wrote:
Wed Feb 28, 2018 11:05 am
Will I be able to remove the operating system from the 1T drive while retaining the Home folder ?
This depends entirely on how your partitions are set up. Do you have a separate /home partition and / partition? If you do, you can leave the contents of /home on your 1TB drive, delete / and expand the partition [having first installed mint on your SSD and linked to your /home drive]. If not, no, you will not be able to 'remove the operating system' and retain the /home content as well.

EDIT: see below responses, thanks Flemur and Termy.

However, as far as I understand it, you are planning to keep a 250G drive just as a boot drive? A root partition really wouldn't take up more than 30GB very maximum, so you would effectively have 220GB of wasted space on your 'boot drive'.

A far better solution is to keep your 1TB drive as it is, and then just link up your other SSD drive to the motherboard. Mint should automatically see it, and you can use your SSD as a secondary separate data drive. I have three drives, one 80GB SSD with /, /home and /swap, and a secondary and tertiary data drive of 120GB and 250GB.
LjH wrote:
Wed Feb 28, 2018 11:05 am
If so what commands will I need to link the 1T to the SSD boot drive?
You don't need any commands, Mint should automatically see it. If it doesn't you may have to format it with a recognised file system e.g. FAT32.

Code: Select all

sudo umount /dev/sdX
sudo mkfs.vfat /dev/sdX
Alternatively you can start from scratch, backup your /home contents, install mint on your SSD, creating / and /home on it, copy your backup old /home contents over and install your 1TB drive as a data disk. But the way I understand it, you will be wasting a huge amount of space on your SSD if you just want to use it as a 'boot disk'.
Last edited by Lysander666 on Thu Mar 01, 2018 6:13 am, edited 2 times in total.
Debian 9.4 / Slackware 14.2

User avatar
administrollaattori
Level 15
Level 15
Posts: 5881
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Moving Home Folder

Post by administrollaattori » Wed Feb 28, 2018 12:37 pm

Lysander666 wrote:
Wed Feb 28, 2018 12:07 pm
don't need any commands, Mint should automatically see it. If it doesn't you may have to format it with a recognised file system e.g. FAT32.

Code: Select all

sudo umount /dev/sdX
sudo mkfs.vfat /dev/sdX
I suppose that it should be /dev/sdXY instead of /dev/sdX ?

Lysander666
Level 3
Level 3
Posts: 124
Joined: Mon Apr 10, 2017 7:06 am

Re: Moving Home Folder

Post by Lysander666 » Wed Feb 28, 2018 12:43 pm

administrollaattori wrote:
Wed Feb 28, 2018 12:37 pm

I suppose that it should be /dev/sdXY instead of /dev/sdX ?
That is correct, indeed.
Last edited by Lysander666 on Wed Feb 28, 2018 12:53 pm, edited 3 times in total.
Debian 9.4 / Slackware 14.2

User avatar
Flemur
Level 17
Level 17
Posts: 7171
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Moving Home Folder

Post by Flemur » Wed Feb 28, 2018 12:47 pm

LjH wrote:
Wed Feb 28, 2018 11:05 am
Will I be able to remove the operating system from the 1T drive while retaining the Home folder ?
Yes.
If so what commands will I need to link the 1T to the SSD boot drive?
There are a bunch of different ways. Probably the easiest would be do a normal install, then (delete first, then) link either /home or /home/username to a directory on the other disk.
Link format:

Code: Select all

ln -s the-real-file the-link-name
in an "ls -l" listing they show up as

Code: Select all

the-link-name -> the-real-file
like

Code: Select all

.mozilla -> /mnt/DATA/Firefox/mozilla
(I have my firefox profiles on another partition)

Lysander666 wrote:
Wed Feb 28, 2018 12:07 pm
Do you have a separate /home partition and / partition? I...If not, no, you will not be able to 'remove the operating system' and retain the /home content as well.
Sure he can delete the OS - just delete everything on it except /home.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 19.1 Xfce/fluxbox
Manjaro openbox/fluxbox

User avatar
Termy
Level 5
Level 5
Posts: 764
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Moving Home Folder

Post by Termy » Wed Feb 28, 2018 5:35 pm

Will I be able to remove the operating system from the 1T drive while retaining the Home folder ?
Yes. Definitely. As mentioned, there are lots of ways to go about this. My approach is to simply chroot in from a LiveCD, edit the new /etc/fstab with the HOME partition's UUID, and then all is sorted.

The whole "chrooting in" part is simpler than it sounds; need only load a LiveCD, mount the new Linux installation, use something like the blkid command (possibly prefixed with sudo) to get the correct partition's UUID value, then place that in your new /etc/fstab file. This just basically says to the system, "This is what I want you to use for HOME, and just so you know, it has this UUID."

So, for example, the line in /etc/fstab for mounting your HOME partition could look something like this, which is mine, but with a randomly-generated UUID:

Code: Select all

UUID=d62a59ca-504d-4e97-9d4c-1e553dd84141 /home ext4 relatime,nodev,nosuid,noexec 0 2
For further information, see man fstab and possibly man uuid.
Here to help.

I'm LearnLinux (LL) on YouTube: https://www.youtube.com/channel/UCfp-lN ... naEE6NtDSg
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife

Post Reply

Return to “Newbie Questions”