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

Re: Return a Debian system to a pristine state

On Sun 31 May 2020 at 16:28:34 (+0700), Victor Sudakov wrote:
> David Wright wrote:
> > On Fri 29 May 2020 at 21:57:06 (+0700), Victor Sudakov wrote:
> > > David Wright wrote:
> > > > Finally,   pkg delete -a   sounds like something from the abattoir,
> > > > rather than anything you'd do to a pet (to use your analogy).
> > > 
> > > It's not as terrible as it sounds ;-) It's more from a vet clinic than
> > > from a slaughterhouse. You don't lose configs, you don't lose network
> > > connectivity or remote access during this procedure. You can save a list
> > > of installed packages before deleting them, and reinstall only those you
> > > know you need.
> > > 
> > > Unfortunately, the FreeBSD package system is not as mature as DEB or
> > > RPM, therefore until very recently the "pkg delete -a" procedure has
> > > been required to get rid of the dependencey hell.
> > 
> > OK, that sounds more like what people do on Windows systems, where
> > there's a reset option, except that on Windows you can, ISTR, lose
> > all your own files if they're under C:.
> Since what version does Windows have a reset option?

No idea. The last version of Windows that I used was IIRC 3.11.
I parted company when W95 came with "DOS" 7 rather than a
successor to DOS 6.22.

> For dozens of
> years, literally, Windows has been notorious for leftovers of removed
> programs remaining in the "base system" and causing unexpected effects.
> There were even commercial products on the market to purge those leftovers.

You're way ahead of me on Windows, then. I just know what I've seen,
and what I saw was this:

Chapter 3. Lenovo OneKey Recovery system
  The Lenovo OneKey Recovery system is software designed to back up and
  restore your computer. You can use it to restore the system partition to its
  original status in case of a system failure. You can also create user backups
  for easy restoration as required.
   Note: To utilize the features of the OneKey Recovery system, your hard disk already
         includes a hidden partition by default to store the system image file and the OneKey
         Recovery system program files. This default partition is hidden for security reasons,
         which explains why the available disk space is less than the stated capacity.
· Backing up the system partition
  You can back up the system partition to an image file. To back up the system
  1 Press the Novo button to start the Lenovo OneKey Recovery system.
  2 Click System Backup.
  3 Select a back-up location and click Next to start the backup.
   • You can choose a back-up location on the local hard disk drive or an external storage device.
   • The back-up process may take a while.
   • The back-up process is only available when Windows can be started normally.
· Restoring
  You can choose to restore the system partition to its original status or to a
  previously created back-up point. To restore the system partition:
  1 Press the Novo button to start the Lenovo OneKey Recovery system.
  2 Click System Recovery. The computer will restart to the recovery environment.
  3 Follow the on-screen instructions to restore the system partition to its
      original status or to a previously created back-up point.
   • The recovery process is irreversible. Make sure to back up any data you wish to save on
      the system partition before starting the recovery process.
   • The recovery process may take a while. So be sure to connect the AC power adapter to
      your computer during the recovery process.
   • The above instructions should be followed when Windows can be started normally.
  If Windows cannot be started, follow the steps below to start the Lenovo
  OneKey Recovery system:
1 Shut down the computer.
2 Press the Novo button. From Novo Button Menu, select System recovery
  and press Enter.

This laptop has three partitions coded 2700 which I presume are for
supporting this, plus a partition coded ed01 which I presume is the
code executed from the "Novo" button. I've only used this button to
switch to BIOS for linux, from EFI/Windows.

> FreeBSD is different in this respect. No part of third-party software
> ever gets into the base system (unless you install something manually
> and incorrectly).

This has already been pointed out, that Debian's installed system is
an individual outcome, not some sort of mandated selection.

> And of course you don't lose any user data if you run 
> "pkg delete -a"

I didn't know we were discussing user data at all.

> > Debian doesn't work that way: you can remove packages from the system
> > at will in a controlled manner. Isn't that what sysadmins do?
> Well, I was not feeling particulary sysadmin-ish about the desktop
> system I wanted to cleanup.

How you feel about it can't alter the fact that reverting a system by
removing packages is a sysadmin-ish process: you administering the

> > > > "apt has a bug, cannot believe it!"
> > > > https://lists.debian.org/debian-user/2020/05/msg00567.html
> > > 
> > > Well, I must admit, I can sympathize with this person's frustration. He
> > > just got confused among those AutoRemove* advanced options. 
> > 
> > I think it's much more than that. The OP appeared to regard the
> > --no-install-recommends option as a *property* that is applied to each
> > package installed under that recommendation regime, and that
> > that property would be preserved for all time. But as the "-install-"
> > in --no-install-recommends shows, it's just an option for the install
> > command itself.
> Dare I say that one needs knowledge beyond a regular user to understand
> these subtleties? 

           Do not consider recommended packages as a dependency for installing.
           Configuration Item: APT::Install-Recommends.

           Consider suggested packages as a dependency for installing.
           Configuration Item: APT::Install-Suggests.

It's in the man page. Install is a verb, not an adjective being
applied to the installation. One cannot control what people will read
into it.

> > > I, too, was surprised by some Debian features like its tendency to start
> > > daemons with a vanilla configuration right after installation. Still
> > > can't say I like this decision.
> > 
> > This has been discussed in the past. Using the term "vanilla" suggests
> > that an ordinary upstream configuration is applied to the daemon,
> > which is not true: the Debian developers apply what they consider are
> > sensible secure defaults, designed to integrate with the distribution.
> > This work is usually documented in changelog.Debian.gz or various
> > READMEs.
> Is the /usr/sbin/policy-rc.d method still the official supported one of
> disabling this behavior when it is not desirable?

It's many years since I ran servers in what one might call "hostile"
environments, so the current situation suits me, and I don't keep up
with discussions like those in

So others would have to comment here, after the discussion of
resetting Windows has subsided.


Reply to: