Black screen after login because of /home move to a new partition

Hi all.

I’ve decided to move my /home to a separate partition. I’ve done that using this guide (I know it’s for ubuntu, but I’ve been assured it works the same for fedora). After that, everything was working well for a few days, but today it broke.

After I log in normally with the gui, the screen goes black and I see nothing but my cursor. I’ve found a workaround to that situation: switching to a different virtual terminal (Ctrl+Alt+F2), logging in and writing startx. It shows my desktop with (almost) everything configured how I left it.

One more thing I’ve noticed is that, after restoring desktop, every instance of konsole starts on path / instead of /home/tom/, which in my mind points to a problem with properly linking home.

I’m using Fedora 37 with KDE Plasma 5.27.3.
I’ve modified /etc/fstab/ in the following way:

#
# /etc/fstab
# Created by anaconda on Sat Mar  4 08:17:08 2023
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=c165668b-237d-4aea-8e5c-7eb04f757f47 /                       ext4    defaults        1 1
UUID=2AB3-80AE          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
UUID=8f05bbf1-5243-4fdf-ad68-617c5767d6ab      /home      ext4      defaults      1 1

It seems possible that selinux may be an issue, depending upon how the content of /home was copied.

To check and verify that is not an issue maybe running sudo restorecon -R -v /home would be worth the try, then see if there is any difference when booting. You could pipe the output of restorecon to a file so it logs any changes made for you to peruse later, or just watch it as it works.

Reviewing the link you provided, it is really old (2006) though mostly correct.
Fedora uses ext4 and not ext3 for the file system. Was that new partition properly formatted before mounting? (yes I see the fstab entry and that seems correct as long as you used the proper UUID)
How was the content of /home copied over?
There seems one error in the linked instructions, and that is because the content of an actively mounted and in use file system was copied over. Potentially changes could have occurred (and probably did) in that file system while the copy was in progress which would mean the ‘copy’ was not an exact copy. If the user was logged in as the root user and the /home directory was not in use at the time it was copied this would not be an issue.

Personally I would use the command sudo rsync -av /home/ /mnt/newhome/ for doing the copy to ensure everything (including the selinux attributes) was copied. I am not sure the suggested command handles selinux attributes, but have not tried it to find out.

I’ve run sudo restorecon -R -v /home, it relabels a bunch of files, most relevant seem to be .serverauth files. This didn’t change any behavior.

I’ve used ext4 in all commands and the partition was properly formatted before files were copied over. I’ve double-checked, the UUID is correct.

Going by the article, I’ve used this command to copy: find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/

To try your command, I’ve booted using livecd, mounted both partitions and copied using command sudo rsync -av -A -X /mnt/fedora/old_home/ /mnt/newhome/ (I’ve mounted system partition as fedora and home partition as newhome), but this didn’t fix the issue. I’ve added the flags as they seemed relevant.

Check for failed services:

systemctl --failed

Also make sure the output is empty:

sudo mount -a

No failed services reported and second command’s output is empty.

That UUID is correct?

Is /home mounted after startup? If not, why?

Yes, I’ve triple-checked it.

/home is mounted after setup.

It sounds unrelated to the home move.
Try booting with an earlier kernel version.

1 Like

I’ve solved the issue, apparently all I had to do was to press enter a couple of times after log in. Or maybe it was just more time for kde to load? I also did all the commands from this thread and tried booting with different kernels – I don’t know what finally worked.
Either way, I’m closing the thread. Thank you for your help!