When I first installed endeavor I partitioned my things separately, such that my home has a separate partition. Recently I had some issues and reinstalled the os and was wondering how can I set as the default my separate home partition. Any help on this would be greatly appreciated, thanks!
Wait! What? Did you install on top of the old /home
partition or beside it?
If you reinstalled on top of the old one without choosing to use it for the new install, well, Iām sorry to sayā¦
However, if you installed it beside it without formating, then either you should see your settings (i.e. if you used the same DE) OR you may have to reinstall again, but this time select your old /home
as your new /home
.
why?!? just edit the /etc/fstab
to use the right partition as home
Thatās why I said āmayā. I aināt no expert lol
Could you walk me through that please?
I assume by editing the /home
line in the etc/fstab
file, one would need to first know the UUID of the old /home
partition.
A visual way to find this out is to use gnome-disk-utility
or a similar tool like partitionmanager
on KDE or gparted
.
From gnome-disk-utility
:
- Select your HDD/SSD
- Select the old
/home
partition - Select and copy the UUID to the clipboard
With root privileges
-
Navigate to and open the āfstabā file located at
etc/fstab
-
Locate the line that has /home ā A UUID will be in front of it
-
Remove the current UUID and replace it with the one from your clipboard, i.e. your old /home
-
Save the
etc/fstab
file -
Open your file manager and check to see if your old
/home
is now your new /home
If not,
- Open up a terminal run
sudo grub-mkconfig -o /boot/grub/grub.cfg
- Logout and log back in and give it another check
- Reboot
Is this correct @ricklinux ?
If not, Iāll delete this right away.
So⦠you have
- a new install with home inside the root partition
- the old /home partition
and you want to start using the old /home partition instead of the new home.
Right?
If not, please clarify.
Hi. Would my method work? Asking for myself.
Iām not using gnome-disk-utility but I assume it shows the UUID.
So your method is on the right track.
Some minor additions come to mind:
- the file to edit is
/etc/fstab
- the ānewā and now unnecessary
/home
folder should be cleared of existing files (also the dotfiles!) and subfolders before mounting the old home to it
Yay! No pun intended⦠Iām learning!
Note also that grub.cfg needs not be re-createdā¦
Yes thatās exactly right.
I had a feeling it didnāt, but I was trying to check all my boxes
This is a great way to learn. Especially if trying the commands on a spare machine, or in a virtual machine. Every little detail counts.
Another terminal centric method (among many) is:
- run
lsblk -f
to see the UUID of the old /home partition - edit /etc/fstab (e.g. with
sudo nano /etc/fstab
) and replace the UUID of the /home definition - delete all files and subfolders in the unnecessary /home folder, including file names starting with a dot. This leaves an empty /home folder.
- reboot
Note: be sure to delete files and folders in the correct /home folder.
My /etc/fstab doesnāt have a home type thing, should I add one myself? If so what should i write at the ādefaults,noatimeā¦ā section thing
Yes, since your new installation did not have it.
You can look at what man fstab
says.
Basically not much needs to be added, but check the needed filesystem type with
lsblk -f
.
Why? ā¦
No, it is not needed. The bootloader does not need to know all partitions in FS. Just /
, /boot
(if exists), and the $ESP
(if exists).
Edit: I am still unfocused!
If the file system is the same as /
partition (i.e. ext4), use the same flags, but the numbers at the end of the line should be different ( 0 2
for /home
)
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.