[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: No /



On Tue, Mar 07, 2023 at 05:33:45PM +0100, Michael Lee wrote:
> Is it possible to reinstall the system and still retain the settings,
> logins, etc.? 

I'm assuming you already know about /home and have already taken care
of it.

To answer the question: yes, but not easily.  What you'll want to
do is make a backup copy of the /etc directory before reinstalling.
Then after reinstalling, carefully merge the contents of the old files
into the new files.

For local login accounts, you care about these files:

/etc/passwd
/etc/shadow
/etc/group

Merge the relevant lines (only the accounts *you* added, which correspond
to real humans, not the system accounts) from the backup files into the
reinstalled files, and use the "id" command and friends to verify that
they're working.

If you have user crontabs, you will need to move those over as well.  The
easiest way would be to save the output of "crontab -l" to a file before
the reinstall, and then use "crontab < my-saved-file" afterward, for
each user account that has a crontab.  If you prefer a lower-level approach,
the files are in /var/spool/cron/crontabs/.

For other "settings", whatever that word means, you'll need to find
the relevant files and once again merge contents from the backup version
into the reinstalled version.  This only applies to system-wide
configurations, not to personal settings.  Personal settings are in
/home and would be taken care of simply by not touching /home during
the reinstall.

You might want to start by making a list of all the things you care about,
which you want to migrate to the new system.  Figure out where all of
the files are, which pertain to those things.  Figure out how you'll merge
those files into the reinstalled system.  Just having a list, and having
gone through the mental effort of researching each thing, can make a big
difference.


Reply to: