I recently bought a new hard drive and set it to be my /home
partition. The old one used to be on the root partition, so I just added /dev/sdXX
to my fstab
file. The drive where the root partition lives is quite small, so I was wondering where the old /home
files are now. I just want to remove them to free some disk space (I had already backed up any important stuff into my new ~
). Is there a way to access these files without commenting my /home
line in the fstab file and rebooting to manually delete the files in the old home directory?

- 121
2 Answers
The old files are still there in their directory, and will appear when the new filesystem is unmounted. All you have to do to see them is log out of all sessions, switch to a tty (Ctrl+Alt+F3 to switch to tty3), and log in as root. As the home directory for root is /root
, it is not affected by the new /home
filesystem. Once you're in as root, you may unmount the /home
filesystem with umount /home
. You may now do what you wish with your old files. If you'd like, you can transfer them into your new home directory by mounting the new filesystem on /mnt
with mount /dev/sdb1 /mnt
where /dev/sdb1
is your new home partition. Once you've finished everything, unmount the new home filesystem if you mounted it with umount /mnt
, then re-mount it in the home directory simply with mount /home
.

- 1,167
logout as user, then run as root umount /home && mv /home /home.old && mkdir /home && mount /home

- 14,546
- 1
- 27
- 39