Ask Your Question

How to access "hidden" partition?

asked 2016-04-24 15:10:06 -0500

treville gravatar image

Hi, I reinstalled my Fedora 23 today and made a mistake in the process: originally, I had the following partitions:


My intent was to reformat /, /boot and swap, and leave /home alone: I used Anaconda, which displayed the empty new Fedora installation (as expected) and the existing Fedora installation with the above partitions; I then selected /, checked the "reformat" checkbox, validated and got / moved from the existing to the new installation. All good. Same for /boot and swap. For /home, essentially same process, without checking the "reformat" box.

And launched the installation. Something must have gone awry, because now I can't see my /home partition ! Here is what I see:

[root@chaplin ~]# df -kh
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                        3.9G     0  3.9G   0% /dev
tmpfs                           3.9G  408K  3.9G   1% /dev/shm
tmpfs                           3.9G  1.4M  3.9G   1% /run
tmpfs                           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/vg_chaplin-lv_root   40G  3.9G   34G  11% /
tmpfs                           3.9G  100K  3.9G   1% /tmp
/dev/sda3                       477M  111M  337M  25% /boot
tmpfs                           794M  8.0K  794M   1% /run/user/42
tmpfs                           794M   32K  794M   1% /run/user/0

Previously, I would have had an extra line:

/dev/mapper/vg_chaplin-lv_home  xxG  xxG   xxG  xx% /home

This partition /home was about 900 Gb. My feeling is that somehow Anaconda "forgot" to reuse the old /home; and that maybe this old /home is still accessible. My question is: how can I access it?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-04-25 17:18:32 -0500

treville gravatar image

Thanks for the pointers, you saved my life! For the records, here is what I did:

  • I ran lsblk -f, which gave me the UUID of the "masked" partition: by the way, I'd love to understand how this command works: I was under the impression that the partition table of my sda5 drive was incomplete, yet lsblk was able to list all partitions attached to this drive, including the masked g_chaplin-lv_home. Flabbergasting :-)

  • I created a /media/home directory: sudo mkdir /media/home

  • I added a new line to /etc/fstab:

    UUID=my_uuid /media/home ext4 ro,suid,dev,exec,auto,nouser,async 1 2

(surely you can just use "defaults" for the option field, but I was not in the mood of taking more risks, and I wanted to mount the partition "ro" first)

  • then I actually mounted the partition: sudo mount -a
  • at this stage, cd /media/home, take a big breath, and yes, everything is there!
  • I rebooted, at the grub splash screen, I modified the command to boot into runlevel 3. This is done by typing the key e to edit the desired line, turning it into something like:

    linux16 /vmlinuz-4.2.3-300.fc23.x86_64 root=/dev/mapper/vg_chaplin-lv_root ro 3 LANG=en_US.UTF-8

(the important bit is the digit 3 around the end)

  • I ran fedora using the above command line, and logged in as root (so that I would not need the /home directory)
  • backed up /home with mv /home /old_home for extra care

  • modified /etc/fstab again with the final line:

    UUID=my_uuid /home ext4 defaults 1 2

  • and rebooted to finally return to a pristine system!

edit flag offensive delete link more


Wow. I'm glad it worked out!

jtlinux gravatar imagejtlinux ( 2016-04-27 01:53:41 -0500 )edit

answered 2016-04-25 01:18:40 -0500

jtlinux gravatar image

updated 2016-04-25 01:20:55 -0500

Fstab is what you're looking for.

I believe lsblk -f will show you the information you need, and then you can use that to edit your /etc/fstab file.

But since your system will have already created a home directory for you, you have some extra work to do to move things around and such. Check out this guide for things that apply to your situation:

Ubuntu Help: Moving

And here's some general info about fstab:

Fedora Project Docs: Add to /etc/fstab

Ask Fedora: How to mount...

edit flag offensive delete link more

Question Tools


Asked: 2016-04-24 15:10:06 -0500

Seen: 218 times

Last updated: Apr 25 '16