The officially official Devuan Forum!

You are not logged in.

#1 2019-06-11 02:40:12

Copper36
Member
Registered: 2018-11-27
Posts: 55  

Installation keeping old /home

Hi,
I am planning to install ASCII on a laptop to replace old and venerable Xubuntu 14.04 and I would like to keep my old /home. Except backing everything up, are there any recommendations (general and Devuan/Refracta-specific)? I've never tried it before, but generally it should not be a big problem AFAIK...
Thank you!

Offline

#2 2019-06-11 06:02:03

yeti
Member
From: I'm not here: U R halucinating
Registered: 2017-02-23
Posts: 304  

Re: Installation keeping old /home

Copper36 wrote:

Except backing everything up, are there any recommendations (general and Devuan/Refracta-specific)?

The alternative to having a backup is to have multiple backups.


<πš‹πš˜πšπš’ πš˜πš—πš•πš˜πšŠπš='πšπš˜πšŒπšžπš–πšŽπš—πš.πš‹πš˜πšπš’.πš’πš—πš—πšŽπš›π™·πšƒπ™Όπ™»="π™³πš’πšœπšŠπš‹πš•πšŽ π™Ήπš‚!";'>
π”“π”©π”’π”žπ”°π”’ π”©π”’π”žπ”³π”’ 𝔢𝔬𝔲𝔯 π”£π”žπ”²π”©π”±π”° 𝔦𝔫 𝔱π”₯𝔒 𝔰𝔒𝔠𝔱𝔦𝔬𝔫 π”Ÿπ”’π”©π”¬π”΄ π”žπ”«π”‘ 𝔑𝔬𝔫'𝔱 𝔣𝔬𝔯𝔀𝔒𝔱 𝔱𝔬 π”²π”«π”°π”²π”Ÿπ”°π” π”―π”¦π”Ÿπ”’!

Offline

#3 2019-06-11 11:05:06

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Installation keeping old /home

If you're planning on using refractainstaller's "keep old home" option, my advice is "Don't do it!"  Install everything to one partition and then manually move your home to the old home partition. Or make a symlink in your new home that goes to the old home. If you want more details on how to do it manually, just ask.

Offline

#4 2019-06-11 18:05:20

Copper36
Member
Registered: 2018-11-27
Posts: 55  

Re: Installation keeping old /home

fsmithred wrote:

If you're planning on using refractainstaller's "keep old home" option, my advice is "Don't do it!"

And the reason is? Just curious.

fsmithred wrote:

Install everything to one partition and then manually move your home to the old home partition. Or make a symlink in your new home that goes to the old home. If you want more details on how to do it manually, just ask.

Wouldn't it be easier to do a clean install first and then replace whatever is needed in /home with the copies from the backup? Looks pretty much the same to me, both time-wise and safety-wise.
BTW, I guess the ownership will be preserved in either case if I keep the same username?

Thank you!

Offline

#5 2019-06-11 20:22:58

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Installation keeping old /home

I say not to use that feature because it does not work right or work the way anyone expects it to work. I've removed it from later versions of the installer.

You can do a clean install and copy files from backups. If you have a lot of big files, that could take some time. (I'm a little sensitive about this issue now because I recently had to move a terabyte of wav files.) Also, if you copy files from backup as some user, that user will own the copied files.

And if you just keep the files on the hard drive, keep the same user name and user ID number, then permissions and ownership of your files will be correct.

Offline

#6 2019-06-12 01:52:23

Copper36
Member
Registered: 2018-11-27
Posts: 55  

Re: Installation keeping old /home

Thanks a lot!
Do I understand it correctly that the default user ID for a new ASCII installation is 1000 and I do not need to double-check it?

Last edited by Copper36 (2019-06-12 01:52:44)

Offline

#7 2019-06-12 02:45:28

czeekaj
Member
Registered: 2019-06-12
Posts: 154  

Re: Installation keeping old /home

Apparently experimental.
I've used it many times without fail now.

When you do make a separate home partition, the partition which contains your old home folder must not get wiped. You must have your old user accounts home directory in the root of the partition.

Only issue I have had is when transitioning. If you make a new user name. On the log in screen, if you enter your password right it will try to log in than keep you at the log in. So if that happens log in as root.
Change the directory name to your user name and you should be good to go.

I found it easy if you already separated root and home partitions. Made it work very smoothly if you reuse your user name as well. Just make sure you point the installer to the right partition and it won't wipe it smile.

I don't know much  about having multiple users and different IDs so maybe it might not work properly across a different distribution. Although, your data won't get wiped. Although, I imagine on an lukscrypt it wouldn't be so simple smile

Last edited by czeekaj (2019-06-12 02:49:37)

Offline

#8 2019-06-12 08:48:08

Andre4freedom
Member
Registered: 2017-11-15
Posts: 135  

Re: Installation keeping old /home

A general advise:
1. All-ways keep /home on its own partition, NOT in the root filesystem.
2. Do a backup of /home anyway, regularly and to multiple media.
3. Keep a record of the UID & GID of your users (grep [username] /etc/passwd)
4. This conditions met, it's safe to upgrade, re-install or change to a new system
-- While in the installer:
-- Do NOT format the /home partition, but re-use and connect it to the /home mountpoint
-- Choose a generic username like linuxadmin or so for admin tasks (becomes UID 1000 usually)
-- If your regular user has already UID 1000, then create yourusername in the install program with your username
-- If your UID is other than 1000: after the installation as root:
     # useradd -u XXXX - g YYYY -s /bin/bash -c "some description" [yourusername]
        (don't add the -m option!!)
     # usermod -a -G sudo [yourusername]
     # passwd [yourusername]

5. If everything is followed, the newly re-used user will have all file permission and user-properties as before.
6. Check if you need to add the user to the sudo or wheel group

This way I have easily changed even a distro. Some headaches may occur if the GRUB2 handles MBR or GPT disks not the same way as before. It occurred to me when re-installing Devuan Beowulf over an Ascii installation, I had to re-install Ascii on one computer, but not on the other (BIOS-differences)
I hope this advise helps.
Sincerely, AndrΓ©

Offline

#9 2019-06-12 09:13:52

yeti
Member
From: I'm not here: U R halucinating
Registered: 2017-02-23
Posts: 304  

Re: Installation keeping old /home

Andre4freedom wrote:

3. Keep a record of the UID & GID of your users (grep [username] /etc/passwd)

Just backup /etc too.
And look which software puts stuff in /var that's nice to keep too: Bitlbee, crontabs, mail, tor hidden services directories, ... come to my mind.
If in doubt, backup /var completely.

Maybe we should start a wiki page about what may be worth being backup'd even if someone insists in not having a full backup.

I'm a fan of periodically rsync-ing complete systems to a backup storage.
Not a very sophisticated solution but it already saved my day often enough.


<πš‹πš˜πšπš’ πš˜πš—πš•πš˜πšŠπš='πšπš˜πšŒπšžπš–πšŽπš—πš.πš‹πš˜πšπš’.πš’πš—πš—πšŽπš›π™·πšƒπ™Όπ™»="π™³πš’πšœπšŠπš‹πš•πšŽ π™Ήπš‚!";'>
π”“π”©π”’π”žπ”°π”’ π”©π”’π”žπ”³π”’ 𝔢𝔬𝔲𝔯 π”£π”žπ”²π”©π”±π”° 𝔦𝔫 𝔱π”₯𝔒 𝔰𝔒𝔠𝔱𝔦𝔬𝔫 π”Ÿπ”’π”©π”¬π”΄ π”žπ”«π”‘ 𝔑𝔬𝔫'𝔱 𝔣𝔬𝔯𝔀𝔒𝔱 𝔱𝔬 π”²π”«π”°π”²π”Ÿπ”°π” π”―π”¦π”Ÿπ”’!

Offline

#10 2019-06-12 10:40:47

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Installation keeping old /home

Sharing $HOME between different distributions can cause problems if the software versions are different and the configuration file format has changed, this will make the files in XDG_CONFIG_HOME (~/.config) non-compatible.


Brianna Ghey β€” Rest In Power

Offline

#11 2019-06-12 11:31:50

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Installation keeping old /home

czeekaj wrote:

Apparently experimental.
I've used it many times without fail now.

Good to hear. I'm pretty sure that all it does is make an fstab entry for the home partition. And I think you don't get the new desktop config files that way. Also, if the user name and uid don't match, you have serious problems.

Change the directory name to your user name and you should be good to go.

There are also instances of "/home/$username" in various config files that might need to be changed. The live installer can do this when you select a new user name, but ONLY if you take the new /home that the installer gives you (i.e. it copies the home from the live system.)

First user gets id 1000:1000 in debian and probably all debian-based systems. It's the number that determines who owns the files, not the name.

Offline

#12 2019-06-13 01:27:48

Copper36
Member
Registered: 2018-11-27
Posts: 55  

Re: Installation keeping old /home

Thank you guys for all your input!
The bottom line is that I'll do a clean install and will copy all the needed config files from the backup. There is a lot of unnecessary stuff in /home that have been accumulated over the years, so it needs cleaning anyway...
Thank you!

Offline

Board footer