Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #255683 > unrolled thread

No /

Started byMichael Lee <mlee2@t-online.de>
First post2023-03-07 17:40 +0100
Last post2023-03-16 08:30 +0100
Articles 20 — 14 participants

Back to article view | Back to linux.debian.user


Contents

  No / Michael Lee <mlee2@t-online.de> - 2023-03-07 17:40 +0100
    Re: No / Greg Wooledge <greg@wooledge.org> - 2023-03-07 17:50 +0100
    Re: No / Charles Curley <charlescurley@charlescurley.com> - 2023-03-07 18:00 +0100
    Re: No / Alain D D Williams <addw@phcomp.co.uk> - 2023-03-07 18:10 +0100
      Re: No / Nicolas George <george@nsup.org> - 2023-03-07 19:10 +0100
    Re: No / Dan Ritter <dsr@randomstring.org> - 2023-03-07 18:10 +0100
      Re: No / Michael Lee <mlee2@t-online.de> - 2023-03-13 18:20 +0100
    Re: No / Jeffrey Walton <noloader@gmail.com> - 2023-03-07 18:50 +0100
    Re: No / <tomas@tuxteam.de> - 2023-03-07 19:40 +0100
      Re: No / David Wright <deblis@lionunicorn.co.uk> - 2023-03-08 00:10 +0100
        Re: No / Rodrigo Cunha <rodrigo.root.rj@gmail.com> - 2023-03-08 06:30 +0100
        Re: No / <tomas@tuxteam.de> - 2023-03-08 06:50 +0100
        Re: No / Tom Furie <tom@furie.org.uk> - 2023-03-08 13:50 +0100
          Re: No / Thomas Hochstein <thh@thh.name> - 2023-03-09 07:40 +0100
          Re: No / Michael Lee <m-lee@t-online.de> - 2023-03-13 18:50 +0100
            Re: No / David Wright <deblis@lionunicorn.co.uk> - 2023-03-13 20:10 +0100
              Re: No / Michael Lee <mlee2@t-online.de> - 2023-03-14 10:50 +0100
              Re: No / Michael Lee <m-lee@t-online.de> - 2023-03-15 17:30 +0100
                Re: No / Michael Stone <mstone@debian.org> - 2023-03-15 18:20 +0100
                  Re: No / <tomas@tuxteam.de> - 2023-03-16 08:30 +0100

#255683 — No /

FromMichael Lee <mlee2@t-online.de>
Date2023-03-07 17:40 +0100
SubjectNo /
Message-ID<G6Iw1-aOD5-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Is it possible to reinstall the system and still retain the settings,
logins, etc.? 

Michael Lee

[toc] | [next] | [standalone]


#255684

FromGreg Wooledge <greg@wooledge.org>
Date2023-03-07 17:50 +0100
Message-ID<G6IFI-aOGA-3@gated-at.bofh.it>
In reply to#255683
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.

[toc] | [prev] | [next] | [standalone]


#255685

FromCharles Curley <charlescurley@charlescurley.com>
Date2023-03-07 18:00 +0100
Message-ID<G6IPn-aOKc-5@gated-at.bofh.it>
In reply to#255683
On Tue, 07 Mar 2023 17:33:45 +0100
Michael Lee <mlee2@t-online.de> wrote:

> Is it possible to reinstall the system and still retain the settings,
> logins, etc.? 

If you mean do a fresh installation, probably not.

First off, make sure you back up everything you are likely to want. You
can restore from your backups after the installation. You should be
doing regular backups anyway.

You can mitigate some of this by having a separate /home directory, but
that introduces new problems: old versions of users' configuration
files may not work with new versions of the software, or may not be
exactly what you want. But that doesn't preserve system settings in
/etc (where login information resides) and elsewhere.

I make backups of stuff I am likely to want (/etc, e.g.). After a new
installation, I copy the backups to a separate directory in /. If I
find I need an old version of a file, it's right there.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

[toc] | [prev] | [next] | [standalone]


#255687

FromAlain D D Williams <addw@phcomp.co.uk>
Date2023-03-07 18:10 +0100
Message-ID<G6IZ3-aP36-1@gated-at.bofh.it>
In reply to#255683
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.? 

This is what backups are for. I assume that you have something.

> Michael Lee

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  https://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: https://www.phcomp.co.uk/Contact.html
#include <std_disclaimer.h>

[toc] | [prev] | [next] | [standalone]


#255690

FromNicolas George <george@nsup.org>
Date2023-03-07 19:10 +0100
Message-ID<G6JV8-aPD5-11@gated-at.bofh.it>
In reply to#255687

[Multipart message — attachments visible in raw view] — view raw

Alain D D Williams (12023-03-07):
> > Is it possible to reinstall the system and still retain the settings,
> > logins, etc.? 
> This is what backups are for.

No it is not, that is complete nonsense.

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#255688

FromDan Ritter <dsr@randomstring.org>
Date2023-03-07 18:10 +0100
Message-ID<G6IZ3-aP36-5@gated-at.bofh.it>
In reply to#255683
Michael Lee wrote: 
> Is it possible to reinstall the system and still retain the settings,
> logins, etc.? 

Not as such.

That said: what do you actually want to accomplish? There may be
ways to do what you want with less effort.

-dsr-

[toc] | [prev] | [next] | [standalone]


#255984

FromMichael Lee <mlee2@t-online.de>
Date2023-03-13 18:20 +0100
Message-ID<G8U01-ceZm-1@gated-at.bofh.it>
In reply to#255688

[Multipart message — attachments visible in raw view] — view raw

I'd like to help my system find its root, and so be able to complete
the boot up.
Michael

Am Dienstag, dem 07.03.2023 um 11:45 -0500 schrieb Dan Ritter:
> Michael Lee wrote: 
> > Is it possible to reinstall the system and still retain the
> > settings,
> > logins, etc.? 
> 
> Not as such.
> 
> That said: what do you actually want to accomplish? There may be
> ways to do what you want with less effort.
> 
> -dsr-
> 

[toc] | [prev] | [next] | [standalone]


#255689

FromJeffrey Walton <noloader@gmail.com>
Date2023-03-07 18:50 +0100
Message-ID<G6JBL-aPgB-7@gated-at.bofh.it>
In reply to#255683
On Tue, Mar 7, 2023 at 11:34 AM Michael Lee <mlee2@t-online.de> wrote:
>
> Is it possible to reinstall the system and still retain the settings, logins, etc.?

Also see Data Management,
https://www.debian.org/doc/manuals/debian-reference/ch10.en.html .

Jeff

[toc] | [prev] | [next] | [standalone]


#255691

From<tomas@tuxteam.de>
Date2023-03-07 19:40 +0100
Message-ID<G6Ko9-aPN7-3@gated-at.bofh.it>
In reply to#255683

[Multipart message — attachments visible in raw view] — view raw

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.? 

That depends on what you understand by "settings, logins, etc".

As others have said in this thread: what are you trying to achieve?
Why do you want to reinstall the system?

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#255698

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2023-03-08 00:10 +0100
Message-ID<G6OBr-aSzr-3@gated-at.bofh.it>
In reply to#255691
On Tue 07 Mar 2023 at 19:36:04 (+0100), tomas@tuxteam.de wrote:
> 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.? 
> 
> That depends on what you understand by "settings, logins, etc".
> 
> As others have said in this thread: what are you trying to achieve?
> Why do you want to reinstall the system?

https://lists.debian.org/debian-user/2023/03/msg00064.html

one might assume. BTRfs is w-a-y beyond my ken.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#255701

FromRodrigo Cunha <rodrigo.root.rj@gmail.com>
Date2023-03-08 06:30 +0100
Message-ID<G6Uxb-aWfu-1@gated-at.bofh.it>
In reply to#255698

[Multipart message — attachments visible in raw view] — view raw

It does not work if you want to use this host like a secure
server(server.key). So why do you not install a new server with the same
configuration? Commonly is suitable to install two servers, migrate
services, and switch at an appropriate time.

On Tue, Mar 7, 2023 at 8:05 PM David Wright <deblis@lionunicorn.co.uk>
wrote:

> On Tue 07 Mar 2023 at 19:36:04 (+0100), tomas@tuxteam.de wrote:
> > 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.?
> >
> > That depends on what you understand by "settings, logins, etc".
> >
> > As others have said in this thread: what are you trying to achieve?
> > Why do you want to reinstall the system?
>
> https://lists.debian.org/debian-user/2023/03/msg00064.html
>
> one might assume. BTRfs is w-a-y beyond my ken.
>
> Cheers,
> David.
>
>

-- 
Atenciosamente,
Rodrigo da Silva Cunha
São Gonçalo, RJ - Brasil

[toc] | [prev] | [next] | [standalone]


#255702

From<tomas@tuxteam.de>
Date2023-03-08 06:50 +0100
Message-ID<G6UQx-aWmZ-1@gated-at.bofh.it>
In reply to#255698

[Multipart message — attachments visible in raw view] — view raw

On Tue, Mar 07, 2023 at 05:04:57PM -0600, David Wright wrote:
> On Tue 07 Mar 2023 at 19:36:04 (+0100), tomas@tuxteam.de wrote:
> > 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.? 
> > 
> > That depends on what you understand by "settings, logins, etc".
> > 
> > As others have said in this thread: what are you trying to achieve?
> > Why do you want to reinstall the system?
> 
> https://lists.debian.org/debian-user/2023/03/msg00064.html

Uh, oh.

If it's that, I'd try with /etc, /var, /home (and possibly others).
But this will only work if "the OS" [1] before and after are similar
enough.

Manual intervention might be unavoidable.

Cheers

[1] "The OS" is the "bunch of relevant applications". Yes, handwavy,
   but so was your request :)

-- 
t

[toc] | [prev] | [next] | [standalone]


#255704

FromTom Furie <tom@furie.org.uk>
Date2023-03-08 13:50 +0100
Message-ID<G71oZ-b160-3@gated-at.bofh.it>
In reply to#255698

[Multipart message — attachments visible in raw view] — view raw

On Tue, Mar 07, 2023 at 05:04:57PM -0600, David Wright wrote:
> https://lists.debian.org/debian-user/2023/03/msg00064.html

Was the /dev/sdc mentioned there the USB drive?

Cheers,
Tom

-- 
Love your enemies: they'll go crazy trying to figure out what you're up to.

[toc] | [prev] | [next] | [standalone]


#255714

FromThomas Hochstein <thh@thh.name>
Date2023-03-09 07:40 +0100
Message-ID<G7i6u-bcfP-3@gated-at.bofh.it>
In reply to#255704
Tom Furie wrote:

> On Tue, Mar 07, 2023 at 05:04:57PM -0600, David Wright wrote:
>> https://lists.debian.org/debian-user/2023/03/msg00064.html
> 
> Was the /dev/sdc mentioned there the USB drive?

Obviously not.

[toc] | [prev] | [next] | [standalone]


#255987

FromMichael Lee <m-lee@t-online.de>
Date2023-03-13 18:50 +0100
Message-ID<G8Ut3-cf9q-5@gated-at.bofh.it>
In reply to#255704

[Multipart message — attachments visible in raw view] — view raw

Hello Tom, thanks for the reply. Good detective work. 

No, actually not; it's the SSD with the Debian on it. 

Michael

Am Mittwoch, dem 08.03.2023 um 12:45 +0000 schrieb Tom Furie:

[toc] | [prev] | [next] | [standalone]


#255992

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2023-03-13 20:10 +0100
Message-ID<G8VIt-cg5F-13@gated-at.bofh.it>
In reply to#255987
On Mon 13 Mar 2023 at 18:30:00 (+0100), Michael Lee wrote:
> Hello Tom, thanks for the reply. Good detective work. 
> 
> No, actually not; it's the SSD with the Debian on it. 

My detective work is limited to putting 1 and 1 together, your
posts in this case. Anyway, let's hazard a guess at what the
scenario might have been.

1 Debian 11 was running from sdc2 as root (ie /, not /root).
2 You removed a USB stick without unmounting it.
3 You typed reboot (or equivalent) intending to run another OS,
  but things didn't get that far.
4 Closing down Debian 11 was taking too long, maybe because of 2.
5 You powered off by holding down the power button.
6 You now get the symptoms described earlier.

So would this be roughly equivalent to how one should recover
a BTR filesystem's integrity after a power cut happens?

If this is so, it might be worth describing things in those terms,
and posting under a Subject like:

  Recovering a BTR filsystem after a power outage.

As for the last clause of your earlier post, I think you'd have
to give some idea of the disposition of your Debian system;
whether directories are spread over more than one partition,
and hence which settings would be affected were you to reinstall.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#256023

FromMichael Lee <mlee2@t-online.de>
Date2023-03-14 10:50 +0100
Message-ID<G99s5-coB7-1@gated-at.bofh.it>
In reply to#255992

[Multipart message — attachments visible in raw view] — view raw

Thanks David. Steps 1 through 6 describe just how the present drama
unfolded. Good thinking. 

Am Montag, dem 13.03.2023 um 14:03 -0500 schrieb David Wright:

[toc] | [prev] | [next] | [standalone]


#256059

FromMichael Lee <m-lee@t-online.de>
Date2023-03-15 17:30 +0100
Message-ID<G9CaJ-cGAu-3@gated-at.bofh.it>
In reply to#255992

[Multipart message — attachments visible in raw view] — view raw

Thanks David. Steps 1 through 6 describe just how the present drama
unfolded. Good thinking. This is, I imagine, also what happens anytime
power is taken away before COW has been able to do its thing. 
Is there a way to fix this, or is a re-installation the only remedy?

Michael
Am Montag, dem 13.03.2023 um 14:03 -0500 schrieb David Wright:

[toc] | [prev] | [next] | [standalone]


#256060

FromMichael Stone <mstone@debian.org>
Date2023-03-15 18:20 +0100
Message-ID<G9CX7-cH7q-7@gated-at.bofh.it>
In reply to#256059
On Wed, Mar 15, 2023 at 05:05:49PM +0100, Michael Lee wrote:
>Is there a way to fix this, or is a re-installation the only remedy?

For all the things people like about btrfs, IME it's not as good at 
recovery from adverse events as are ext4 or xfs. In your circumstance 
your best bet is probably a reinstall. (Hopefully from backups to make 
this easier, as was suggested several days ago but shouted down for no 
apparent reason.)

A step to try if you haven't already is to try to run "btrfs check" on 
the filesystem from the initramfs prompt. There's a --repair option 
which you may be able to add to correct the problem if the check can 
identify what's wrong.

Your last hope option would be to boot from an install cd in recovery 
mode or a live cd and to see if that version of "btrfs check" can fix 
it. The newer the boot media, the later the version of the btrfs-progs 
package and (probably) the better it will do at recovery. bullseye is 
version 5.x, bookworm or bullseye-backports have version 6.x.

[toc] | [prev] | [next] | [standalone]


#256090

From<tomas@tuxteam.de>
Date2023-03-16 08:30 +0100
Message-ID<G9QdH-cPEd-3@gated-at.bofh.it>
In reply to#256060

[Multipart message — attachments visible in raw view] — view raw

On Wed, Mar 15, 2023 at 01:15:00PM -0400, Michael Stone wrote:
> On Wed, Mar 15, 2023 at 05:05:49PM +0100, Michael Lee wrote:
> > Is there a way to fix this, or is a re-installation the only remedy?
> 
> For all the things people like about btrfs, IME it's not as good at recovery
> from adverse events [...]

A last ditch (if something isn't in the backups) would be to try
PhotoRec on the file system image. Backups are preferrable, of
course.

Cheers
-- 
t

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web