Cannot Move Home Directory

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
Mike365
Level 1
Level 1
Posts: 27
Joined: Wed Jul 02, 2014 7:02 pm

Cannot Move Home Directory

Post by Mike365 » Thu Jun 13, 2019 6:39 pm

Hi I have reinstalled Mint 19.1 on an SSD and my Home folder is on a 2 Tb HDD. During the install process I chose "something else " and mounted the HDD to /Home and did not format it but when I reboot the Home folder is empty as it would be in a completely clean install. I have read that to get the system to see the Home folder I first have to delete everything in the Home folder on the SSD using the RM command and then edit the fstab file by adding the UNID of the HDD.
When I do this and reboot, the system starts booting and starts checking the file system.It gets to about 30% before it stops and displays the following error
You are in emergency mode. After logging in type "journal ct 1-xb" to view system logs, "systemct 1 reboot, system ct 1 default" or "exit" to boot into default mode. Press enter for maintenance. (or press Control -D to continue):
I can mount the HDD and see it on the desktop and access the files but obviously I would prefer it to be the true Home folder.
Can anyone tell me where I am going wrong?
As always any help is very much appreciated

jglen490
Level 5
Level 5
Posts: 507
Joined: Sat Jul 15, 2017 9:57 pm

Re: Cannot Move Home Directory

Post by jglen490 » Thu Jun 13, 2019 7:02 pm

Go back into your /etc/fstab file and make sure the changes took. You did make the changes in sudo, correct?
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

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

Re: Cannot Move Home Directory

Post by Flemur » Thu Jun 13, 2019 7:20 pm

Mike365 wrote:
Thu Jun 13, 2019 6:39 pm
During the install process I chose "something else " and mounted the HDD to /Home and did not format it but when I reboot the Home folder is empty as it would be in a completely clean install.
You don't "mount the HDD to /Home", but you can tell the installer to use a separate partition for /home (not /Home). Did you do that? Namely in the installer, select the partition for /home, then select /home from the "use as" drop down ?

Also, Isn't a completely clean install what you have after the first boot? So what makes you think there's a problem?
It sounds like you can login, at this point anyway, and see /home/username - is that correct?
UNID of the HDD.
UUID of a partition.
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
WharfRat
Level 21
Level 21
Posts: 12897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Cannot Move Home Directory

Post by WharfRat » Thu Jun 13, 2019 8:38 pm

Mike,

You should boot the installation media and take a look at the fstab file, the original home folder and see if there are any files now on the sdb partition

You can paste some information back here if you need to so it would be easier than trying to do things in rescue mode.
ImageImage

Mike365
Level 1
Level 1
Posts: 27
Joined: Wed Jul 02, 2014 7:02 pm

Re: Cannot Move Home Directory

Post by Mike365 » Fri Jun 14, 2019 7:37 pm

Hi guys thank you for replying.

Jglen 490: Yes I did make the changes in sudo and I checked that they had taken.

Flemur: My apologies for the poor terminology, I am fairly new to Linux. During install I clicked on the drive containing my home directory and picked /home from the drop down menu as mount point and chose NOT to format but after reboot it still doesn't see that drive as home.

WharfRat: I have repeated removing /home/mike from the system using the rm command and edited fstab and then rebooted with the same result ie checking file systems until 35% and then hanging. Upon booting with the install media and checking the home folder, it now had /mint in it which includes the usual Desktop, Music, Downloads etc.
Checking fstab shows the line referring to the UUID of the root directory missing which is odd and of course also the line for the UUID of the home directory.
It seems that the reboot is somehow corrupting/changing? the fstab file.

Any clues as to what would be doing this?
Regards Mike

User avatar
WharfRat
Level 21
Level 21
Posts: 12897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Cannot Move Home Directory

Post by WharfRat » Fri Jun 14, 2019 8:58 pm

To start boot the live media and mount the linux root partition to /mnt

Paste back grep -v ^# /mnt/etc/fstab and sudo blkid
ImageImage

jglen490
Level 5
Level 5
Posts: 507
Joined: Sat Jul 15, 2017 9:57 pm

Re: Cannot Move Home Directory

Post by jglen490 » Fri Jun 14, 2019 10:32 pm

O.K., I'm not telling you to do anything different from what WharfRat wants you to do.

I did something very similar to what you are trying to do a few weeks ago. I replaced my primary drive with an SSD. That primary drive had the / partition, the /home partition, and SWAP. I had a secondary drive that had some data stored on it.

When I re-installed Linux using the SSD for the / partition and SWAP, I made a /home/<username> directory on that secondary. I restored my backup /home/<username> to the secondary drive along with the original other data - all under what is now /home/<username>.

I checked the UUID for the new /home partition on the secondary drive, opened up /etc/fstab and made a line with the UUID and referenced /home in that line. Upon reboot, /home was successfully mounted using the correct UUID. When I look at the "Home" under Places in Dolphin, it shows all my data under /home/<username>.

This is what my /etc/fstab file looks like, now. I don't have the "before" view.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=a11e2d42-980f-411f-9c73-dab5ff616804 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=E38A-9EC5  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb1 during installation
UUID=09e6b59d-ce4c-4f26-a606-5351c3daf769 /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
UUID=8827d90e-1afe-4832-b99b-ea74570c42e4 none            swap    sw              0       0
(END)
And here are my drives

Code: Select all

john@john-Desktop:/var/lib/dpkg$ lsblk -f
NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
sda                                                      
├─sda1 vfat         E38A-9EC5                            /boot/efi
├─sda2 ext4         a11e2d42-980f-411f-9c73-dab5ff616804 /
└─sda3 swap         8827d90e-1afe-4832-b99b-ea74570c42e4 [SWAP]
sdb                                                      
└─sdb1 ext4         09e6b59d-ce4c-4f26-a606-5351c3daf769 /home
sr0 
I hope it's useful for you!
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

Mike365
Level 1
Level 1
Posts: 27
Joined: Wed Jul 02, 2014 7:02 pm

Re: Cannot Move Home Directory

Post by Mike365 » Sat Jun 15, 2019 12:11 am

Hi Wharfrat

Sorry but how do I mount the linux root partition to /mnt ?

User avatar
WharfRat
Level 21
Level 21
Posts: 12897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Cannot Move Home Directory

Post by WharfRat » Sat Jun 15, 2019 12:35 am

Mike365 wrote:
Sat Jun 15, 2019 12:11 am
Hi Wharfrat

Sorry but how do I mount the linux root partition to /mnt ?
Run sudo blkid|grep ext4 and the device will be the first field, e.g., /dev/sda3

Then sudo mount -v /dev/sda3 /mnt
ImageImage

Mike365
Level 1
Level 1
Posts: 27
Joined: Wed Jul 02, 2014 7:02 pm

Re: Cannot Move Home Directory

Post by Mike365 » Sat Jun 15, 2019 5:48 pm

Hi Wharfrat
Here is the output of fstab
UUID=d26a90af-e4b6-4b82-b7dd-ab630722e4c2 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
Blkid output is:
sudo blkid
/dev/sda1: UUID="b3696d64-ab78-4aa0-a200-51441f4cf061" TYPE="ext4" PARTUUID="d47aea69-01"
/dev/sdb1: UUID="d26a90af-e4b6-4b82-b7dd-ab630722e4c2" TYPE="ext4" PARTUUID="6adb0e0c-01"
On my system the OS is on sdb1 and home folder is on sda1.

As I said before I have added the line sda1 to the fstab, saved and rebooted but it still doesn't like it.

User avatar
WharfRat
Level 21
Level 21
Posts: 12897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Cannot Move Home Directory

Post by WharfRat » Sat Jun 15, 2019 6:50 pm

It would be a great help if you ran grep -v ^# /mnt/etc/fstab and pasted back the results.
ImageImage

Mike365
Level 1
Level 1
Posts: 27
Joined: Wed Jul 02, 2014 7:02 pm

Re: Cannot Move Home Directory

Post by Mike365 » Sat Jun 15, 2019 9:32 pm

Below is the result of grep -v ^# /mnt/etc/fstab
UUID=d26a90af-e4b6-4b82-b7dd-ab630722e4c2 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0

User avatar
WharfRat
Level 21
Level 21
Posts: 12897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Cannot Move Home Directory

Post by WharfRat » Sat Jun 15, 2019 9:46 pm

Well, there ya go - it's trying to mount your intended new /home as /root :?

In the terminal xed admin:///mnt/etc/fstab and change d26a90af-e4b6-4b82-b7dd-ab630722e4c2 to b3696d64-ab78-4aa0-a200-51441f4cf061

Then reboot to the installed system.
ImageImage

Post Reply

Return to “Installation & Boot”