Page 1 of 1

[SOLVED] mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 9th, '21, 10:09
by vmunich
Hi everyone,

my system is running Mageia7, I want to install the new Mageia8.

Usually I don't choose use the upgrader Mga7->Mga8 and do a backup of my /home, then copy the files back when the new Mageia has been installed.

I simply like the idea of having a clean fresh system to (re)start with.

my /home is on a separate partition (different from the partition where / is)

However, my question is: if I don't format my /home, and just install Mageia8 (and create the same user as on my previous Mageia7) , how easy/difficult will it be to have my users be able to use their data/preferences etc.. again
How about permissions ?
Do I have to adjust "manually" UID/GID ?

Thank you
Vincent

Re: mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 9th, '21, 10:28
by sturmvogel
If you didn't screw or modified your UID under Mga7, there is absolutely no problem to expect if you keep your home.

Re: mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 9th, '21, 10:31
by vmunich
Thanks Sturmvogel for your reply.

Will config files (e.g. for browsers, LibreOffice...) be upgraded to the new softwares ?
I probably don't have the same version of Chrome or LibreOffice on the old and on the new system...

Re: mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 9th, '21, 12:17
by sturmvogel
If it is only the version difference between the packages from Mga 7 and 8, then it is usually no problem. If there are changes, the config files get upgraded.

Re: mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 9th, '21, 13:28
by isadora
Please, don't forget to mark the topic [SOLVED].
You can do so, by editing the subject/title in the first message in this topic.
Write [SOLVED] to the left of subject/title, thanks ahead. ;)

Re: [SOLVED] mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 9th, '21, 14:01
by vmunich
Done :->

Just a last question: in the case when I do not format my /home and just create the same users I had before the new install, are the permissions then set automatically ?

In other words: if I had a user called USER1 on my mageia7 system, and if I create a user called USER1 on my newly installed mageia8, will USER1 have the same permissions on the same files as he had before the install ???

Best,
Vincent

Re: [SOLVED] mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 9th, '21, 14:14
by dalto
vmunich wrote:In other words: if I had a user called USER1 on my mageia7 system, and if I create a user called USER1 on my newly installed mageia8, will USER1 have the same permissions on the same files as he had before the install ???

As long as the UIDs and GIDs are the same, yes. If you create the new users with different UIDs, you will have to alter the permissions on the files to match.

EDIT: You can set the UIDs of the user create during install by clicking on advanced

Re: [SOLVED] mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 27th, '21, 08:20
by artee
Quick comment: it is possible to adjust user UID and GID afterwards too (adjust /etc/passwd and /etc/group as root and logon the user again or reboot), potentially a faster fix than to chown -R [user].[user] /home/[user] and other user owned files (if any).

Re: [SOLVED] mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 27th, '21, 17:11
by dalto
artee wrote:Quick comment: it is possible to adjust user UID and GID afterwards too


Yes, you can change it with usermod. For example, if you want to change user bob's udi and gid to 1002 you could do:
Code: Select all
sudo usermod -u 1002 -g 1002 bob


The group must already exist, if you need to change an existing group id you can use:
Code: Select all
sudo groupmod -g 1002 bob

Re: [SOLVED] mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 27th, '21, 18:49
by doktor5000
Usually at the point where you run usermod to change UID/GID you always have to run chown -R --from because a user gets his home populated from /etc/skel which you would need to fix because those files are not accessible otherwise. A simple login will not fix ownership/group.

Re: [SOLVED] mageia8 install: keep /home of mga7 ?!

PostPosted: Jul 28th, '21, 01:43
by zeebra
vmunich wrote:Done :->

Just a last question: in the case when I do not format my /home and just create the same users I had before the new install, are the permissions then set automatically ?

In other words: if I had a user called USER1 on my mageia7 system, and if I create a user called USER1 on my newly installed mageia8, will USER1 have the same permissions on the same files as he had before the install ???

Best,
Vincent


Just an additional comment from someone who almost always use the same /home. The config files in /home are usually just read by program x, which means old setting will persist and you can continue to use program x as before without any additinal setup. This goes for your desktop etc too. That is unless the program/desktop changes the way it reads/uses config files in /home. An example of this is when Mozilla Firefox switched from the old profile system to their new profile system.

So in the end it depends on the software, but usually those config files are used and your software will basically look the same as before you reinstalled Mageia (or any other distro).

Secondly, during the installation process, you can set both the UID and GID of any users you create during the installation. This is very practical in these kind of scenarios, to make sure your new user/UID group/GID matches the old setup. But generally, if you DON*T want to do this manually, you SHOULD set up any users in your new installatiion IN THE SAME ORDER as you did in the old system. Just note down the current UID/GID of your users on your system, then add those users in the new insstallation in the correct order (to get the "correct"/corresponding UID/GID automatically)