Score:-1

Why my home partition is 5gb and not showed in df -H nor Gparted?

be flag

after experiencing a persistent issue with Ubuntu (black screen after booting) that I was able to bypass sometimes by running the recovery mode or reinstalling Ubuntu from terminal (that was accessible with F4), but that I didn't manage to solve, I decided to reinstall ubuntu from pen drive. I've selected reinstall ubuntu and it boots correctly now. The issue is that my home partition if I check the properties in the home directory is 5,9 Gb (3.5 contents and 2,4 free space) whereas it used to be 180Gb

after running df -H here's what i get:

Filesystem      Size  Used Avail Use% Mounted on
tmpfs           1,7G  2,1M  1,7G   1% /run
/dev/sda4        20G   17G  2,3G  88% /           #Root
tmpfs           8,4G     0  8,4G   0% /dev/shm
tmpfs           5,3M  4,1k  5,3M   1% /run/lock
/dev/sda2       100M   33M   68M  33% /boot/efi
tmpfs           1,7G  2,5M  1,7G   1% /run/user/1000
/dev/sda6       190G   68G  113G  38% /media/piero/35b234c9-6e6b-433d-afd2-a3dedf7cdea6  #ex Home
/dev/sda3       280G  265G   15G  95% /media/piero/AE1CE4451CE40A63                 #Windows partition

As you can see there is not even an /home partition, /dev/sda6 used to be my home partition before reinstalling ubuntu and /dev/sda4 should still be the root.

I can access the other partition (/dev/sda3, root and ex home) with Nautilus (+ Other locations), so i guess my current home is somewhere else. Is there a way to set my ex home as home again?

Another interesting thing is that swap is clearly visible on gparted as 5.57 Gb, but on the System monitor appears to be 2,1 Gb

Is my SSD damaged? is something else damaged? I can also reinstall ubuntu again, I have backups, but I don't know how to avoid this issue

Clarifications: I use Ubuntu desktop, the version used to be and is Ubuntu 22.04.2 LTS. and I have selected the Reinstall Ubuntu option (documents... will be kept.) to do the installation

I've assumed that my home is a partition because I have a clear statement of the free space (2,4 Gb) since I'm not an expert I don't know if you can limit the space of the home directory

Luuk avatar
cn flag
I think you can solve that by reading about fstab: https://help.ubuntu.com/community/Fstab (It is the file which takes care of mounting the different disks to the correct directory.)
hu flag
There is no separate home partition, neither 5 not 180 GB. Note that a home partition and a home directory are not the same. This was likely caused by the way you've reinstalled Ubuntu.
guiverc avatar
cn flag
You don't provide many specifics; you mention Ubuntu but not which Ubuntu product (Ubuntu Server? Ubuntu Desktop? a *flavor* etc) nor what release of that product. Your re-install likely was **not** identical to your initial install in that you didn't specify to re-use your home directory, but you didn't mention any specifics as to what product/release & thus installer you used.
user535733 avatar
cn flag
The needless profanity deters answers.
oldfred avatar
cn flag
If you have now saved in the default /home, you need to move that data to /home partition before mounting it in fstab. [Move Home](https://help.ubuntu.com/community/Partitioning/Home/Moving) When you want more than the default / (root) partition you have to specify which partition is /home. It normally auto finds existing ESP & swap. But if not swap partition, it defaults to a swap file of 2GB. Check mount of swap in fstab.
cn flag
"with Nautilus" Nautilus shows LOCATIONS. A partition is one, a directory is one too. Your /home is part of /. There is nothing wrong with your setup. For your personal files I'd use a personal dir and not /home. Is a lot more portable and easier backup. You can even use one of the externals you have there.
pierofoust avatar
be flag
@Rinzwind I like the idea of not setting a home partition and set a Home directory, so maybe I also wouldn't have to bother to enlarge the root partition every time it gets full, but at the moment I feel so close to restart coding that I don't want to redesign the disk... but I'll do that in case I'll have to restart again!
pierofoust avatar
be flag
Thanks to all for the valuable replies and lectures, as a humble novice I take everything as a useful lesson. The issue was resolved following @oldfred advices, if you want to publish it as an answer I'd like to set it as the answer. So my home was inside the root partition and I only had little space because of the system files. By carefully following the [Tutorial](https://help.ubuntu.com/community/Partitioning/Home/Moving) I was able to set the home partition and swap space back again (for the swap I only had to specify the "Device file", which is /dev/sda5 in my case, in the fstab file)
Score:1
cn flag

When installing first time or reinstalling you have to use Something Else install option to be able to add a partition like /home. Installer by default creates only / (root) and ESP if one does not exist. It will use a swap file if no swap partition exists or is manually added during install.

If you have now saved in the default /home, you need to move that data to /home partition before mounting it in fstab. When you want more than the default / (root) partition you have to specify which partition is /home. It normally auto finds existing ESP & swap. But if no swap partition, it defaults to a swap file of 2GB. Check mount of swap in fstab.

Detailed steps on moving data in /home folder in root to a separate /home partition. If any data in /home folder in /, you need to copy that first or it will get hidden under the mount of /home partition.

https://help.ubuntu.com/community/Partitioning/Home/Moving

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.