Re: Buster install using debootstrap.

2020-06-04 Thread Sven Hartge
Marc Shapiro  wrote:

> I also don't understand why it says that it could not create temporary 
> files in /tmp.  I am running this as root and /tmp is owned by root.  
> What am I missing?

/tmp (and /var/tmp/) should have the following permissions and rights:

 root:root 1777/drwxrwxrwt

apt runs its I/O processes as a different user "_apt" and if /tmp does
not have the sticky bit set, then it cannot create any files there,
causing the error.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



Buster install using debootstrap.

2020-06-04 Thread Marc Shapiro
I have just installed Buster on a spare set of partitions using 
debootstrap, as documented in:


    Appendix D.3 of the Installation Guide.


When I got to configuring networking, I just copied 
/etc/networking/interfaces, /etc/hosts, /etc/hostname, and 
/etc/resolv.conf from my Stretch partitions/directories to the Buster 
partitions/directories.


I also copied /etc/apt/sources.list and /etc/fstab from Stretch to 
Buster, editing them as needed.


I have chrooted into Buster and everything looks good.  I can run 'apt 
show' and 'dpkg -l' (I like the way the new dpkg lets you scroll through 
the list instead of just running to the end.)  What I can not do is 'apt 
update'.  When I try that, I get the following output:


# apt update
Get:1 http://security.debian.org buster/updates InRelease [65.4 kB]
Err:1 http://security.debian.org buster/updates InRelease
  Couldn't create temporary file /tmp/apt.conf.UOJmdX for passing 
config to apt-key
Get:2 http://download.virtualbox.org/virtualbox/debian buster InRelease 
[7736 B]

Err:2 http://download.virtualbox.org/virtualbox/debian buster InRelease
  Couldn't create temporary file /tmp/apt.conf.9n943a for passing 
config to apt-key

Get:4 http://http.us.debian.org/debian buster InRelease [121 kB]
Err:4 http://http.us.debian.org/debian buster InRelease
  Couldn't create temporary file /tmp/apt.conf.1btx9y for passing 
config to apt-key
Get:3 http://cdn-fastly.deb.debian.org/debian buster-backports InRelease 
[46.7 kB]

Err:3 http://cdn-fastly.deb.debian.org/debian buster-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.G6FHYS for passing 
config to apt-key

Get:5 http://www.deb-multimedia.org buster InRelease [19.5 kB]
Err:5 http://www.deb-multimedia.org buster InRelease
  Couldn't create temporary file /tmp/apt.conf.Iqzykk for passing 
config to apt-key

Get:6 http://www.deb-multimedia.org buster-backports InRelease [10.4 kB]
Err:6 http://www.deb-multimedia.org buster-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.Sb90kl for passing 
config to apt-key

Reading package lists... Done
W: GPG error: http://security.debian.org buster/updates InRelease: 
Couldn't create temporary file /tmp/apt.conf.UOJmdX for passing config 
to apt-key
E: The repository 'http://security.debian.org buster/updates InRelease' 
is not signed.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.
W: GPG error: http://download.virtualbox.org/virtualbox/debian buster 
InRelease: Couldn't create temporary file /tmp/apt.conf.9n943a for 
passing config to apt-key
E: The repository 'http://download.virtualbox.org/virtualbox/debian 
buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.
W: GPG error: http://http.us.debian.org/debian buster InRelease: 
Couldn't create temporary file /tmp/apt.conf.1btx9y for passing config 
to apt-key
E: The repository 'http://http.us.debian.org/debian buster InRelease' is 
not signed.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.
W: GPG error: http://cdn-fastly.deb.debian.org/debian buster-backports 
InRelease: Couldn't create temporary file /tmp/apt.conf.G6FHYS for 
passing config to apt-key
E: The repository 'http://http.debian.net/debian buster-backports 
InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.
W: GPG error: http://www.deb-multimedia.org buster InRelease: Couldn't 
create temporary file /tmp/apt.conf.Iqzykk for passing config to apt-key
E: The repository 'http://www.deb-multimedia.org buster InRelease' is 
not signed.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.
W: GPG error: http://www.deb-multimedia.org buster-backports InRelease: 
Couldn't create temporary file /tmp/apt.conf.Sb90kl for passing config 
to apt-key
E: The repository 'http://www.deb-multimedia.org buster-backports 
InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.


I read the manpage for apt-secure and I am assuming that I am missing 
the GPG keys, but I did not see anything about this in the Installation 
Guide.  I'm sure that I missed something, somewhere, but I don't know what.


I also don't understand why it says that it could not create temporary 
files in /tmp.  I am

Re: Virtualbox vs qemu/virt-manager

2020-06-04 Thread Kamil Jońca
kjo...@gmail.com (Kamil Jońca) writes:

[...]
> Please do not treat this as flame or sth.
> I used Virtualbox so far on my desktop box.
> Virtual machines are generally Windows (10,8.1,7, and ever ancient NT 4.0

Unfortuanately it seems, that qemu is not able to stable run NT4.
I forgot that I found bug long ago:
https://bugs.launchpad.net/qemu/+bug/1618301

Pity.
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/



Re: OT: Using a USB hub with 3 computers, 1 printer, 1 external drive (for backup for any of the three PCs)

2020-06-04 Thread rhkramer
Thanks to all who replied!

On Thursday, June 04, 2020 05:14:29 PM Gene Heskett wrote:
> On Thursday 04 June 2020 14:46:50 rhkra...@gmail.com wrote:
> > In a way, the subject covers most of it: " Using a USB hub with 3
> > computers, 1 printer, 1 external drive (for backup for any of the
> > three PCs)".



Re: OT: Using a USB hub with 3 computers, 1 printer, 1 external drive (for backup for any of the three PCs)

2020-06-04 Thread Gene Heskett
On Thursday 04 June 2020 14:46:50 rhkra...@gmail.com wrote:

> In a way, the subject covers most of it: " Using a USB hub with 3
> computers, 1 printer, 1 external drive (for backup for any of the
> three PCs)".
>
> I don't know much about USB hubs, I guess all of the ports are two
> way.
>
> To clarify, if needed, I'd like to buy a 5 (or more) port USB (3.0)
> hub to connect 3 PCs, 1 printer, and 1 external drive such that I can
> print or backup from any of the 3 pcs.
>
> I suppose there are two questions:
>
>1.  Should I expect any problem "hardware wise"?
>
>2. I suppose I have to consider the mounting of the partitions on
> the drives, I suppose it would be a bad idea to have the same
> partition (or even drive) mounted on more than one pc at the same
> time?
>
> (And I guess I'd have to avoid printing from two computers at the same
> time.)

cups can handle that on your local network, configure cups to run the 
printer and mark it as shared. Then with cups installed on the other 
machines, they can use those printers just as if they were local to that 
machine. I am doing that on a 5 machine local net here. Even works if 
you have 2 printers. You'll get your exercise going after the printout, 
but I see that as just getting some exercise I need but might not 
otherwise get. :-) 

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: Return a Debian system to a pristine state

2020-06-04 Thread John Hasler
 David Wright writes:
> That begs the question of what pristine means, because it has never
> been defined even by the OP.

I thought that we had learned that what he really wanted was to be able
to identify packages that have not been used recently and remove them.
-- 
John Hasler 
jhas...@newsguy.com
Elmwood, WI USA



Re: Target Audience & Geography?

2020-06-04 Thread Peter Ehlert

SPAM

On 6/4/20 11:29 AM, Rachel Mora wrote:


Hi,

Did you see this?

Please advise.

*Thanks,
Rachel Mora


*


Hi,

Due to COVID-19, we are providing *any industry *list at *very less cost*.

Would you like to connect digitally with Owners of *Online e-commerce 
Stores*,**Groceries Chain, Retail & Wholesale Stores?


Let me know the *geography* *& target audience* you wish to target so 
that I can get back with _samples & other details_.


*_Note_*: You can also target software users like *Verizon*, AWS 
CloudFormation, VMware, etc.


Await your response.

*Thanks,
Rachel Mora | Account Executive
E: **rac...@konnectb2bleads.com* 
*
*Answer "NO" if you don't wish to get any message



Re: Return a Debian system to a pristine state

2020-06-04 Thread The Wanderer
On 2020-06-04 at 10:30, David Wright wrote:

> On Mon 01 Jun 2020 at 12:15:02 (+0200), Marco Möller wrote:

>> The short answer to this thread is that unfortunately Debian is
>> not prepared with a simple solution for this simple task, but 
>> sophisticated workarounds are needed.
> 
> As has been explained, it's not so simple, because *your* focus is 
> solely on the last apt command that you typed, whereas the package 
> management system is concerned with the whole system. Apt deals with 
> the system as a current state, and not as a chance sequence of 
> commands in reaching that state which must be reversible and
> replayable, back and forth.
> 
> When you install some packages and change your mind, just copy and 
> paste the line from /var/log/apt/history.log, replacing install with 
> remove (or purge). Sophisticated?

Doesn't that fail to address the exact Recommends-related scenario which
was his original complaint?


Say A and B both recommend C, and no other relevant packages do. Then:

$ apt-get install --no-install-recommends A
$ apt-get install B
$ apt-get purge B
$ apt-get autoremove

As I recall and understand it, his original complaint is that this will
then leave C installed, even though the context for the permission for
it to be installed (the installation of B) no longer applies.

(Similarly if you install A after installing B but before the
autoremove.)

By contrast,

$ apt-get install B
$ apt-get purge B
$ apt-get autoremove
$ apt-get install --no-install-recommends A

will leave C not installed.


He appears to argue (if not all that clearly) that the package manager
should be tracking "install Recommends?" status on a per-package basis
(i.e., probably in /var/lib/dpkg/status), such that only packages for
which that flag is true will be considered as preventing a Recommended
package from being autoremoved, even when Recommends are configured to
be important. This would then let those two scenarios produce the same
result, which could be argued to be valuable for "least surprise"
consistency reasons.

Given the existence of the ability to configure Suggests as important,
presumably an analogous flag would then need to be tracked per-package
for Suggests as well.

Structurally this doesn't even seem too difficult to design, at a naive
outsider's glance, but how practical it would be to implement - both in
terms of code, and in terms of the data that would have to be tracked
and stored, as well as in terms of implementing both on top of the
existing stored data which does not track this - may be quite another
story.


It gets trickier again when you start to consider more complex
scenarios, such as what happens when you change the "install
Recommends?" status for an installed-as-Recommends package later on.

When you install A with --no-install-recommends, C would clearly get
that status set to "false".

But when you install B without that switch, should C's "install
Recommends?" status change to "true"?

If the answer is yes, then the problem he was complaining about returns.

But if the answer is no, then if you later remove A, C is now in a
different status from what you'd have gotten if you installed B (and its
Recommends) without having ever installed A in the first place.

I don't see as simple or straightforward a way to design around that
problem. At that point, I think you would indeed have to start tracking
the installation history in tree fashion, and I don't even know what the
data structures or the necessary stored data for handling that elegantly
or cleanly would need to look like.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: OT: Using a USB hub with 3 computers, 1 printer, 1 external drive (for backup for any of the three PCs)

2020-06-04 Thread Dan Ritter
rhkra...@gmail.com wrote: 
> In a way, the subject covers most of it: " Using a USB hub with 3 computers, 
> 1 
> printer, 1 external drive (for backup for any of the three PCs)".
> 
> I don't know much about USB hubs, I guess all of the ports are two way.
> 
> To clarify, if needed, I'd like to buy a 5 (or more) port USB (3.0) hub to 
> connect 3 PCs, 1 printer, and 1 external drive such that I can print or 
> backup 
> from any of the 3 pcs.

Others have told you why this won't work.

Let's explore other ways that you can achieve the same goals.

I'm going to assume that all 3 PCs are connected to a local
network, and you can get 

Goals:

1. Print from any PC to the printer

2. Backup from any PC to the backup disk

Is that correct?

If so:

1. Printing:

- if the printer has an ethernet port, plug it in to your
  network. If it has wifi, turn that on. Done.

- if the printer does not have an ethernet port, plug it in to
  a computer that will always be on when you need to print,
  and share it on the network with CUPS. (Debian provides 
  a CUPS server.)

- if CUPS doesn't make you happy, install Samba and share with
  that.

2. Backup

- Debian machines can backup over the network to a machine where
  the USB disk is plugged in. 'backupninja' can help configure
  that.

- Windows machines can backup over the network to a Debian
  machine where the USB disk is plugged in. Samba is the key
  here.

- Mac OS X machines can backup over the network to a Debian
  machine where the USB disk is plugged in. netatalk is the key
  here -- it can be used for native Time Machine backups.

Happy to help.

-dsr-



Re: OT: Using a USB hub with 3 computers, 1 printer, 1 external drive (for backup for any of the three PCs)

2020-06-04 Thread tomas
On Thu, Jun 04, 2020 at 08:53:26PM +0200, Sven Hartge wrote:
> rhkra...@gmail.com wrote:
> 
> > In a way, the subject covers most of it: " Using a USB hub with 3 
> > computers, 1 
> > printer, 1 external drive (for backup for any of the three PCs)".
> 
> > I don't know much about USB hubs, I guess all of the ports are two way.
> 
> No. This is even enforced in the way the cables and connectors are
> designed.
> 
> > To clarify, if needed, I'd like to buy a 5 (or more) port USB (3.0) hub to 
> > connect 3 PCs, 1 printer, and 1 external drive such that I can print or 
> > backup 
> > from any of the 3 pcs.
> 
> No.
> 
> USB is a tree, there can only be ever one root. You can't connect three
> PCs to a USB hub and expect this to work.
> 
> > I suppose there are two questions:
> 
> >1.  Should I expect any problem "hardware wise"?
> 
> Yes, because it will not work.
> 
> There are very special USB sharing devices which allow more than one
> computer use connected devices, but those are a) rate and b) expensive.

Right. An USB tree has one "host" (aka "master") and several "devices"
(aka "slaves"). The latter can only talk to the "host". Some can switch
roles (as specified by the USB "on the go" (OTG) [1] spec. Typically
tablets and smartphones can do this. Linux seems to support that, but
the USB hardware has to play along [2]. Note that I haven't tried it.

Cheers

[1] https://en.wikipedia.org/wiki/USB_On-The-Go
[2] 
https://unix.stackexchange.com/questions/386945/configure-linux-system-as-an-otg-device
-- t


signature.asc
Description: Digital signature


Re: Return a Debian system to a pristine state

2020-06-04 Thread Tom Dial



On 6/4/20 02:45, Sijmen J. Mulder wrote:
> Marco Möller wrote:
>>> In the fairly large number of posts in this thread I don't recall seeing
>>> file system snapshots suggested. My current preference is ZFS, which I
>>> know from experience to be up to what I understand to be the goal here.
>>
>> (...)
>> I understand the OP to be in search for the uncomplicated removal of 
>> installed packages considering package installation dates.
>> A fs snaphot tool is likely to return to a general system state which 
>> would include also the return of the user data and system configurations 
>> to a point of time in the past, instead of only treating package 
>> installs. And if having to prepare sophisticated steps like requiring 
>> special partitioning schemes, then this wouldn't be uncomplicated anymore.

Debian root on ZFS installation is non-standard (where the standard is
the Debian installer). It is more complicated than the standard install,
but instructions at

https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Buster%20Root%20on%20ZFS.html

describe adequately how to do it using a Debian Live CD. I used an
earlier, slightly less polished, version for five or six installs and
found it satisfactory. It is a hands-on command line install using the
shell in a terminal, but most of the commands can be copied and pasted
from the documentation with only minor changes.

>> Agreed, but at risk of going a bit off track, I didn't find this to be
> a problem in practice on ZFS native systems like SmartOS. Separate
> volume on /usr/pkg, snapshot, done. Of course the situation in Debian
> is a bit different.
> 
> Sijmen
> 



Re: OT: Using a USB hub with 3 computers, 1 printer, 1 external drive (for backup for any of the three PCs)

2020-06-04 Thread Joe
On Thu, 4 Jun 2020 14:46:50 -0400
rhkra...@gmail.com wrote:

> In a way, the subject covers most of it: " Using a USB hub with 3
> computers, 1 printer, 1 external drive (for backup for any of the
> three PCs)".
> 
> I don't know much about USB hubs, I guess all of the ports are two
> way.
> 
> To clarify, if needed, I'd like to buy a 5 (or more) port USB (3.0)
> hub to connect 3 PCs, 1 printer, and 1 external drive such that I can
> print or backup from any of the 3 pcs.
> 
> I suppose there are two questions:
> 
>1.  Should I expect any problem "hardware wise"?
> 
>2. I suppose I have to consider the mounting of the partitions on
> the drives, I suppose it would be a bad idea to have the same
> partition (or even drive) mounted on more than one pc at the same
> time?
> 
> (And I guess I'd have to avoid printing from two computers at the
> same time.)
> 

Sorry, no, it's not going to work. USB is a master-submaster-slave
protocol, and there can only be one master. It's not peer-peer.

This sort of situation is why Ethernet was invented.

-- 
Joe



RE: Target Audience & Geography?

2020-06-04 Thread Rachel Mora
Hi,

Did you see this?

Please advise.

Thanks,
Rachel Mora




Hi,

Due to COVID-19, we are providing any industry list at very less cost.

Would you like to connect digitally with Owners of Online e-commerce Stores, 
Groceries Chain, Retail & Wholesale Stores?

Let me know the geography & target audience you wish to target so that I can 
get back with samples & other details.

Note: You can also target software users like Verizon, AWS CloudFormation, 
VMware, etc.

Await your response.

Thanks,
Rachel Mora | Account Executive
E: rac...@konnectb2bleads.com  

Answer "NO" if you don't wish to get any message



Re: OT: Using a USB hub with 3 computers, 1 printer, 1 external drive (for backup for any of the three PCs)

2020-06-04 Thread Sven Hartge
rhkra...@gmail.com wrote:

> In a way, the subject covers most of it: " Using a USB hub with 3 computers, 
> 1 
> printer, 1 external drive (for backup for any of the three PCs)".

> I don't know much about USB hubs, I guess all of the ports are two way.

No. This is even enforced in the way the cables and connectors are
designed.

> To clarify, if needed, I'd like to buy a 5 (or more) port USB (3.0) hub to 
> connect 3 PCs, 1 printer, and 1 external drive such that I can print or 
> backup 
> from any of the 3 pcs.

No.

USB is a tree, there can only be ever one root. You can't connect three
PCs to a USB hub and expect this to work.

> I suppose there are two questions:

>1.  Should I expect any problem "hardware wise"?

Yes, because it will not work.

There are very special USB sharing devices which allow more than one
computer use connected devices, but those are a) rate and b) expensive.

Grüße.
Sven.

-- 
Sigmentation fault. Core dumped.



OT: Using a USB hub with 3 computers, 1 printer, 1 external drive (for backup for any of the three PCs)

2020-06-04 Thread rhkramer
In a way, the subject covers most of it: " Using a USB hub with 3 computers, 1 
printer, 1 external drive (for backup for any of the three PCs)".

I don't know much about USB hubs, I guess all of the ports are two way.

To clarify, if needed, I'd like to buy a 5 (or more) port USB (3.0) hub to 
connect 3 PCs, 1 printer, and 1 external drive such that I can print or backup 
from any of the 3 pcs.

I suppose there are two questions:

   1.  Should I expect any problem "hardware wise"?

   2. I suppose I have to consider the mounting of the partitions on the 
drives, I suppose it would be a bad idea to have the same partition (or even 
drive) mounted on more than one pc at the same time?

(And I guess I'd have to avoid printing from two computers at the same time.)



Re: exim4 stopped delivering local mail after upgrade (sid)

2020-06-04 Thread Elimar Riesebieter
* m s  [2020-06-02 15:28 -0400]:

> I'm running sid and after upgrading packages today, exim stopped
> working. It's keeping all my local mail in /var/spool/exim4/msglog and
> not delivering it, and even when I type "runq" it won't deliver the
> mail.
> 
> # exim4 -qff -v
> LOG: MAIN
>   Warning: No server certificate defined; will use a selfsigned one.
>  Suggested action: either install a certificate or change
> tls_advertise_hosts option
> LOG: queue_run MAIN
>   Start queue run: pid=10734 -qff
> delivering 1jgC7c-00028M-Af (queue run pid 10734)
> R: system_aliases for marie@localhost
> R: userforward for marie@localhost
> R: procmail for marie@localhost
> R: maildrop for marie@localhost
> R: lowuid_aliases for marie@localhost (UID 1000)
> R: local_user for marie@localhost
> T: appendfile for marie@localhost
> LOG: MAIN
>   == marie@localhost R=local_user T=mail_spool defer (-6): mailbox
> /var/mail/ has wrong uid (0 != 1000)
> LOG: queue_run MAIN
>   End queue run: pid=10734 -qff
> 
> 
> # dpkg -l |grep exim
> ii  exim4 4.92.3-1
> all  metapackage to ease Exim MTA (v4) installation
> ii  exim4-base4.92.3-1
> amd64support files for all Exim MTA (v4) packages
> ii  exim4-config  4.94-1
> all  configuration for the Exim MTA (v4)
> ii  exim4-daemon-light4.92.3-1
> amd64lightweight Exim MTA (v4) daemon

First you have to run an update to get a consistent version 4.94-1.

After that you'll find /usr/share/doc/exim4-base/NEWS.Debian.gz with
a proposed instruction to handle $local_user interactions.

Elimar
-- 
  "Talking much about oneself can also
   be a means to conceal oneself."
 -Friedrich Nietzsche



Re: Return a Debian system to a pristine state

2020-06-04 Thread David Wright
On Sun 31 May 2020 at 18:43:46 (+0100), Michael Howard wrote:
> On 31/05/2020 15:59, Thomas Schmitt wrote:
> > Michael Howard wrote:
> > > With linux (debian) you could just create an image (using dd for example) 
> > > of
> > > the drive in order to restore it at a later date.
> > If a backup shall have a chance to be absolutely safe it must be done
> > while the backuped filesystems are unmounted or mounted read-only.
> 
> Obviously.
> 
> > This implies that it must be done by an operating system that it not
> > using these to-be-backuped filesystems for its own needs. Debian Live
> > comes to my mind.
> As good a choice as any.
> > Do we have a feature to get a list of installed packages and to later
> > use it for re-installation ?
> > 
> > I normally need weeks to get everything installed on my next machine.
> > In the beginning it is easy to choose the big chunks. But the previous
> > machine is then old as stone and can hardly serve for the fine tuning.
> > So i need to find out what's still missing and install on demand.
> > 
> Well then it's not pristine, which is what the OP wanted.

That begs the question of what pristine means, because it has never
been defined even by the OP. Their closest attempt at a definition
was the "first boot experience" but, unless you install a system as
soon as a release is released, you can't return to that configuration
without downgrading packages. That would make no sense at all,
especially for someone with a serious concern about scanning for
vulnerabilities.

And why would one decide that the only systems that could be
considered as "pristine" are those where the "privileged" list of
installed packages corresponds to one of the arbitrary selections
chosen by the installer's developers.

In addition, when the "privileged" packages are reverted to their
original configuration at first boot, it's potentially undoing a great
deal of the sysadmin's work, which then has to be re-done. Where's the
sense in that. And if you *don't* revert the configuration, you could
end up with a non-functional system, because the final production
configuration might depend on the "unprivileged" packages that have
just been uninstalled.

Cheers,
David.



Re: Return a Debian system to a pristine state

2020-06-04 Thread David Wright
On Mon 01 Jun 2020 at 12:15:02 (+0200), Marco Möller wrote:
> On 01.06.20 04:41, emetib wrote:
> > this has been an interesting topic, so what the hell, here's my two cents.
> > 
> > for my vm's, i have a list off packages that i install as soon as the 
> > minimum/base install and reboot is done.  4 vm's, testing, stable, centos7, 
> > opensuse.  i have no gui's on these only cli, just need to know how to 
> > configure things for other os's than debian and it becomes a simple cut and 
> > paste to get a system to be at what i need.

I keep such a list as a sequence of   apt-get -y install …
commands, but this is preceded by an update/upgrade,
installation of etckeeper, git and git-man (and commit),
and one or two chmod/chgrp commands in my favour. Those
few install commands omit the -y.

I keep the script up-to-date when I add significant packages,
and it saves a lot of time because I presently run five systems
with near identical configurations. If I were to rerun it, it
would just chunder away, adding anything that's new.

The last packages in the script are apt-listbugs and needrestart;
last because they would keep interrupting the process with their
demands for a response. Finally, I purge the american dictionaries,
and rerun update to fill the cache for apt-file.

> > have a home partition, not just a home dir, and back it up often with a 
> > timestamp on it, and do a --get-selections and dump it to a file that you 
> > back up also. also doing that is an easy way to compare what was installed 
> > and what is now installed.

I consider a /home partition vital, and it's encrypted. along with
swap (random key). I prefer to work with "top-level" packages rather
than --[gs]et-selections, as the latter involves >2000 packages,
many of them entirely uninteresting/unrecognisable.

> > keep sensitive config files in a spot that you know is going to be backed 
> > up or on your home partition so they aren't overwritten with a new install.

I keep copies of any files I have changed in directories called
/home/system---/
where the filenames are mangled thus: ¬etc¬default¬console-setup
Having a flat directory makes it easy to update, check, and compare
systems with one-line commands.

> > there was a suggestion about using a live distro to make a back up right 
> > away, never done it before, yet this is a great idea.

Because I always have two root filesystems on the disk, I just use the
other system. But I don't make a habit of backing up the whole system,
only my configuration of it, plus a selection of log files.

> > i believe that someone (smarter than me) could write a simple script to put 
> > all user installed programs into a file and then reinstall them after a 
> > full-reinstall.

Just put the commands that you type into a file like the above,
and bash it. Go from there.

> > i.e.
> > bash_install_script.sh
> > check if su
> > add package to list
> > continue with the install
> 
> This is almost exactly what I am also doing.
> 
> The problem remains to simply remove a couple of packages without
> having to go for a full blown system reinstall and all the necessary
> requirements for organizing it well.

This is a false dichotomy. There's no problem with removing a couple
of packages; you just misunderstood the meaning of --no-install-recommends
and the way packages interact, and then expected apt to automatically
bend to your will and fix the mistake for you.

> As there is a package manager, it
> is obviously a straight forward logic to expect it to do this job,
> because this is exactly what a package manager is expected to manage.
> All other suggestions which have been brought up in the thread are
> workarounds for filling the gap where the package manager is not full
> featured.

That's how computer systems work. People write software that does what
is considered sensible, and others build upon this by writing scripts,
rather than posting that the software has a severe bug and they can't
believe that it doesn't do what they want it to do in the way they want it.

> The short answer to this thread is that unfortunately Debian is not
> prepared with a simple solution for this simple task, but
> sophisticated workarounds are needed.

As has been explained, it's not so simple, because *your* focus is
solely on the last apt command that you typed, whereas the package
management system is concerned with the whole system. Apt deals with
the system as a current state, and not as a chance sequence of
commands in reaching that state which must be reversible and replayable,
back and forth.

When you install some packages and change your mind, just copy and
paste the line from /var/log/apt/history.log, replacing install with
remove (or purge). Sophisticated?

Cheers,
David.



Re: Buster install with UEFI boot not working

2020-06-04 Thread Steve McIntyre
Hi Kashif,

Kashif wrote:
>
>I am trying to install a buster through PXE netbooting using UEFI boot.
>The currents setup  works for BIOS correctly.
>
>I changed dhcpd config file using 'option arch' to point to correct
>filename and that bit is working as when booting with PXE, the server
>manages to download grubx64.efi.
>
>The last message, I am getting is "NBP file downloaded successfully" and
>then nothing happens. I can see from syslogs of provisioning server that it
>also served grub.cfg file etc.
>
>Google gives me conflicting results.  I have two main question:
>
>1. Should I use grubx64.efi or bootnetx64.efi for UEFI PXE boot?

I would say that the better option is to use bootnetx64.efi - that is
a copy of shim, which should then load grubx64.efi and its config and
go from there. For local testing my DHCP server has the following
snippet:

host sledge {
  hardware ethernet d0:50:99:60:3b:fb;
  fixed-address sledge.einval.org;
  next-server 10.13.0.1;
  if option arch = 00:07 {
  filename "debian-installer/amd64/bootnetx64.efi";
  } else {
  filename "pxelinux.0";
  }
}

where debian-installer is a copy of Buster's netboot files on the tftp
server. That works fine for me. If you're having problems, check that
the client is attempting to download the correct files from the TFTP
server. That's the most common problem in my experience, and Debian
used to have a problem here when we added SB support until I fixed it.

>2. Do  I have to change default grub.conf file in
>debian-installer/amd64/grub/grub.cfg. There are suggestions  to use
>linuxefi and initrdefi instead of linux and initrd in grub.cfg .

Not at all, no. The default grub config should work just fine.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
  Armed with "Valor": "Centurion" represents quality of Discipline,
  Honor, Integrity and Loyalty. Now you don't have to be a Caesar to
  concord the digital world while feeling safe and proud.



Re: Return a Debian system to a pristine state

2020-06-04 Thread Sijmen J. Mulder
Marco Möller wrote:
> > In the fairly large number of posts in this thread I don't recall seeing
> > file system snapshots suggested. My current preference is ZFS, which I
> > know from experience to be up to what I understand to be the goal here.
> 
> (...)
> I understand the OP to be in search for the uncomplicated removal of 
> installed packages considering package installation dates.
> A fs snaphot tool is likely to return to a general system state which 
> would include also the return of the user data and system configurations 
> to a point of time in the past, instead of only treating package 
> installs. And if having to prepare sophisticated steps like requiring 
> special partitioning schemes, then this wouldn't be uncomplicated anymore.

Agreed, but at risk of going a bit off track, I didn't find this to be
a problem in practice on ZFS native systems like SmartOS. Separate
volume on /usr/pkg, snapshot, done. Of course the situation in Debian
is a bit different.

Sijmen