Score:0

Unable to find /home/username

fr flag

I was installing a software app on Ubuntu 22.04. After installation was complete, my system shows this:

screenshot

I can't find my home, document, desktop folders. I think while installing the software, I choose the path to /home and it overwrote everything. What should I do now? Any solutions please

I was installing mathematica software via the terminal. It showed that the default path /usr/local/wolfram/mathematica does not have enough space available, so I provided a new path /home for the installation. It asked to overwrite the content and I think I typed yes. After software install completion I could not find anything on my desktop and my home folder also went missing.

David avatar
cn flag
It would help to know what it is and how you were installing this software.
Ishfaq Rather avatar
fr flag
I was installing mathematica software via terminal. It showed that the default path /usr/local/wolfram/mathematica does not have enough space available, so I provided a new path /home for the installation. After further process, it showed to overwrite the content and I think I typed yes. After software completion, I could find anything on my desk top and home folder also went missing
David avatar
cn flag
And the exact commands you used? Please edit the question and add the info there instead of a comment.
David avatar
cn flag
OK so you were out of disk space and instead of aborting and fixing the issue you went ahead? Sorry what ever was in the home directory is gone.
Ishfaq Rather avatar
fr flag
With everything gone from home directory, I was trying to do a clean installation of ubuntu 22. While booting from usb it showed Minimal Bash line is supported. Then I used 1. set prefix=(hd0, msdos1) /boot/grub 2. Insmod normal 3. Normal and it showed try Or install ubuntu. When I click it shows error: file casper/vmlinuz not found. I don't understand what's going on. Is there anyway I can remove every piece of everything and do a neat and clean installation
David avatar
cn flag
Here is what I would suggest you do. This is only a suggestion. Download a fresh copy of Ubuntu 22.04 desktop from the web site. Verify it is good https://ubuntu.com/tutorials/how-to-verify-ubuntu#1-overview . Make a fresh bootable USB I recommend with Rufus software. All the while following this guide https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview Something to keep in mind this all started when you tried to install that software and there was no disk space for it.
David avatar
cn flag
I would be asking myself where did the disk space go. I do not know how big your drive was or why you choose to make the partitions the way you did. Unless you have a special need let the install make the default partitions. Less chance of running out of space in a single partition.
Ishfaq Rather avatar
fr flag
It was a human error and I fully accept it. Now, I made a bootable usb. When I switched on the laptop, it shows the same thing "Minimal Bash line.... " thing and I can't even go back to my previously original linux. Reboot the system and it shows it again.
Score:1
cn flag

Something happened to your home folder. We know even less than you what might have happened to it. So take a look.

If another account with root permissions is available on the system, log in on that one. Else, you can boot into a recovery prompt from the Grub menu. Yet another option is to start a live session. In brief, make sure that in one or another way, you can look at and work with your system disk.

Check the "/home" directory on the system partition (which, if that one is mounted e.g. on "/mnt" in a live session, would be /mnt/home). Presumably, judging from your screenshot, your home directory will not be there, at least not under the expected name "ishfaq".

  • Check whether it may be there under another name. If that is the case, changing the name back to the original name may already suffice to make your system bootable again, provided no other harm was done to its contents.

  • If that does not work, create a fresh account:

    • create a new home folder, make sure it has permissions 775, and make your user the owner and group.
    • Copy the hidden files (including .profile amd .bashrc) over from /etc/skel to that new home folder.

Now shut down and reboot: you will now be able to login to your account. However, you will be greeted with a shiny new factory default desktop.

At least, your system is working again at that point. You can then continue to see whether you still can recover files from the original home directory. If you do not find any of the old home data, you will need to reconfigure your desktop and copy your data back from your backup.

terdon avatar
cn flag
The OP's edit makes it clear they have deleted everything in `/home`.
Ishfaq Rather avatar
fr flag
My system freezes when I click on the files icon repeatedly showing unable to find /home/Ishfaq. I can't do anything
vanadium avatar
cn flag
@terdon, not to me. In my answer, I therefore make no assumption on how the situation really is - I do not think the info allows that. In my answer, I hint on how the user can take a look at the current situation, and, in the worst case, make sure the user can log in bacl again.
Score:1
cn flag

You have deleted your home directory, as well as the directories of any other user of your system. You will need to restore from backup. /home is not your home directory, it is the directory in which all users' home directories are stored. So when you said "yes" to overwriting /home, you deleted everything in there, including your home directory.

If you have a backup, you can restore from it. If you don't, you're basically out of luck, but can try some of the options explained here: How to recover deleted files?

vanadium avatar
cn flag
Many users do not backup (and wisely so) their entire home including hidden files, so you should not assume that. You can, however, assume that they backup their personal data. In the latter case, the advise is reinstall then restore your user data. Much more users (anyone who backups his personal data) will be able to do that rather than restoring an entire /home.
terdon avatar
cn flag
@vanadium I am not assuming anything, really. I am just saying that _if_ they have a backup, they can restore from it. I don't really understand why you would consider it wise to not backup hidden files, those are among the most important things for me as they have all my settings, but either way, if the OP gave `/home` as an installation target and said "yes" when asked if the contents should be overwritten, it seems clear to me that `/home` has been emptied so restoring from a backup is the only thing left.
vanadium avatar
cn flag
Configuration is replaceable, and may change with new versions. Backing that up is by far less essential than backing up user data, which, once lost, is irretrievably lost.
terdon avatar
cn flag
@vanadium yes, but why would it be wise to not backup the configuration? I can see why it might be wise to not restore it blindly from backup on a new install (although I admit I have been doing that for a couple of decades now and have never had any major issues, but I know my way around the system), but why would you explicitly try not to back it up? Dotfiles are tiny and can be super important so I see no harm and considerable benefit in backing them up.
vanadium avatar
cn flag
Backups take efforts. If users manage to back up their data, I am fully happy, and they are fully safe. Users knowing their way around the system of course can and will backup dotfiles as well, for convenience when reinstalling. Again, I do not consider this essential. Personally, I store selected dotfiles in a directory under Documents, which I "push" to the appropriate locations (using symlinks) using the tool stow. This way, these dotfiles are backed up along with the Documents folder.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.