How to Display a Partition That is Not Visible in Linux?
I installed dual-boot Windows 11 with Linux Mint on my laptop and allocated almost 110 GB of hard disk size for Linux Mint. However, after Linux Mint is installed, only 49 GB of hard disk size is displayed.
Problem
How to display a partition that is not visible in Linux?
Solution
I have a hard disk of almost 500GB and I installed dual-boot Linux Mint alongside Windows Boot Manager where the last two partitions are used as Linux partitions like in the image below:
From the image above you can see that 2 partitions in Linux have a hard disk size of 60 GB and 49 GB respectively. But when I display the hard disk size using df -h command, I just see only one partition like in the image below:
After I searched on the internet, the root cause of the invisible partition was not mounted. Here are the steps to display an invisible Linux partition and I want to mount it to my /home folder:
1. Backup the folder
Backup first the folder you want and in this case the /home folder I will backup first:
sudo cp -a /home /home_backup
2. Check the filesystem
Check the filesystem of the partition using the command below:
sudo lsblk -f
From the image above, the “invisible” partition has an ext4 format type. If the partition is not formatted, format it using the command below if you want an ext4 format for the partition and adjust it to the name of your Linux partition:
sudo mkfs.ext4 /dev/nvme0n1p5
3. Create a temporary mount
Now, create a temporary mount and move existing home data using the commands below:
sudo mkdir /mnt/new_home
sudo mount /dev/nvme0n1p5 /mnt/new_home
sudo cp -a /home/. /mnt/new_home/
4. Unmount the temporary mount
Use the command below to unmount the temporary mount:
sudo umount /mnt/new_home
5. Update the fstab file
Now, update the /etc/fstab file to it at /home on boot so the folder remains after the device restarts. Copy the script below and paste to the file:
/dev/nvme0n1p5 /home ext4 defaults 0 2
6. Mount the folder
Now, mount the /home folder using the commands below:
sudo mount /home
sudo systemctl daemon-reload
df -h
For more details see the image below:
From the image above, you see that the invisible partition is already mounted to the /home folder.
Note
Try to reboot the device to make sure the folder remains after the device reboots and the /home folder should be mounted from /dev/nvme0n1p5. If something goes wrong, you can restore the old home with the command below:
sudo mv /home_backup /home
And then remove the fstab entry to boot normally. Once you have restarted the appliance and you see that there is no error so that you can access the folder you just created (in this case the /home folder), you can delete the /home_backup folder by using the command below:
rm -rf /home_backup
















































