0

Ubuntu18.04:

I found the space of / directory is not enough.So I tried mounting sdb(formatted through GParted) on /home.

Process:

  1. After formatting a new part sdb4(10G) and sdb5(1.8T) on disk sdb using GParted, I found there was a "!" on /boot/efi part(mounted on sdb1)

  2. mv -rf /home /backup

  3. got uuid of /dev/sdb5 by blkid and edit /etc/fstab

  4. sudo mount -a

  5. I found the sdb5 really mounted on /home by df -h

  6. mv -rf /backup/username /home

  7. reboot (an error occurs on screen "failed deactivating swap /dev/disk/by-uuid/xxxx",but i have commented the swap in /etc/fstab)

  8. come to the log-in interface: after entering password, it come back to the log-in...

So how could I solve this, please?

5
  • You haven't mentioned your OS & release details, but a GUI login requires work files to be created in your $HOME, so if that wasn't setup on your newly formatted disk (ie. directory structure setup with user directories), a GUI login will fall & you'll return to greeter/DM (same issue as if there is no available disk space). However a text login will work allowing you to explore & correct your issue. What OS & release are you using?
    – guiverc
    Oct 10, 2020 at 7:00
  • ubuntu18.04.4 lts
    – Victor Li
    Oct 10, 2020 at 7:03
  • @guiverc What do you mean by " directory structure setup", please?
    – Victor Li
    Oct 10, 2020 at 7:10
  • My $USER is "guiverc", so I need to have a /home/guiverc/ which I own for a GUI to create files there. If you've mounted your /dev/sdb5 to /home/, I'd have to ensure there exists a /guiverc/ in the root directory (the /home/ isn't needed as handled in my example, by the way I'd mount it in my file system table or /etc/fstab entry.
    – guiverc
    Oct 10, 2020 at 7:28
  • There actually exists a /username in /home. After I change the owner of /username, it works. Thank you anyway.@guiverc
    – Victor Li
    Oct 10, 2020 at 7:39

1 Answer 1

0

First of all, we should ensure that /home/username has a non-root owner...

  1. ll /home/username

  2. if "root" exists in the 3rd or 4st column, run: sudo chown username:username /home/username -R

It works for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .