Re: non-smart debian phone

2020-08-05 Thread Russell L. Harris

On Wed, Aug 05, 2020 at 09:38:40PM -0700, Dan Hitt wrote:

I plan to get a non-smart phone to replace my smart phone.

By non-smart, i mean that it does not have a touch screen.


A couple of years back I switched to AT&T.  Back then the only
flip-phone offered by AT&T was Kyocera.  Battery life typically was
one day, even with minimal use.  AT&T replaced the phone once and the
battery three times, but nothing cured the problem.  Then an AT&T
representative recommended a Samsung which has an ultra-low-power
mode.  This is a model SM-J337A.  Yes, it is a "smartphone"; but it
can go a full week on a charge.



Re: Homebuilt NAS Advice

2020-08-05 Thread Leslie Rhorer




On 8/6/2020 12:06 AM, Leslie Rhorer wrote:
 For better performance, more space, and higher throughput, I would 
probably create a RAID 4 or RAID 6 array from the external enclosure and 
use it as the data repository.


Sorry, that was a typo.  That should be RAID 5 or RAID 6.



Re: Homebuilt NAS Advice

2020-08-05 Thread Leslie Rhorer

On 8/5/2020 11:13 PM, Stefan Monnier wrote:

- RAID would require extra hardware in my machines, for some of them
that would be a non-trivial constraint (e.g. my BananaPi servers and
my laptops).

How do you figure?  Adding an external USB drive enclosure to
a laptop or a Banana Pi is pretty trivial.


Are you seriously suggesting a RAID setup where one half is the
SATA-connected drive inside the laptop and the other is an external
USB-connected drive?


	It's not what I would do, probably, but it is possible.  In fact, a 
RAID 1 mirror with write-mostly enabled on the external drive is not a 
terrible idea.


	For better performance, more space, and higher throughput, I would 
probably create a RAID 4 or RAID 6 array from the external enclosure and 
use it as the data repository.



Sounds like a recipe for a world of pain for all the times that the
external drive gets disconnected (not to mention the performance impact
of having one half going over the slow USB2 connection, defeating the
benefits of the internal SSD).


Not on a RAID 1 mirror with write-mostly enabled on the external drive.


For the BananaPi, the suggestion is marginally less problematic but
still: a non-trivial constraint with significant immediate downsides.


Such as?


RAID is basically an insurance.


	Not entirely.  A RAID 5 or RAID 6 array is far, far faster than a 
single hard drive.  It is also much larger than a single hard drive, 
sometimes at less expense than a single large hard drive.  It is also 
portable from one system to another.  Unplug the array from the laptop, 
plug it in to the Banana Pi, and presto! The array is now attached to 
the Pi.  It's really not any different logically than an external drive, 
except it is faster, larger, and more robust.



Taking an insurance makes a lot of
sense when it's important to spread the cost of the impact of an
"event"


Or eliminate it entirely.


anyway (not to mention that RAID doesn't prevent me from losing work
when the OS or my editor crashes


	Uh, yeah, it can.  It definitely can be used to eliminate data loss 
when the OS crashes, and with a little magic, even the loss of OS 
related informatin (like /home) can be eliminated.  The editor is a 
little different matter, although the result of it's failure can also be

limited.


or when I make a mistake).


	That is another matter.  Indeed, it is probably the most likely reason 
a need for a backup solution exists.




non-smart debian phone

2020-08-05 Thread Dan Hitt
I plan to get a non-smart phone to replace my smart phone.

By non-smart, i mean that it does not have a touch screen.

However, it might be reasonable for it to have a usb port not just for
charging, but for communication with my computer.  Conceivably it might be
useful to download voice mail to my computer, for example, or maybe to play
through its speakers.

It would be nice if it ran a free operating system, such as debian.

Does anybody have any experience along these lines, or advice?

Thanks in advance!

dan


Re: Homebuilt NAS Advice

2020-08-05 Thread Kushal Kumaran
Leslie Rhorer  writes:

> On 8/5/2020 1:51 PM, deloptes wrote:
>
>> Imagine you have classical backup: daily incrementals, full weekly and full
>> monthly.
>
>   This is not required with DAR.  One full backup is all that is
> required.  Anything else is a waste of time and space.  One can employ
> either differential or decremental backups, keeping a full history of
> all activity on the system.
>
>  Imagine you have retention for the full weekly 3 (until end of
>> month) and for full monthly 12 (until end of year).
>> You have to maintain 15 full backups and the 6 daily incrementals. How much
>> space is it, that you need for your backup storage?
>> This is why the question what is your active size. No imagine I have 2TB of
>> data, even if I compress this data - lets say with avg. 60% ratio it is
>> 800GB per full backup. 15 copies + means 12TB+. Of course if you have
>> video/audio like mp3, it is already compressed and ratio for the backup
>> compression goes down and space needed up.
>> Now here comes the trick with deduplication. The backup system makes one
>> full backup (800GB) and then keeps track of the bits that changed (it is
>> not that simple, but for the example). Only they are being backuped. Some
>> systems provide ratio of 90%. So to keep your 15+ copies with deduplication
>> ratio of ~80% you need about 3TB.
>
>   You are talking about differential archiving at the binary
> level. DAR can employ delta binaries for both incremental and
> decremental backups, which means only the changes to the binary data,
> if any, is stored in subsequent backups, not the entire file.  There
> is no need for multiple full backups.  A full backup of my main array
> to hard drive media will take a minimum of 15 days.  Transferring
> across the 10G link to my backup server would take a minimum of 2.8
> days.  Although full backups of smaller systems will normally take
> less time, the fact is full backups on a regular basis are just not
> necessary, and especially not when using DAR.
>

Deduplication does a little more than that.  Deduplicated backup systems
can identify duplicated content across different files in addition to
the differential backups you mention.  This can help when you might have
identical (or close to identical) content across multiple files.  Things
like virtual machine disk images deduplicate rather well.  Also helpful
when you might have multiple users storing identical/similar files.

Sophisticated deduplication systems can even deduplicate across multiple
machines being backed up.

-- 
regards,
kushal



Re: Homebuilt NAS Advice

2020-08-05 Thread Stefan Monnier
>> - RAID would require extra hardware in my machines, for some of them
>>that would be a non-trivial constraint (e.g. my BananaPi servers and
>>my laptops).
>   How do you figure?  Adding an external USB drive enclosure to
>   a laptop or a Banana Pi is pretty trivial.

Are you seriously suggesting a RAID setup where one half is the
SATA-connected drive inside the laptop and the other is an external
USB-connected drive?

Sounds like a recipe for a world of pain for all the times that the
external drive gets disconnected (not to mention the performance impact
of having one half going over the slow USB2 connection, defeating the
benefits of the internal SSD).

For the BananaPi, the suggestion is marginally less problematic but
still: a non-trivial constraint with significant immediate downsides.

RAID is basically an insurance.  Taking an insurance makes a lot of
sense when it's important to spread the cost of the impact of an
"event", but in my case the cost of such an event would be fairly low
anyway (not to mention that RAID doesn't prevent me from losing work
when the OS or my editor crashes, or when I make a mistake).


Stefan



Re: delimiters with more than one character? ...

2020-08-05 Thread John Crawley

On 2020-08-05 22:06, Greg Wooledge wrote:

On Wed, Aug 05, 2020 at 03:04:32PM +0900, John Crawley wrote:

This method cuts off the first part of the string, up to the delimiter, and
adds it to the array, then continues with what's left of the string until
there's none left:


Yes, that's a valid approach, although not one that most bash scripters
would choose, because it's hideously slow in bash, and doesn't "feel"
like it's in the "spirit" of shell scripting.


I likely don't have a sufficient grasp of that "spirit" to comment there :)
but as for "hideously slow", remain to be convinced. Bash string  
modifications seem to be pretty fast. Would very long strings requiring  
multiple runs of the loop slow it down excessively? (See below for  
stringx1024) With the OP's provided string, on my system:


time bash ./multi-delim.sh
declare -a arr=([0]=" 34 + 45 " [1]=" abc " [2]=" 1 2 3 " [3]=" c"  
[4]="123abc ")


real0m0.004s
user0m0.000s
sys 0m0.000s

Exact time varies from 1ms to 5ms, but it seems faster than python, perl  
or a bash script calling sed or awk would be.



Your output doesn't match your input.  You've got an extra backslash
character in the [1] element.  Perhaps you tested with several different
inputs, and accidentally pasted the wrong output.


Thanks - that was indeed the case. Sorry.
( Tested with some other characters like * # ! Everything seems to be  
treated as a plain string, needing no escaping. )



I've used this myself, so am eager to hear of any hidden snags. :)

(One already: if the delimiter is a repeated character which might also be
the last in the last string fragment, then the loop never closes. Fairly
rare?)


OK... yeah, that would be a show-stopper, all right.  I was able
to reproduce the infinite loop...

(snip)

A different approach is needed.  The one that immediately springs to
mind for me is:

s='a || b || c ||| d |'
del='||'
arr=()
while [[ $s = *"$del"* ]]; do arr+=( "${s%%"$del"*}" ); s=${s#*"$del"}; done
arr+=( "$s" )

This is very similar to the flawed approach, but instead of appending
an extra delimiter to the input and looping until the input is empty,
we *check* for the existence of a delimiter in the input, and loop until
none is found.  Whatever is left over becomes the final array element
This will be a little bit slower than the flawed code (probably), but I
believe it is free from infinite loops.


Nice! The run time is very similar.
Adding this:

for i in {1..10}
do
_S+=$del$_S
done

to multipy the string by 1024 gave times of ~3.9s and ~4.0s.

I can't see any way the loop would fail to end. This will be my  
boilerplate if I ever need to do such a thing again...



Since we're not modifying the input by appending an extra delimiter,
any ambiguity in the input string was put there by the original input
source, not created by our code.  In my sample input, the ||| substring
between c and d can be parsed as either "delimiter followed by pipe",
or "pipe followed by delimiter".  It is impossible to tell which one
is correct, because we have no external knowledge of the input string.
Therefore, either result must be acceptable.  If the humans who
provided this input don't care for the results they get, well, it's
their problem and not ours.


I guess there's little need to try to cope with delimiters that would be  
ambiguous in practice...


--
John



Re: Homebuilt NAS Advice

2020-08-05 Thread Leslie Rhorer

- RAID would require extra hardware in my machines, for some of them
   that would be a non-trivial constraint (e.g. my BananaPi servers and
   my laptops).


	How do you figure?  Adding an external USB drive enclosure to a laptop 
or a Banana Pi is pretty trivial.  RAID does not require any hardware 
other than the drives.  A four drive USB enclosure can be had for under 
$100.





Re: Homebuilt NAS Advice

2020-08-05 Thread Stefan Monnier
> And I disagree with you, because if you do not have RAID, you loose the data
> instantly and in best case your backup is a few hours old. Plus you have
> the effort to restore probably the last monthly, then the last weekly and
> then few incrementals - compared to replacing just one disk and letting it
> resync.

Again, this heavily depends on the specifics.

In my case, RAID would have been helpful once over the last 20 years
(and FWIW, I'm still using that disk that failed (after having created
a partition that covers about 4% of the disk and which encloses all the
sectors that can't be read/written any more ;-)

So in my experience it's rarely useful.  That doesn't mean it's not
worth it, tho.  For that you need to look even more at the details of
the actual upsides and downsides:

- I work on 3 machines "all the time" (one desktop at home, one at the
  office, plus a laptop), so if one of those machines dies I can just
  keep working with one of the other ones (and I have an extra laptop
  that I keep as hot spare).  W.r.t my servers, I similarly have 2 (one
  at the office and one at work, both of them keeping a copy of my
  backups), so if one dies, well, I just use the other until I can fix
  that one (and FWIW one of them tends to crash fairly often lately, for
  software reasons).
- Regarding backups: I wouldn't restore a full install from a backup,
  instead I'd clone one of my other machines.  But w.r.t
  full/incremental, I use `bup` which doesn't distinguish between those.
- More importantly, most of the things I work on are "backed up" several
  times a day on a remote server by virtue of being pushed to
  a Git repository or being stored in an IMAP server (which *does* use
  RAID, but that machine is not under my control).  So in the unlikely
  (but definitely possible) even that my machine dies, I won't lose very
  much work anyway.
- RAID would require extra hardware in my machines, for some of them
  that would be a non-trivial constraint (e.g. my BananaPi servers and
  my laptops).

RAID makes a lot of sense in many cases, but I don't think it makes
sense in mine.


Stefan



Re: Homebuilt NAS Advice

2020-08-05 Thread Leslie Rhorer




On 8/5/2020 1:51 PM, deloptes wrote:


Imagine you have classical backup: daily incrementals, full weekly and full
monthly.


	This is not required with DAR.  One full backup is all that is 
required.  Anything else is a waste of time and space.  One can employ 
either differential or decremental backups, keeping a full history of 
all activity on the system.


 Imagine you have retention for the full weekly 3 (until end of

month) and for full monthly 12 (until end of year).
You have to maintain 15 full backups and the 6 daily incrementals. How much
space is it, that you need for your backup storage?
This is why the question what is your active size. No imagine I have 2TB of
data, even if I compress this data - lets say with avg. 60% ratio it is
800GB per full backup. 15 copies + means 12TB+. Of course if you have
video/audio like mp3, it is already compressed and ratio for the backup
compression goes down and space needed up.
Now here comes the trick with deduplication. The backup system makes one
full backup (800GB) and then keeps track of the bits that changed (it is
not that simple, but for the example). Only they are being backuped. Some
systems provide ratio of 90%. So to keep your 15+ copies with deduplication
ratio of ~80% you need about 3TB.


	You are talking about differential archiving at the binary level. DAR 
can employ delta binaries for both incremental and decremental backups, 
which means only the changes to the binary data, if any, is stored in 
subsequent backups, not the entire file.  There is no need for multiple 
full backups.  A full backup of my main array to hard drive media will 
take a minimum of 15 days.  Transferring across the 10G link to my 
backup server would take a minimum of 2.8 days.  Although full backups 
of smaller systems will normally take less time, the fact is full 
backups on a regular basis are just not necessary, and especially not 
when using DAR.




volume size is 46.9 Terabytes (43.6 Teribytes) after formatting. ??The
main server currently has 22 Terabytes of data on it. ??The backup server
is effectively full.



So you have a perfect candidate for deduplication :) because I guess you can
keep only few copies of that size on the backup server.


	A few copies of what size?  The backup server is an exact mirror of the 
main server, plus several T of additional files I don't need on the main 
server.  My DAR backups include new files (typically a few hundred GB) 
plus changes to files (typically a few MB).  Borg isn't really offering 
anything DAR does not, except DAR is not server based.  If I wanted to 
run DAR on my backup server, I could, but I don't want to.  I use DAR 
for offline archival storage.  Thew backup array is a mirror, not an 
archive.


	In the case of a catastrophic failure of the main server or its array, 
I simply bring up the backup server as a replacement until such time - 
days later - as the main server is rebuilt.  In the case of an 
accidentally lost or corrupted file(s), I just do a cp from the backup 
to the main server, restoring the files to the state they were in as of 
04:00 this morning.  Typically, this takes a few seconds.




Re: [OT] CentOS 6 [Was: Re: how to quickly recover buster boot loader]

2020-08-05 Thread David Wright
On Wed 05 Aug 2020 at 17:51:36 (+), Long Wind wrote:
>  no, i try centos for fun and fedora and opensuse
> my hardware is old and old software usually require less memory/disk
> these old software are new to me, i might discover interesting app
> http://archive.debian.org/
> http://archives.fedoraproject.org/
> i don't think update is important

Bear in mind that when you install some distribution "just for fun",
then unless you take precautions, it will naturally take control of
the boot process. So you probably want to have a well-practised method
standing by for restoring your preferred distribution's.

Cheers,
David.



Re: After software update systemd runs into timeouts

2020-08-05 Thread David Wright
On Wed 05 Aug 2020 at 22:53:26 (+0200), Urs Thuermann wrote:

> Should this be considered a bug?  Shouldn't 'aptitude why' show the
> packages that depend on it?

Why not read the man page:

   Note
   aptitude why does not perform full dependency
   resolution; it only displays direct relationships
   between packages. For instance, if A requires B, C
   requires D, and B and C conflict, “aptitude why-not D”
   will not produce the answer “A depends on B, B
   conflicts with C, and D depends on C”.

   By default aptitude outputs only the “most installed,
   strongest, tightest, shortest” dependency chain. That is,
   it looks for a chain that only contains packages which are
   installed or will be installed; it looks for the strongest
   possible dependencies under that restriction; it looks for
   chains that avoid ORed dependencies and Provides; and it
   looks for the shortest dependency chain meeting those
   criteria. These rules are progressively weakened until a
   match is found.

   If the verbosity level is 1 or more, then all the
   explanations aptitude can find will be displayed, in
   inverse order of relevance. If the verbosity level is 2 or
   more, a truly excessive amount of debugging information
   will be printed to standard output.

> # aptitude why libpam-systemd
> i   systemd Recommends libpam-systemd
> # 

This looks like you used the default. You will probably need to pipe
the output through less:

$ aptitude why libpam-systemd | wc
  1   4  35
$ aptitude -v why libpam-systemd | wc
  26449  130410 1657367
$ aptitude -v -v why libpam-systemd | wc
4317784 23501088 268859202
$ 

BTW, with -s you don't need to do this sort of analysis as root.

$ aptitude -s purge libpam-systemd
The following packages will be REMOVED:
  libpam-systemd{p} 
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 406 kB will be freed.
The following packages have unmet dependencies:
 udisks2 : Depends: libpam-systemd but it is not going to be installed
 policykit-1 : Depends: libpam-systemd but it is not going to be installed
 dbus-user-session : Depends: libpam-systemd but it is not going to be installed
The following actions will resolve these dependencies:

  Remove the following packages:  
1)  colord [1.4.3-4 (now, stable)]
2)  dbus-user-session [1.12.20-0+deb10u1 (now, stable)]   
3)  policykit-1 [0.105-25 (now, stable)]  
4)  udisks2 [2.8.1-4 (now, stable)]   

  Install the following packages: 
5)  dbus-x11 [1.12.20-0+deb10u1 (stable)] 

  Leave the following dependencies unresolved:
6)  cups recommends colord
7)  cups-daemon recommends colord 
8)  cups-filters recommends colord
9)  hplip recommends policykit-1  
10) needrestart recommends libpam-systemd | sysvinit-core 
11) openssh-server recommends default-logind | logind | libpam-systemd
12) systemd recommends libpam-systemd 
13) udisks2 recommends policykit-1
14) xserver-xorg-core recommends libpam-systemd   

Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.
$ 

Cheers,
David.



Re: Homebuilt NAS Advice

2020-08-05 Thread Leslie Rhorer

On 8/5/2020 5:25 PM, deloptes wrote:

Jonathan Dowland wrote:


For the majority of use-cases, I really disagree that RAID is ever more
essential than backup. I can cook up some scenarios where this isn't
true, but they are not common ones.


And I disagree with you,


	So do I.  Both are essential, and without both, sooner or later there 
is going to be a very significant problem.



because if you do not have RAID, you loose the data
instantly and in best case your backup is a few hours old.


	Not only that, the system is simply unavailable until the file are 
restored.  This can take hours or even days.



Plus you have
the effort to restore probably the last monthly, then the last weekly and
then few incrementals - compared to replacing just one disk and letting it
resync.


	If that.  On my large arrays, I keep a hot spare disk online, so the 
resynch starts the moment a disk fails.



In general I agree with you that both are essential, but if someone asks me
I definitely recommend RAID and in addition the backup.
This means if you want to be able to restore let's say yesterdays version of
a file.


	Exactly.  RAID does not protect against Oops.  Backups do, at least toa 
 reasonable extent.



True backup is very costly if you want to do it the proper way.


	Well, there are solutions that are both economical and effective.  They 
tend to require more work on the part of the admin, though.  I mean, it 
would be really, really nice to buy a Quantum tape drive for $10K and 
change, I definitely cannot afford it.  I have a ton of older hard 
drives pulled from the arrays during upgrades sitting around doing 
nothing, however.  Their use as backup media costs nothing.




Re: Homebuilt NAS Advice

2020-08-05 Thread deloptes
Jonathan Dowland wrote:

> For the majority of use-cases, I really disagree that RAID is ever more
> essential than backup. I can cook up some scenarios where this isn't
> true, but they are not common ones.

And I disagree with you, because if you do not have RAID, you loose the data
instantly and in best case your backup is a few hours old. Plus you have
the effort to restore probably the last monthly, then the last weekly and
then few incrementals - compared to replacing just one disk and letting it
resync.

In general I agree with you that both are essential, but if someone asks me
I definitely recommend RAID and in addition the backup.
This means if you want to be able to restore let's say yesterdays version of
a file.

True backup is very costly if you want to do it the proper way. For example
you shouldn't have the backup in the same room - cause in case of fire ...
you know what I mean. I wouldn't spend that much money on it.

As the question was about NAS ... it looks like you need two - one for the
data and one for the backup

So I appreciate and share your opinion, but here it is not an enterprise
consulting company I guess ... although with 40+TB ... :D 22 of them in
use ... I doubt that avg. user has high demand on backup such large
volumes. AS shown in the example with deduplication you can use even an
external disk as backup device to keep large amount of backups.

All I want to say is setting priorities and calculating the risk makes more
sense to me.




Re: Homebuilt NAS Advice

2020-08-05 Thread Jonathan Dowland

On Wed, Aug 05, 2020 at 09:09:07PM +0200, deloptes wrote:

Sorry to answer a question that was not addressed to me, but I was just
reading this topic as I had experience in the past few years with this
topic in a project I worked on.


No problem — it's a public list :)


IMO you should do RAID and probably consider doing backups. RAID is the most
essential part


For the majority of use-cases, I really disagree that RAID is ever more
essential than backup. I can cook up some scenarios where this isn't
true, but they are not common ones.


It is all about probability of failure. The probability of a disk to fail is
avg. but it happens. The probability that 2 disks fail at the same time ...
not really except you experience some kind of electric shock or you have a
really bad luck. For this it is recommended to use backup. Some people go
even further burning backups on disks (like blu-rays) because they fear
EMP.


Backups protect you from more than disk failure. You could lose all your
data with perfectly fine disks thanks to software failure, user error,
or malicious attack.


I have used the back to restore data either because I accidentally deleted
something


That's definitely one thing I use backups for, as well as to protect
against disk failure.


--
Please do not CC me, I am subscribed to the list.

👱🏻  Jonathan Dowland
✎j...@debian.org
🔗   https://jmtd.net



Re: After software update systemd runs into timeouts

2020-08-05 Thread Urs Thuermann
Andrei POPESCU  writes:

> It's of course possible to reopen the bug if it still exists, though 
> stretch is oldstable now and in LTS mode.

I plan to upgrade to buster, but only after August 15th.

> On a server it might be possible to simply not use systemd-logind.  E.g.  
> (at least on buster) libpam-systemd is only recommended by systemd and 
> openssh-server.

Although 'aptitude why' only shows libpam-systemd is recommended by
systemd, I cannot purge it since other packages seem to depend on it:

# aptitude why libpam-systemd
i   systemd Recommends libpam-systemd
# aptitude purge libpam-systemd
The following packages will be REMOVED:
  libpam-systemd{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 379 kB will be freed.
The following packages have unmet dependencies:
 policykit-1 : Depends: libpam-systemd but it is not going to be installed
The following actions will resolve these dependencies:

 Remove the following packages:
1) libvirt-daemon-system [3.0.0-4+deb9u4 (now, oldstable)]
2) policykit-1 [0.105-18+deb9u1 (now, oldstable)]

 Leave the following dependencies unresolved:
3) needrestart recommends libpam-systemd | sysvinit-core
4) openssh-server recommends libpam-systemd
5) systemd recommends libpam-systemd
6) virt-manager recommends libvirt-daemon-system (>= 1.2.7)
7) xserver-xorg-core recommends libpam-systemd



Accept this solution? [Y/n/q/?]

Should this be considered a bug?  Shouldn't 'aptitude why' show the
packages that depend on it?

urs



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread didier . gaumet
Hello,

perhaps options described here could help you:
 https://www.debian.org/doc/manuals/aptitude/ch02s05s05.en.html



Re: After software update systemd runs into timeouts

2020-08-05 Thread Andrei POPESCU
On Mi, 05 aug 20, 18:02:12, Urs Thuermann wrote:
> Andrei POPESCU  writes:
> 
> > The package 'needrestart' hooks into APT and offers to restart any 
> > affected services.
> 
> Thx, I didn't know needrestart until today, but learned about in in
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770135 and
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823987.
> 
> But regardless of using needrestart or finding grepping them from the
> output of lsof, it seems systemd has problems with it or dbus being
> restarted.
> 
> The bug is obviously nearly 6 years old but hasn't been fixed yet.

#770135 is closed as unreproducible with recent (at the time) systemd, 
see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770135#138 and 
follow-ups.

It's of course possible to reopen the bug if it still exists, though 
stretch is oldstable now and in LTS mode.

Ideally you should try to reproduce it in unstable, or at least buster 
(maybe a fix would qualify for a stable update).
 
> I have spent much time today restarting dbus, ssh, and/or several
> systemd services in different order.  Also systemctl daemon-reexec.
> Nothing seems to help and it seems systemd bugs again force me to
> reboot.  But I am currently 700 km away from my server for the next
> 1.5 weeks and noone else has access to it.  So I'd prefer not to risk
> it.

On a server it might be possible to simply not use systemd-logind.  E.g.  
(at least on buster) libpam-systemd is only recommended by systemd and 
openssh-server.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Homebuilt NAS Advice

2020-08-05 Thread deloptes
Jonathan Dowland wrote:

> In brief my rationale is: without RAID, when a drive failure occurs I
> lose access to my NAS until I've replaced the drive and restored the
> files. I judge that the inconvenience of system downtime is outweighed
> by the increased cost (upfront and running), complexity, and raised
> failure frequency of deploying RAID. Everyone's mileage varies, of
> course.

Sorry to answer a question that was not addressed to me, but I was just
reading this topic as I had experience in the past few years with this
topic in a project I worked on.

IMO you should do RAID and probably consider doing backups. RAID is the most
essential part, because you can replace a failed drive without too much
effort. Most suitable are those cases with at least 4 drive bays as you can
use RAID5 or similar.
It is all about probability of failure. The probability of a disk to fail is
avg. but it happens. The probability that 2 disks fail at the same time ...
not really except you experience some kind of electric shock or you have a
really bad luck. For this it is recommended to use backup. Some people go
even further burning backups on disks (like blu-rays) because they fear
EMP.

My experience is that I replaced many failed disks in the raids in the past
15+y, but never had to recover from backup because of disk failure. 
I have used the back to restore data either because I accidentally deleted
something or because I created a test copy of one of the systems.

It all depends on how much risk you want to take. The truth is somewhere in
the middle. For me personal information or business related files are
important and go into backup and multimedia does not, but everything is on
a RAID.







Re: Homebuilt NAS Advice

2020-08-05 Thread deloptes
Leslie Rhorer wrote:

> In this context what, exactly, is de-duplication?  I fail to see how
> any meaningful interpretation of the term is salient to backups.  To
> compression, yes, to symbolic interpretation, surely, and to saving
> space on a drive and reducing access times, you bet.  To backups?  I
> don't really see it, unless you mean hard-link handling, which it does
> most admirably.  Soft links, of course, are fairly straightforward.  DAR
> does handle sparse files exceedingly well.
> 

Imagine you have classical backup: daily incrementals, full weekly and full
monthly. Imagine you have retention for the full weekly 3 (until end of
month) and for full monthly 12 (until end of year).
You have to maintain 15 full backups and the 6 daily incrementals. How much
space is it, that you need for your backup storage?
This is why the question what is your active size. No imagine I have 2TB of
data, even if I compress this data - lets say with avg. 60% ratio it is
800GB per full backup. 15 copies + means 12TB+. Of course if you have
video/audio like mp3, it is already compressed and ratio for the backup
compression goes down and space needed up.
Now here comes the trick with deduplication. The backup system makes one
full backup (800GB) and then keeps track of the bits that changed (it is
not that simple, but for the example). Only they are being backuped. Some
systems provide ratio of 90%. So to keep your 15+ copies with deduplication
ratio of ~80% you need about 3TB.



>> May I ask what is your active disk size
> 
> What do you mean by "active" disk size?  In each of my main arrays
> there are 8 spindles of 8 Terabytes each.  Six spindles worth are
> encoded with flat data and 2 spindles worth with parity.  RAID 6 does
> not assign any disks specifically for data or for parity as RAID 3 and
> RAID 4 do.  Instead, with both RAID 5 and RAID 6, parity is distributed
> across every drive, and the data is also distributed across all the
> drives, interleaved with the parity.  All put together, the available
> volume size is 46.9 Terabytes (43.6 Teribytes) after formatting.  The
> main server currently has 22 Terabytes of data on it.  The backup server
> is effectively full.
> 

So you have a perfect candidate for deduplication :) because I guess you can
keep only few copies of that size on the backup server.

Live example here one of the servers with borg

the backup archive

--
   Original size  Compressed sizeDeduplicated
size
All archives:5.47 TB  3.37 TB483.58
GB

   Unique chunks Total chunks
Chunk index: 2342114 23644792

The last monthly

Archive name: 2020-07-04T22:01:21
Archive fingerprint: x
Comment:
Hostname: 
Username: 
Time (start): Sat, 2020-07-04 22:01:32
Time (end): Sat, 2020-07-04 23:28:51
Duration: 1 hours 27 minutes 19.92 seconds
Number of files: 3416089
Command line: xx
Utilization of maximum supported archive size: 1%
--
   Original size  Compressed sizeDeduplicated
size
This archive:  807.19 GB493.13 GB 14.90
GB
All archives:5.47 TB  3.37 TB483.58
GB

   Unique chunks Total chunks
Chunk index: 2342114 23644792






Re: [Python-Help] Python 3 Segmentation Fault

2020-08-05 Thread J.Arun Mani
Hello all.

I found a crazy fix to this issue. Running Python in Isolation mode raises no 
problem ! That is, you need to run Python like this:
 $ python3 -I

So having the isolation mode fix the issue, what next step shall I take to make 
the fix permanent (I mean tweak or look at which modules, binaries etc.) ?

Thanks
J Arun Mani



Re: Atheros wifi problem

2020-08-05 Thread Sven Joachim
On 2020-08-05 18:01 +0100, Hilary Snaden wrote:

> Following the recent discussion about Atheros AR9271 wifi no longer working.
>
> After the most recent kernel update to 5.7.10-1 (2020-07-26), my
> AR9271 wifi dongle is recognised again, but there is now a worse
> problem: if I use the dongle, the box gradually freezes over the
> course of around 5 to 20 minutes, starting with network manager. If I
> unplug the dongle before the freeze spreads, the box unfreezes, else
> it requires a power cycle to revive it.
>
> The internal wifi still works normally.
>
> The only obvious error message relates to iwl-debug-yoyo.bin not being
> found.
>
> Can anyone confirm that ath9k_htc was fixed from kernel 5.7.9? The
> kernel mailing list is ambiguous about whether the fix would be in
> 5.7.11 or whether it appeared in 5.7.9.

I don't know anything about ath9k_htc, but the latest fixes for it
appeared in 5.7.11 ("ath9k: Fix general protection fault in
ath9k_hif_usb_rx_cb"[1] and "ath9k: Fix regression with Atheros
9271"[2]), so they are not in Debian yet.

Cheers,
   Sven


1. 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.7.y&id=b43063ff55858f73cbd44fc4496b3489c8bdfba4
2. 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.7.y&id=dcb80ffe3825fb551a293491424695198b2e397d



Atheros wifi problem

2020-08-05 Thread Hilary Snaden

Following the recent discussion about Atheros AR9271 wifi no longer working.

After the most recent kernel update to 5.7.10-1 (2020-07-26), my AR9271 
wifi dongle is recognised again, but there is now a worse problem: if I 
use the dongle, the box gradually freezes over the course of around 5 to 
20 minutes, starting with network manager. If I unplug the dongle before 
the freeze spreads, the box unfreezes, else it requires a power cycle to 
revive it.


The internal wifi still works normally.

The only obvious error message relates to iwl-debug-yoyo.bin not being 
found.


Can anyone confirm that ath9k_htc was fixed from kernel 5.7.9? The 
kernel mailing list is ambiguous about whether the fix would be in 
5.7.11 or whether it appeared in 5.7.9.


And could this unpleasant bug be some kind of buffer overflow?

--
Hilary



Re: System time instantly wrong when network lost

2020-08-05 Thread Michael Stone

On Wed, Aug 05, 2020 at 07:57:07AM -0400, Carl wrote:

Optimum Online is out here (Long Island). When I lost internet service, system
time almost instantly switched to December 13, 2017 at 00:00 or so. If I
connect the computer via my phone hotspot, NTP corrects the time rather
quickly. As soon as I turn off the hotspot, it reverts to 2017.


It's getting that time from something. What's the "or so"--is it always 
the exact same time, or is it increasing? Check your syslog to see if 
there's an entry for what program is setting the time.




Re: how to quickly recover buster boot loader

2020-08-05 Thread Brian
On Wed 05 Aug 2020 at 15:14:33 +, Andrew Cater wrote:

> Boot from Debian install media. Use rescue mode. Mount Debian partition
> when prompted. Run os-prober and update-grub then exit. Machine should
> reboot into Debian.

No need to run os-prober; update-grub does it.

-- 
Brian.



Re: System time instantly wrong when network lost

2020-08-05 Thread David Wright
On Wed 05 Aug 2020 at 07:57:07 (-0400), Carl wrote:
> Optimum Online is out here (Long Island). When I lost internet service, 
> system time almost instantly switched to December 13, 2017 at 00:00 or so. If 
> I connect the computer via my phone hotspot, NTP corrects the time rather 
> quickly. As soon as I turn off the hotspot, it reverts to 2017. 
> 
> Why?
> 
> Debian Buster, freshly updated. 

New CMOS battery?

Cheers,
David.



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread Sven Joachim
On 2020-08-05 12:33 +0200, Harald Dunkel wrote:

> On 8/5/20 11:03 AM, Sven Joachim wrote:
>> I am surprised to read that, considering that your installed lxc
>> version
>> does not actually fulfill the dependency.  Note the epoch.
>> $ dpkg --compare-versions 1:2.0.11-1~xgo90+1 lt 3 || echo 'Got it!'
>> Got it!
>>
>
> Maintaining the sample-lxc package I have no influence upon
> other packages introducing new epoch numbers. Upstream moved
> the templates into a separate github repository for lxc
> version 3, so its unreasonable to consider Debian's epoch
> number for package dependencies in this case.
>
> How can I express this dependency upon lxc's upstream version
> number in my control file, ignoring the epoch number?

You don't, at least as long as there is only an lxc package _with_ the
epoch available, like the one you have currently installed.

I am not sure I understand what you actually want to do, though.

Cheers,
   Sven



Re: After software update systemd runs into timeouts

2020-08-05 Thread Urs Thuermann
Andrei POPESCU  writes:

> The package 'needrestart' hooks into APT and offers to restart any 
> affected services.

Thx, I didn't know needrestart until today, but learned about in in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770135 and
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823987.

But regardless of using needrestart or finding grepping them from the
output of lsof, it seems systemd has problems with it or dbus being
restarted.

The bug is obviously nearly 6 years old but hasn't been fixed yet.

I have spent much time today restarting dbus, ssh, and/or several
systemd services in different order.  Also systemctl daemon-reexec.
Nothing seems to help and it seems systemd bugs again force me to
reboot.  But I am currently 700 km away from my server for the next
1.5 weeks and noone else has access to it.  So I'd prefer not to risk
it.

urs



[OT] CentOS 6 [Was: Re: how to quickly recover buster boot loader]

2020-08-05 Thread Liam O'Toole
On Wed, 05 Aug, 2020 at 00:04:48 +, Long Wind wrote:
>i have win7 at sda1 and buster at sda2
>i install centos 6 at sda3, it can boot win7, can't see buster
>i mean i can't boot buster now
>is there some rescue image that can be written to bootable usb disk?
>or do you know how to config centos 6 boot loader?
>is buster's boot code installed at sda2 by default?

An off-topic question: do you have a particular need for CentOS 6? It
reaches its end of life in November.



Re: After software update systemd runs into timeouts

2020-08-05 Thread Urs Thuermann
Greg Wooledge  writes:

> Google led me to 
> which, although it's for Arch Linux and not Debian, might possibly
> be relevant for you.
> 
> In particular, what does "ls -ld /var/run" say?

The symlink /var/run -> /run is OK.  My problem is probably the same
as in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770135 and
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823987 which is
nearly 6 years old.  Unfortunately, it seems not to be solved.

urs



Re: Homebuilt NAS Advice

2020-08-05 Thread Stefan Monnier
> Can bup expire old backups yet (and remove the corresponding objects)?

Yes ;-)


Stefan



Re: how to quickly recover buster boot loader

2020-08-05 Thread Andrew Cater
Boot from Debian install media. Use rescue mode. Mount Debian partition
when prompted. Run os-prober and update-grub then exit. Machine should
reboot into Debian.


On Wed, Aug 5, 2020 at 1:28 PM Long Wind  wrote:

> Thank Greg!
> but chroot dance is new to me, it doesn't seem easy
> it involves many steps (commands)
> a small error will lead to failure
>
> i install centos just for fun
> i can install lubuntu at sda3 and it can boot buster
>
>
>
>
> On Wednesday, August 5, 2020, 8:15:14 PM GMT+8, Greg Wooledge <
> wool...@eeg.ccf.org> wrote:
>
>
> On Wed, Aug 05, 2020 at 12:04:48AM +, Long Wind wrote:
>
> > i have win7 at sda1 and buster at sda2i install centos 6 at sda3, it can
> boot win7, can't see busteri mean i can't boot buster now
> > is there some rescue image that can be written to bootable usb disk?
> > or do you know how to config centos 6 boot loader?is buster's boot code
> installed at sda2 by default?
>
>
> I'm going to assume you're using Legacy/MBR booting, because I don't know
> enough about UEFI to answer this question in that universe.
>
> If you're trying to multi-boot several different Linuxes from one
> hard drive, the first thing you have to do is make a decision.  You
> must choose which Linux will be in control of the boot loader.
>
> Let's say you choose Debian.  (If you choose something else, stop
> reading now, and go ask the other OS's mailing list for help.)
>
> First step, then, will be to boot into Debian successfully.  For this,
> you'll probably need to boot into whatever Linux you *can* boot, whether
> that's the CentOS on the hard drive, or a rescue CD, or whatever.
>
> Once you're booted into *a* Linux, then you can do the chroot dance
> to mount the Debian file system(s) underneath that.
>
> According to the IRC bot factoid, that dance goes something like
> this:
>
>   Mount your root filesystem with "mount -t ext2 /dev/whatever /target"
>   and make /dev, /proc and /sys usable with "mount --rbind --make-rslave
>   /dev /target/dev ; mount -t proc none /target/proc ; mount -t sysfs none
>   /target/sys". You can then chroot into the system with "chroot /target".
>
> There may be other dances that will also work.
>
> Once you're chrooted into Debian running under some sort of Linux
> kernel, first make sure the os-prober package is installed.  Then you can
> write Debian's GRUB into the master boot recor, by running grub-install.
>
> After doing grub-install, you should have GRUB in the hard drive's
> master boot record and it should be configured to read the menu in
> Debian's version of the /boot directory.
>
> In order to make the Debian GRUB menu point to all of the operating
> systems on your hard drive, make sure os-prober is installed (yes, I
> know, I already said it; I'm saying it again).  Then run update-grub.
>
> Exit out of the chroot, unmount it, and reboot.  You should get Debian's
> GRUB menu, and you should be able to boot into Debian, at the very
> least.
>
> If the Debian GRUB menu doesn't contain all of the operating systems
> that you think it should contain, then you'll have to poke around in
> the update-grub and os-prober internals and figure out what's wrong.
>
> Once you get everything working, you'll need to remember that you have
> chosen to make Debian the controller of the boot loader.  Every time
> you make a kernel change to any of the *other* Linuxes on your hard
> drive, you'll need to boot into Debian, and run update-grub, to pick
> up the changes in the other Linuxes.
>
>
>


Re: Homebuilt NAS Advice

2020-08-05 Thread Jonathan Dowland

On Wed, Aug 05, 2020 at 10:11:51AM -0400, Stefan Monnier wrote:

The system I use (`bup`) does support that as well (every backup is
(more or less) a Git commit, so it doesn't distinguish full-backups from
incrementals), but it doesn't bother to mention it probably because it's
very basic.


Can bup expire old backups yet (and remove the corresponding objects)?
When I looked at it a long time ago, it couldn't, which meant backup
repositories could only ever grow in size.

--
Please do not CC me, I am subscribed to the list.

👱🏻  Jonathan Dowland
✎j...@debian.org
🔗   https://jmtd.net



Re: After software update systemd runs into timeouts

2020-08-05 Thread Andrei POPESCU
On Mi, 05 aug 20, 12:43:18, Urs Thuermann wrote:
> I run a server with Debian 9 and haven't resisted the conversion to
> systemd strong enough, therefore I now have a couple of problems with
> stability and availability.
> 
> One of them is, that often after software updates systemd-logind.service
> fails to start and ssh logins take a very long time.  I suspect this has
> to do with shared libs being replaced while being used by running
> processes.  This usually causes no problems for everything else except
> systemd.  When that problem occurs, using lsof I find and restart every
> service using deleted files.  Sometimes this helps but not always.

The package 'needrestart' hooks into APT and offers to restart any 
affected services.
 
Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Homebuilt NAS Advice

2020-08-05 Thread Stefan Monnier
>   I prefer DAR for several reasons.  First of all, as I mentioned
>   before, DAR is the only backup solution of which I am aware that can
>   restore not only deleted or corrupted files, but which can also
>   restore deletions. This means DAR can restore any or all files one
>   chooses in a batch, but then if requested can go back and delete
>   files which were deleted at a later time but prior to additional
>   DAR backups.

I find it hard to believe that it's a rare feature.

The system I use (`bup`) does support that as well (every backup is
(more or less) a Git commit, so it doesn't distinguish full-backups from
incrementals), but it doesn't bother to mention it probably because it's
very basic.


Stefan



Re: After software update systemd runs into timeouts

2020-08-05 Thread Greg Wooledge
On Wed, Aug 05, 2020 at 12:43:18PM +0200, Urs Thuermann wrote:
> Aug  5 11:06:06 bit systemd[1]: systemd-logind.service: Start operation timed 
> out. Terminating.
> Aug  5 11:06:06 bit systemd[1]: Failed to start Login Service.
> Aug  5 11:06:06 bit systemd[1]: systemd-logind.service: Unit entered failed 
> state.

Google led me to 
which, although it's for Arch Linux and not Debian, might possibly
be relevant for you.

In particular, what does "ls -ld /var/run" say?



Re: delimiters with more than one character? ...

2020-08-05 Thread Greg Wooledge
On Wed, Aug 05, 2020 at 03:04:32PM +0900, John Crawley wrote:
> This method cuts off the first part of the string, up to the delimiter, and
> adds it to the array, then continues with what's left of the string until
> there's none left:

Yes, that's a valid approach, although not one that most bash scripters
would choose, because it's hideously slow in bash, and doesn't "feel"
like it's in the "spirit" of shell scripting.

> ---
> #!/bin/bash
> 
> _S=' 34 + 45 \| abc \| 1 2 3 \| c\|123abc '
> del='\|'
> 
> arr=()
> s=${_S}${del}
> while [[ -n $s ]]
> do
> arr+=( "${s%%"${del}"*}" )
> s=${s#*"${del}"}
> done
> 
> declare -p arr
> ---
> outputs:
> declare -a arr=([0]=" 34 + 45 " [1]=" abc\\ " [2]=" 1 2 3 " [3]=" c"
> [4]="123abc ")

Your output doesn't match your input.  You've got an extra backslash
character in the [1] element.  Perhaps you tested with several different
inputs, and accidentally pasted the wrong output.

(It would have been good if the original poster's sample input string
had included some of the things you were probably testing, such as
standalone backslash and pipe characters.  As presented, the original
problem was pretty stupid.  Why even have a multi-character delimiter
when none of the individual characters in the delimiter appear in the
data?)

> I've used this myself, so am eager to hear of any hidden snags. :)
> 
> (One already: if the delimiter is a repeated character which might also be
> the last in the last string fragment, then the loop never closes. Fairly
> rare?)

OK... yeah, that would be a show-stopper, all right.  I was able
to reproduce the infinite loop using:

_S=' 34 + 45 || abc\ || 1|2 3 || c||123abc |'
del='||'
s=${_S}${del}
arr=()
while [[ -n $s ]]; do arr+=( "${s%%"${del}"*}" ); s=${s#*"${del}"}; done

(Don't do this in a window you care about, or on a system that can't
afford to run out of memory.  By the time I pressed Ctrl-C, the output
array had over 600,000 elements.)

The problem here is that the two expressions inside the loop fail to
identify the final delimiter correctly.  At the point where everything
fails, we have:

del='||'
s='123abc |||'

and:

$ printf '<%s>\n' "${s%%"${del}"*}"
<123abc >
$ printf '<%s>\n' "${s#*"${del}"}"
<|>

In other words, the expressions treat the *first* two pipes as the
delimiter, rather than the *last* two pipes.  The third pipe character
is therefore left behind in the string, causing the infinite loop.
(In addition, the final array element before the infinite loop is
incorrect.  It should be "123abc |", not "123abc ".)

I don't believe this approach can be made to work in all cases, because
appending the extra delimiter to the end of the string creates an
ambiguous input.  The ||| at the end could be "a pipe followed by
the delimiter", or "the delimiter followed by a pipe".  We humans
know that it's supposed to be the former, but the code in the loop
is resulting in the latter.

A different approach is needed.  The one that immediately springs to
mind for me is:

s='a || b || c ||| d |'
del='||'
arr=()
while [[ $s = *"$del"* ]]; do arr+=( "${s%%"$del"*}" ); s=${s#*"$del"}; done
arr+=( "$s" )

This is very similar to the flawed approach, but instead of appending
an extra delimiter to the input and looping until the input is empty,
we *check* for the existence of a delimiter in the input, and loop until
none is found.  Whatever is left over becomes the final array element.

This will be a little bit slower than the flawed code (probably), but I
believe it is free from infinite loops.  If you're not convinced,
you could add a loop counter, and abort when some arbitrary limit is
reached.

Since we're not modifying the input by appending an extra delimiter,
any ambiguity in the input string was put there by the original input
source, not created by our code.  In my sample input, the ||| substring
between c and d can be parsed as either "delimiter followed by pipe",
or "pipe followed by delimiter".  It is impossible to tell which one
is correct, because we have no external knowledge of the input string.
Therefore, either result must be acceptable.  If the humans who
provided this input don't care for the results they get, well, it's
their problem and not ours.



Re: how to quickly recover buster boot loader

2020-08-05 Thread Greg Wooledge
On Wed, Aug 05, 2020 at 12:04:48AM +, Long Wind wrote:
> i have win7 at sda1 and buster at sda2i install centos 6 at sda3, it can boot 
> win7, can't see busteri mean i can't boot buster now
> is there some rescue image that can be written to bootable usb disk?
> or do you know how to config centos 6 boot loader?is buster's boot code 
> installed at sda2 by default?

I'm going to assume you're using Legacy/MBR booting, because I don't know
enough about UEFI to answer this question in that universe.

If you're trying to multi-boot several different Linuxes from one
hard drive, the first thing you have to do is make a decision.  You
must choose which Linux will be in control of the boot loader.

Let's say you choose Debian.  (If you choose something else, stop
reading now, and go ask the other OS's mailing list for help.)

First step, then, will be to boot into Debian successfully.  For this,
you'll probably need to boot into whatever Linux you *can* boot, whether
that's the CentOS on the hard drive, or a rescue CD, or whatever.

Once you're booted into *a* Linux, then you can do the chroot dance
to mount the Debian file system(s) underneath that.

According to the IRC bot factoid, that dance goes something like
this:

  Mount your root filesystem with "mount -t ext2 /dev/whatever /target"
  and make /dev, /proc and /sys usable with "mount --rbind --make-rslave
  /dev /target/dev ; mount -t proc none /target/proc ; mount -t sysfs none
  /target/sys". You can then chroot into the system with "chroot /target".

There may be other dances that will also work.

Once you're chrooted into Debian running under some sort of Linux
kernel, first make sure the os-prober package is installed.  Then you can
write Debian's GRUB into the master boot recor, by running grub-install.

After doing grub-install, you should have GRUB in the hard drive's
master boot record and it should be configured to read the menu in
Debian's version of the /boot directory.

In order to make the Debian GRUB menu point to all of the operating
systems on your hard drive, make sure os-prober is installed (yes, I
know, I already said it; I'm saying it again).  Then run update-grub.

Exit out of the chroot, unmount it, and reboot.  You should get Debian's
GRUB menu, and you should be able to boot into Debian, at the very
least.

If the Debian GRUB menu doesn't contain all of the operating systems
that you think it should contain, then you'll have to poke around in
the update-grub and os-prober internals and figure out what's wrong.

Once you get everything working, you'll need to remember that you have
chosen to make Debian the controller of the boot loader.  Every time
you make a kernel change to any of the *other* Linuxes on your hard
drive, you'll need to boot into Debian, and run update-grub, to pick
up the changes in the other Linuxes.



Re: System time instantly wrong when network lost

2020-08-05 Thread David
On Wed, 5 Aug 2020 at 21:57, Carl  wrote:
>
> Optimum Online is out here (Long Island). When I lost internet service, 
> system time almost instantly switched to December 13, 2017 at 00:00 or so. If 
> I connect the computer via my phone hotspot, NTP corrects the time rather 
> quickly. As soon as I turn off the hotspot, it reverts to 2017.
>
> Why?
>
> Debian Buster, freshly updated.

https://wiki.archlinux.org/index.php/System_time



System time instantly wrong when network lost

2020-08-05 Thread Carl
Optimum Online is out here (Long Island). When I lost internet service, system 
time almost instantly switched to December 13, 2017 at 00:00 or so. If I 
connect the computer via my phone hotspot, NTP corrects the time rather 
quickly. As soon as I turn off the hotspot, it reverts to 2017. 

Why?

Debian Buster, freshly updated. 

Thanks.

Carl Fink

Re: firewalls

2020-08-05 Thread Kenneth Parker
On Wed, Aug 5, 2020, 7:22 AM deloptes  wrote:

> Dan Ritter wrote:
>
> > After install you have a powerful L3 firewall system available to
> > you, but not configured to block anything.
> >
> > There are two command-line interfaces to it, iptables and
> > nftables. nftables is the newer interface, but iptables has more
> > documentation written.
> >
> > You also have options to install other interfaces to the system.
>
> I've been struggling with those for years and tried many tools ... at the
> end I ended up with shorewall.
>
> While most of the tools target a single host - perhaps desktop or notebook
> computer. I also needed flexibility and simplicity configuring a firewall
> with 3 interfaces (DMZ, intranet and internet). I must admit that shorewall
> beat it all.
>
> So while some distros like RedHat offer active firewall per default, Debian
> gives you the choice what system you will choose to manage the firewall.
>
> It is matter of philosophy and I allow to speak for some of the users here,
> that we really appreciate this philosophy of choice.
>
> I don't know about Ubuntu, I would expect it would have a preconfigured
> firewall and some kind of Gnome interface to it.
>

Ubuntu has a package, ufw (Uncomplicated Firewall), as a frontend to
iptables.  It is off, by default.

Along with Debian (and Devuan), I use Xubuntu, for xfce.  I have not tried
the "original" Gnome version of Ubuntu, though I run a Partition with
Buster Gnome.

Kenneth Parker


Re: firewalls

2020-08-05 Thread deloptes
Dan Ritter wrote:

> After install you have a powerful L3 firewall system available to
> you, but not configured to block anything.
> 
> There are two command-line interfaces to it, iptables and
> nftables. nftables is the newer interface, but iptables has more
> documentation written.
> 
> You also have options to install other interfaces to the system.

I've been struggling with those for years and tried many tools ... at the
end I ended up with shorewall.

While most of the tools target a single host - perhaps desktop or notebook
computer. I also needed flexibility and simplicity configuring a firewall
with 3 interfaces (DMZ, intranet and internet). I must admit that shorewall
beat it all.

So while some distros like RedHat offer active firewall per default, Debian
gives you the choice what system you will choose to manage the firewall.

It is matter of philosophy and I allow to speak for some of the users here,
that we really appreciate this philosophy of choice.

I don't know about Ubuntu, I would expect it would have a preconfigured
firewall and some kind of Gnome interface to it.

regards



Re: firewalls

2020-08-05 Thread Reco
Hi.

On Wed, Aug 05, 2020 at 07:11:12AM -0400, Dan Ritter wrote:
> riveravaldez wrote: 
> > 
> > If I can ask: which is the situation, in this aspect, in a plain
> > plain/straightforward Debian (net)installation? Let's say: what's the
> > by-default setting of the system?
> 
> 
> After install you have a powerful L3 firewall system

A small nitpick - netfilter is L4, not L3, although it can be used as
such. netfilter is more than capable of matching IP-based transport
level protocols and their properties.

Reco



After software update systemd runs into timeouts

2020-08-05 Thread Urs Thuermann
I run a server with Debian 9 and haven't resisted the conversion to
systemd strong enough, therefore I now have a couple of problems with
stability and availability.

One of them is, that often after software updates systemd-logind.service
fails to start and ssh logins take a very long time.  I suspect this has
to do with shared libs being replaced while being used by running
processes.  This usually causes no problems for everything else except
systemd.  When that problem occurs, using lsof I find and restart every
service using deleted files.  Sometimes this helps but not always.

When I try to restart systemd-logind.service it fails with an error
message after a timeout of 1:30 minutes, but then doesn't give any
information about the problem (instead it prefers to show off how little
resources it used and cluttering up output with static info like URLs,
both of which don't belong in a status output):

# time systemctl restart systemd-logind.service 
Job for systemd-logind.service failed because a timeout was exceeded.
See "systemctl status systemd-logind.service" and "journalctl -xe" for details.

real1m30.270s
user0m0.003s
sys 0m0.004s
# systemctl status systemd-logind.service 
● systemd-logind.service - Login Service
   Loaded: loaded (/lib/systemd/system/systemd-logind.service; static; vendor 
preset: enabled)
   Active: activating (start) since Wed 2020-08-05 11:06:06 CEST; 51s ago
 Docs: man:systemd-logind.service(8)
   man:logind.conf(5)
   http://www.freedesktop.org/wiki/Software/systemd/logind
   http://www.freedesktop.org/wiki/Software/systemd/multiseat
 Main PID: 29560 (systemd-logind)
   Status: "Processing requests..."
Tasks: 1 (limit: 4915)
   Memory: 1.0M
  CPU: 10ms
   CGroup: /system.slice/systemd-logind.service
   └─29560 /lib/systemd/systemd-logind

Aug 05 11:06:06 bit systemd-logind[29560]: New session 3893 of user urs.
Aug 05 11:06:06 bit systemd-logind[29560]: New session 3889 of user urs.
...


The log messages in /var/log/syslog also don't give enough information
about what has failed, but it seems systemd tries to restart that service
in the background:

Aug  5 11:06:06 bit systemd[1]: systemd-logind.service: Start operation timed 
out. Terminating.
Aug  5 11:06:06 bit systemd[1]: Failed to start Login Service.
Aug  5 11:06:06 bit systemd[1]: systemd-logind.service: Unit entered failed 
state.
Aug  5 11:06:06 bit systemd[1]: systemd-logind.service: Failed with result 
'timeout'.
Aug  5 11:06:06 bit systemd[1]: systemd-logind.service: Service has no hold-off 
time, scheduling restart.
Aug  5 11:06:06 bit systemd[1]: Stopped Login Service.
Aug  5 11:06:06 bit systemd[1]: Starting Login Service...

# grep Start /var/log/syslog | tail -10
Aug  5 11:37:41 bit systemd[1]: systemd-logind.service: Start operation timed 
out. Terminating.
Aug  5 11:37:41 bit systemd[1]: Starting Login Service...
Aug  5 11:39:11 bit systemd[1]: systemd-logind.service: Start operation timed 
out. Terminating.
Aug  5 11:39:11 bit systemd[1]: Starting Login Service...
Aug  5 11:40:41 bit systemd[1]: systemd-logind.service: Start operation timed 
out. Terminating.
Aug  5 11:40:41 bit systemd[1]: Starting Login Service...
Aug  5 11:42:11 bit systemd[1]: systemd-logind.service: Start operation timed 
out. Terminating.
Aug  5 11:42:11 bit systemd[1]: Starting Login Service...
Aug  5 11:43:41 bit systemd[1]: systemd-logind.service: Start operation timed 
out. Terminating.
Aug  5 11:43:41 bit systemd[1]: Starting Login Service...


With jounalctl you also see the bloated logs which make them unpleasant to
search and it doesn't have more info than /var/log/syslog.

I had this problem 5 to 10 times until now, I have tried fixing it
everytime for an hour or so, and finally given up rebooting the machine.

Is there anything one can do to make systemd working properly again?


In my 30 years of experience with Unix I have always loved the simplicity,
elegance, and stability.  With Linux in general and specifically Debian
with apt, I liked how easily you can update software without disturbing
the running system -- until the advent of systemd.  It makes everything
more complicate, non-Unix-ish, and less stable.  In my experience, systemd
is the end to "Debian as the maintainable OS".

Now I have the choice of not updating, rebooting after most updates, or
having to wait a minute or so for each remote login.  All unacceptable for
a server with long-running processes, hosting a couple of virtual
machines, and high uptimes.


urs



Re: firewalls

2020-08-05 Thread Dan Ritter
riveravaldez wrote: 
> 
> If I can ask: which is the situation, in this aspect, in a plain
> plain/straightforward Debian (net)installation? Let's say: what's the
> by-default setting of the system?


After install you have a powerful L3 firewall system available to
you, but not configured to block anything.

There are two command-line interfaces to it, iptables and
nftables. nftables is the newer interface, but iptables has more
documentation written.

You also have options to install other interfaces to the system.

-dsr-



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread Harald Dunkel

On 8/5/20 11:03 AM, Sven Joachim wrote:


I am surprised to read that, considering that your installed lxc version
does not actually fulfill the dependency.  Note the epoch.

$ dpkg --compare-versions 1:2.0.11-1~xgo90+1 lt 3 || echo 'Got it!'
Got it!



Maintaining the sample-lxc package I have no influence upon
other packages introducing new epoch numbers. Upstream moved
the templates into a separate github repository for lxc
version 3, so its unreasonable to consider Debian's epoch
number for package dependencies in this case.

How can I express this dependency upon lxc's upstream version
number in my control file, ignoring the epoch number?

This is just out of interest. The workaround for my package
is obvious.


Regards
Harri



Re: Homebuilt NAS Advice

2020-08-05 Thread Jonathan Dowland

On Mon, Aug 03, 2020 at 04:59:22PM -0500, Leslie Rhorer wrote:
I concur.  One area in wich I disagree is your decision not to employ 
RAID.  As you very properly comment in the linked page, RAID is not a 
backup.  They are *VERY* different things.  Therefore both,in my 
estimation, are absolutely required.


Reading your message I'm fairly sure you agree that I understand the
difference between RAID and backup, but I'm not sure whether you mean
that for *your* needs, RAIDS is essential (fine, no objection there), or
that given your understanding of *my* needs you disagree that *I* don't
need RAID.

In brief my rationale is: without RAID, when a drive failure occurs I
lose access to my NAS until I've replaced the drive and restored the
files. I judge that the inconvenience of system downtime is outweighed
by the increased cost (upfront and running), complexity, and raised
failure frequency of deploying RAID. Everyone's mileage varies, of
course.

--
Please do not CC me, I am subscribed to the list.

👱🏻  Jonathan Dowland
✎j...@debian.org
🔗   https://jmtd.net



Re: Homebuilt NAS Advice

2020-08-05 Thread Jonathan Dowland

On Wed, Aug 05, 2020 at 09:16:15AM +0200, deloptes wrote:

Leslie Rhorer wrote:


DAR allows for not only incremental backups, but also incremental
deletions.  I find it extremely useful, and allows for as much space
saving on the live system as one likes.  I suggest you check it out.


someone should ask them to implement deduplication, because nowdays it is
impossible to do meaningful backups without.


I've survived without just fine until now, although it is a feature I
want. I'm migrating some things from rdiff-backup to borg at the moment,
and one of the most impressive results I've got so far is

   filesystem size:   228G
   compressed size:   219G
   deduplicated size:  59G

I'm sure the rest of my filesystems will not de-duplicate quite so much.
If I was to try and convert my rdiff-backup increments over to borg, I'd
probably see some savings (moving large sets of files around results in
enormous increments in rdiff-backup) but I don't think I can be bothered
to do that.

--
Please do not CC me, I am subscribed to the list.

👱🏻  Jonathan Dowland
✎j...@debian.org
🔗   https://jmtd.net



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread Sven Joachim
On 2020-08-05 09:42 +0200, Harald Dunkel wrote:

> I've got a problem with upgrading a private package in Stretch. The control
> file says:
>
>   Package: sample-lxc
>   Architecture: all
>   Depends: ${misc:Depends}
>   , cgmanager | systemd
>   , debootstrap
>   , lxc
>   , lxc-templates | lxc ( << 3 )
>   Recommends: cgroup-tools
>   , apparmor
>   , uidmap
>   , yum
>   Conflicts: lxcfs
>   Description: LXC framework
>This package provides LXC for our environment.
>
> lxc-templates is available only for lxc >= 3 (Buster or Bullseye), and
> then its a must-have in my environment.
>
> Trying to install this package on Stretch aptitude complains about a
> missing lxc-templates package, even though the most recent lxc version
> 1:2.0.11-1~xgo90+1 is installed.
>
> apt and apt-get are fine, AFAICS.

I am surprised to read that, considering that your installed lxc version
does not actually fulfill the dependency.  Note the epoch.

$ dpkg --compare-versions 1:2.0.11-1~xgo90+1 lt 3 || echo 'Got it!'
Got it!

Cheers,
   Sven



Re: Homebuilt NAS Advice

2020-08-05 Thread Leslie Rhorer

On 8/5/2020 2:16 AM, deloptes wrote:

Leslie Rhorer wrote:


DAR allows for not only incremental backups, but also incremental
deletions. ??I find it extremely useful, and allows for as much space
saving on the live system as one likes. ??I suggest you check it out.


someone should ask them to implement deduplication, because nowdays it is
impossible to do meaningful backups without.


	In this context what, exactly, is de-duplication?  I fail to see how 
any meaningful interpretation of the term is salient to backups.  To 
compression, yes, to symbolic interpretation, surely, and to saving 
space on a drive and reducing access times, you bet.  To backups?  I 
don't really see it, unless you mean hard-link handling, which it does 
most admirably.  Soft links, of course, are fairly straightforward.  DAR 
does handle sparse files exceedingly well.



May I ask what is your active disk size


	What do you mean by "active" disk size?  In each of my main arrays 
there are 8 spindles of 8 Terabytes each.  Six spindles worth are 
encoded with flat data and 2 spindles worth with parity.  RAID 6 does 
not assign any disks specifically for data or for parity as RAID 3 and 
RAID 4 do.  Instead, with both RAID 5 and RAID 6, parity is distributed 
across every drive, and the data is also distributed across all the 
drives, interleaved with the parity.  All put together, the available 
volume size is 46.9 Terabytes (43.6 Teribytes) after formatting.  The 
main server currently has 22 Terabytes of data on it.  The backup server 
is effectively full.



and how big is the disk size of the
backup?


	The individual drives vary in size.  Mostly they are 3 Terabytes, but 
some are 2T and some are 4T.  Future backups are going to be to 5T and 
8T drives.  It doesn't really matter.  DAR does not care.  For ease and 
simplicity, I usually format each drive into a single file system and 
direct DAR to use slices just under 100G.  This results in no more than 
100G of wasted space on any drive, and usually far less.



What kind of compression does it (DAR) support.


	With my main system, it doesn't really matter, because the vast 
majority of the data (more than 95%) is incompressible.  In general, 
gzip, bzip2, lzo, xz/lzma algorithms are directly supported by DAR, and 
DAR supports both inclusion and exclusion parameters.




Re: firewalls

2020-08-05 Thread Andrei POPESCU
On Ma, 04 aug 20, 22:56:21, riveravaldez wrote:
> 
> If I can ask: which is the situation, in this aspect, in a plain
> plain/straightforward Debian (net)installation? Let's say: what's the
> by-default setting of the system?

There is no firewall configured by default in Debian.

The configuration between a typical "server" and a typical "client" 
system (desktop, laptop) is different enough to make it very difficult 
to come up with a useful default configuration.

Besides, one can also run services on a client system or use a server as 
client system, etc.

See also this discussion on -devel
https://lists.debian.org/debian-devel/2019/07/msg00332.html

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


aptitude problem with control file (in stretch)

2020-08-05 Thread Harald Dunkel

Hi folks,

I've got a problem with upgrading a private package in Stretch. The control
file says:

Package: sample-lxc
Architecture: all
Depends: ${misc:Depends}
, cgmanager | systemd
, debootstrap
, lxc
, lxc-templates | lxc ( << 3 )
Recommends: cgroup-tools
, apparmor
, uidmap
, yum
Conflicts: lxcfs
Description: LXC framework
 This package provides LXC for our environment.

lxc-templates is available only for lxc >= 3 (Buster or Bullseye), and
then its a must-have in my environment.

Trying to install this package on Stretch aptitude complains about a
missing lxc-templates package, even though the most recent lxc version
1:2.0.11-1~xgo90+1 is installed.

apt and apt-get are fine, AFAICS.

???


Regards
Harri



Re: [OT] Remote SSH (dynamic IP) without third-party server

2020-08-05 Thread Andrei POPESCU
On Ma, 04 aug 20, 15:36:07, Gene Heskett wrote:
> 
> this is a shell on its own workspace, all of which belongs to me. I've 
> found I can set the $PATH, then export it, and it works for that shell 
> only. I want it applied to every shell open in my username.

This doesn't appear to be related to the SSH thread, how about starting 
a new thread about this? I also seem to recall it was recently discussed 
on the list.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Homebuilt NAS Advice

2020-08-05 Thread deloptes
Leslie Rhorer wrote:

> DAR allows for not only incremental backups, but also incremental
> deletions.  I find it extremely useful, and allows for as much space
> saving on the live system as one likes.  I suggest you check it out.

someone should ask them to implement deduplication, because nowdays it is
impossible to do meaningful backups without.

May I ask what is your active disk size and how big is the disk size of the
backup? What kind of compression does it (DAR) support.

thanks