Lost my Home directory

Ubuntu Version:

22.04

Desktop Environment (if applicable):

Gnome

Problem Description:

Relevant System Information:

Screenshots or Error Messages:

What I’ve Tried:


I did something a couple of days ago to try to delete a file from a USB stick. I was getting a lot of notifications about I/O errors from qbittorrent, so I shut down and restarted. Now my desktop runs OK, but nothing shows in the File Manager. Clearly, the data is not lost, but I can't manipulate it. I've had hard drive failures in the past and rebuilt everything, but some of the folders were not backed up anywhere. Anyone have any suggestions on how I could restore /home/user/ or do I need to reinstall?

Let’s first check whether your files are really gone or if it’s only the file-manager (Nautilus) that’s mis-behaving.


See if the data is still on-disk

Open Terminal( Ctrl+Alt+T ) and run

ls -lah $HOME

f you see all your folders (Desktop Documents Downloads …) the data is fine – Nautilus just isn’t showing it.
If you get “No such file or directory” or the listing is empty we need to look at mounts / disk health (skip to step 4).


Restart a stuck Nautilus session

Sometimes Nautilus hangs after I/O errors.

nautilus -q          # quit all running instances
nautilus &           # start it again

Check the window that opens – do your folders appear now?


Fix permissions that might have been changed

If the files exist but Nautilus still shows nothing, incorrect ownership is a common cause:

sudo chown -R "$USER":"$USER" $HOME

Then quit-and-restart Nautilus again.
Still blank? Try resetting its config:

mv ~/.config/nautilus ~/.config/nautilus.old
nautilus -q && nautilus &

Make sure your home partition is mounted

If ls $HOME is empty, confirm the mount:

mount | grep "$HOME"

Nothing returned - the drive that contains /home is not mounted.
Try:

sudo mount -a

If that brings it back, you probably introduced a typo in /etc/fstab while working on the USB stick – edit that file and remove / correct the bad entry.


Run a quick SMART check (in case the disk is mis-behaving)

sudo smartctl -a /dev/sdX        # replace X with the drive your /home sits on

Look for Reallocated_Sector_Ct* and *Pending_Sector_Ct > 0 or lots of errors in the log – that would mean the disk itself is starting to fail and you should copy your data off immediately.


If nothing helps

Boot a Live-USB (Try Ubuntu), open Files there and navigate to your internal drive under “Other locations”. If your home folders show up you can copy them to an external disk before doing anything drastic such as reinstalling.


TL;DR

  • Check with ls $HOME whether the files are still there.
  • If yes – restart / reset Nautilus and fix permissions.
  • If no – make sure your /home partition is mounted and your fstab is correct; inspect disk health.
  • Only consider a reinstall after you’ve verified the data is safely backed up.

Feel free to post any error messages you run into during these steps – that will narrow things down quickly.

1 Like

The first tests all return blank. /home is mounted. But when I tried “sudo smartctl -a /dev/nvme0” Ubuntu replied, “smarctl not found.”

Right now /home shows three folders: Downloads, Mr. Nice Guy, and snap. Mr. … is a movie and should be inside the Downloads folder. These three folders are also displayed on the desktop. The Downloads folder is showing the torrents that qbittorrent is currently replacing, so I can write to /home/roger.

So it looks like I don’t need to reinstall. I can copy the existing Nautilus display from the USB stick and most of the missing folders I can restore from backup. I lose some data, but mostly stuff I haven’t looked at in years. But I’m worried by the absence of smartctl. Does that mean I’m missing other important binaries? I think I would like to manually restore what I can and then upgrade from 22.04 to 24.04, hoping the upgrade will restore those system files which are (perhaps) missing. How does this sound to you?