Re: Any good Debian books highly recommended

2024-08-25 Thread martin f krafft

Regarding the following, written by "jeremy ardley" on 2024-08-26 at 09:58 Uhr 
GMT:
It's almost 20 years old now but it's still pretty relevant since 
Debian hasn't changed that much.


20 years old means it's missing all the systemd stuff. That's quite 
important.


True. However, systemd is also not Debian-specific, and just like I 
never covered specifics of the Linux kernel or GNU utilities, I am 
no sure how much of systemd would actually have its place in this 
book.


That said, there's a lot of coverage of `init.d` and related Debian 
hacks, such as `update-rc.d`, which are now no longer really 
relevant.


So yeah, the book is ancient, no irrelevant, but I've also moved on 
with life and won't have the time to write an updated version. If 
anyone cared enough to do so, I'd happily put you in touch with Open 
Source Press (the original publisher) and/or NoStarch.


Take care,

--
 .''`.   martin f. krafft 
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
on the other hand, you have different fingers.


Re: How do I connect my new wifi router (Mi Router 4C)?

2023-11-08 Thread Martin
ckOK,TS val 19513 ecr 
0,nop,wscale 6], length 0
10:47:53.843797 enp3s0 In  IP 192.168.231.243.46640 > 142.251.208.132.80: Flags 
[S], seq 1626803236, win 29200, options [mss 1460,sackOK,TS val 19518 ecr 
0,nop,wscale 6], length 0

Last 4 lines here are similar and there I can not find any response from
server (142.251.208.132.80) to them. One thing that is suspicious to me
is that it is using 192.168.231.243 address - maybe my masquerade is not
working properly?
I would like this packet to be rewriten as if it is comming
from 192.168.231.3 (main main computer) not from 192.168.231.243.
Is that reasanoble? And how do I achieve that?


> Warning: if you have not configured network interfaces for DHCP in dnsmasq
> then do it. Otherwise other computers connected to the upstream WiFi link
> may receive DHCP leases emitted from wlxe8de27a5ab1c.

Only thing I added to dnsmasq configuration is one line in
/etc/dnsmasq.d/myHomeDHCPrange file: 
dhcp-range=192.168.231.241,192.168.231.254,12h

This seems to work as you can see above WiFi is getting address 192.168.231.243
Is there anything else I should change for dnsmasq setting?

Bye
Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-11-05 Thread Martin
On Sun, Nov 05, 2023 at 06:48:47AM +, Tixy wrote:
> On Sat, 2023-11-04 at 20:08 +0100, Martin wrote:
> [...]
> > BTW putting above script into /etc/nftables.conf (at the bottom of file)
> > did not ever worked - I had always to run that file manualy as root.
> > Command 'nft list ruleset' only then showed this table.
> > I have no idea why. To me it seemed as if /etc/nftables.conf file
> > was not executed (I have rebooted many times so this file should run).
> [...]
> 
> Did you enable the nftables service? To do that, use:
> 
> # systemctl enable nftables.service
> 
> and to see status of the service
> 
> # systemctl status nftables.service

It was not enabled by default. I enabled it now.
That is great - now i know where to put script when it start working.
Unfortunately I am not there yet :(

Thank you.
Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-11-05 Thread Martin
On Sun, Nov 05, 2023 at 10:26:17AM +0200, Anssi Saari wrote:
> Anyways, a typical masquerade rule would specify the source network and
> an outgoing interface. For example, I have in my Linux router:
> 
> ip saddr 10.0.2.0/24 oifname "enp1s0" masquerade
> 
> so for you that would become
> 
> ip saddr 192.168.231.0/24 oifname "wlxe8de27a5ab1c" masquerade

I tried this line too, unforutately it does not work either.
I mean after executing the config file with this line it shows itself in
output of command 'nft list ruleset' but I still can not connect to
internet from my phone.

I tried many lines similar to this, none works:
ip saddr 192.168.231.3/24 ip daddr != 192.168.231.3/24 masquerade
ip saddr 192.168.231.0/24 ip daddr != 192.168.231.0/24 masquerade
ip saddr 192.168.231.0/24 oifname "wlxe8de27a5ab1c" masquerade
oifname "wlxe8de27a5ab1c" masquerade

I also noticed in output of 'nft list ruleset' that other rules there are
using capitalized letter so i try it too:
istead of   chain postrouting {
I used  chain POSTROUTING {

I also tried to put this command in table that already exist instead of
creating new one (masqrule) - instead of running my whole script I run
only one command (after reboot so there are no more changes made by me before):

nft add rule ip nat POSTROUTING oifname  wlxe8de27a5ab1c  masquerade

(note that here I used 'ip nat' table that is added autmaticaly by
docker server i guess)

Since nothing I tried does work I guess my next step should be to see
where/how those packets from phone are handled. I guess program for that
is tcpdump which I have installed. But since I am unfamiliar with this tool
I would need help from mailing list to guide me what to look for and how
to use this tool.

So please can you give me some info what command should I use with
tcpdump to see where packets from phone are going - or why they do not
go where they should?

Just a reminder - I can connect from phone to my computers web server - which
I also installed just for debugging this. The problem is I can not connect from
phone to internet (let say google.com)

Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-11-04 Thread Martin
On Thu, Oct 26, 2023 at 10:00:08PM +0700, Max Nikulin wrote:
> On 26/10/2023 17:06, Martin wrote:
> > On Thu, Oct 26, 2023 at 09:54:22AM +0700, Max Nikulin wrote:
> > > 
> > > #!/usr/sbin/nft -f
> > > table inet sharedconnection {}
> > > flush table inet sharedconnection
> > > table ip sharedconnection { ... } from above

> I wrote "FILE" in caps trying to express that you can choose any name.
> Debian has /etc/nftables.conf and nft supports the "include" directive, see
> nft(8). So you may put your file to /etc or to create a dedicated directory,
> e.g. /etc/nftables.conf.d, for your settings and include your file from the
> main conf file, so it should be applied on each boot by nftables.service.
> You may put "table ip shared ..." content directly into /etc/nftables.conf
> as well, however I prefer to minimize changes in files provided by packages
> when it is possible to use additional ones.

> By the way, since you have dnsmasq running, you may enable its DHCP server
> (dhcp-range=192.168.231.5,192.168.231.254) and may switch mi router from
> static network configuration to DHCP.

Sorry for long pause in reply (my hard disk was dieing so I replaced HD and
installed whole debian from scratch).

Now (after reinstall everything) I am the point where I want to make my
router to work. I set up dnsmasq to enable DHCP with line in config:
dhcp-range=192.168.231.241,192.168.231.254,12h
and reseted my WiFi router after little configuring with my phone I can
connect my phone to WiFi router and to my computer (that still has address
192.168.231.3). I can access http server on my computer when I type in my
phone address to connect in web browser: http://192.168.231.3/text.html
(I created on my computer file /var/www/html/test.html)

That is all without changing anything with nft program.
I created a file with exatly this content:

#!/usr/sbin/nft -f

table ip masqrule {}
flush table ip masqrule
table ip masqrule {
  chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
ip saddr 192.168.231.3/24 ip daddr != 192.168.231.3/24 masquerade
  }
}

When I execute this file with sudo unfortunately nothing changes, I can
not connect to the internet (trying www.google.com from phone).

[[ this is about old system I had on old HD:
I remeber before reinstalling whole system at this point I had connection
from my phone to the internet (I could see google and then some videos on
youtube worked too on the phone) After I rebooted my old system I could not
connect to internet anymore from the phone. I slightly changed the script
from your post to current state (namely using ip allways instead of inet at
first two lines of script and using 'masqrule'as table name) I thing those
changes are ok.
]]

I have no idea what else should I try to make this work. Maybe I forgot
to issue some command (but I do not think so).

BTW putting above script into /etc/nftables.conf (at the bottom of file)
did not ever worked - I had always to run that file manualy as root.
Command 'nft list ruleset' only then showed this table.
I have no idea why. To me it seemed as if /etc/nftables.conf file
was not executed (I have rebooted many times so this file should run).

Bye
Martin

My current network connections, and 'ip route' command:
(I see 2 changes from my prevoius setup: missing tun0 and  br-7bfdce95ff27
they were before created automaticaly so I hope it does not matter they
are not present now - both where doing local addresses 10.1.1.1/24 and
172.18.0.1/16, maybe they will appeear when I install more programs from
repository - i am not worried about them, just mentioning to be complete)
root@redmoon:~# ip address list
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
   valid_lft forever preferred_lft forever
2: enp3s0:  mtu 1500 qdisc fq_codel state UP 
group default qlen 1000
link/ether e0:d5:5e:73:c9:d3 brd ff:ff:ff:ff:ff:ff
inet 192.168.231.3/24 brd 192.168.231.255 scope global enp3s0
   valid_lft forever preferred_lft forever
inet6 fe80::e2d5:5eff:fe73:c9d3/64 scope link proto kernel_ll
   valid_lft forever preferred_lft forever
3: wlxe8de27a5ab1c:  mtu 1500 qdisc noqueue 
state UP group default qlen 1000
link/ether e8:de:27:a5:ab:1c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.16/24 brd 192.168.0.255 scope global dynamic wlxe8de27a5ab1c
   valid_lft 591334sec preferred_lft 591334sec
inet6 fe80::eade:27ff:fea5:ab1c/64 scope link proto kernel_ll
   valid_lft forever preferred_lft forever
4: docker0:  mtu 1500 qdisc noqueue state 
DOWN group default
link/ether 02:42:33:88:62:ce brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.

Re: RANTING apt update does not work

2023-11-03 Thread Martin
On Thu, Nov 02, 2023 at 02:14:17PM -0500, David Wright wrote:
> 
> I suspect this may be an X-Y problem. The OP appears to already have
> a working sid, but it's on a disk that may be failing.
> 
>   https://lists.debian.org/debian-user/2023/11/msg00013.html
> 
> The idea of upgrading an installation is probably unattractive, as
> they appear to only have access to a weak, remote wifi signal, and
> they supply their phone's internet connection from the same source
> indirectly (by feeding a router from their computer), so tethering
> is out. (
> 
>   https://lists.debian.org/debian-user/2023/10/msg00730.html
> 
> has not been contradicted.)
> 
> So I have to ask why they don't just copy their existing sid to the
> new hard drive, make it bootable, and run that instead.

OH my god! Why did not I tought of just copying it before all this mess.

I already managed to install debian from scratch and upgrade it to sid
on new HD. Now I have to install all the programs i use. And that is the
mess.  because I have used debain since Sarge version and keep copying
files and setups from old to new computer/HD whenever I upgraded hardware
(I started with Pentium I - or whatever name was it then). So I have
lot of programs and configuring files to deal with.

This is also why my reply to this email is soo late (I have been
configuring new system). And for now I have not installed many
programs I need to new system so I use old system up to reply this email.

So I will probably ask more questions later (especialy about setting
up local wifi router - I have some problems with that - but I will
leave it for little later).

Thank you all for help provided so far.
Martin



apt update does not work

2023-11-02 Thread Martin
I have installed old distribution
# deb cdrom:[Debian GNU/Linux 9.1.0 _Stretch_ - Official amd64 DVD Binary-1 
20170722-11:29]/ stretch contrib main non-free
(because that was newest distribution I had on DVD with me)

I configured network and now I am trying to update the system to sid.
I commented everything in /etc/apt/sources.list and added only one line:

deb http://httpredir.debian.org/debian/ sid main contrib non-free 
non-free-firmware

I got error that that public key is not available:

root@redmoon:~# apt update
Get:1 http://httpredir.debian.org/debian sid InRelease [198 kB]
Err:1 http://httpredir.debian.org/debian sid InRelease
  The following signatures couldn't be verified because the public key is not 
available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
Reading package lists... Done
W: GPG error: http://httpredir.debian.org/debian sid InRelease: The following 
signatures couldn't be verified because the public key is not available: 
NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
E: The repository 'http://httpredir.debian.org/debian sid 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.

Where do I get those needed keys and where do I put them?

Martin



Re: How to install Sid with non-free firmware for wifi?

2023-11-01 Thread Martin
On Wed, Nov 01, 2023 at 09:11:45AM -0500, David Wright wrote:
> On Wed 01 Nov 2023 at 14:42:17 (+0100), Martin wrote:
> > >From above outut i figure out my adapter is:
> > Bus 003 Device 002: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 
> > 802.11n
> 
> I would have thought you'd have firmware-ath9k-htc installed to
> run that device. You could download it from:
>   
> https://packages.debian.org/search?keywords=firmware&searchon=names&suite=sid§ion=all
> by means of your old installation if necessary.
> 
>   Package firmware-ath9k-htc
> sid (unstable) (misc): firmware for AR7010 and AR9271 USB wireless 
> adapters
> 1.4.0-108-gd856466+dfsg1-1.4: all


This driver is also included inside of cdrom immage I use to start installation.
So I do not understand why it does not initiaze my wifi USB automaticaly?

(Also I forgot to include that I have this driver installed on my current 
machine
in the first email I included list of firmares - only this one was missed -
perhaps because it is in misc/main group in aptitude and not in 
kernel/non-free-firmware)

Martin



Re: How to install Sid with non-free firmware for wifi?

2023-11-01 Thread Martin
On Wed, Nov 01, 2023 at 02:09:57PM +0100, Marco M. wrote:
> Am 01.11.2023 um 13:59:51 Uhr schrieb Martin:
> 
> Do you have USB NICs?
> Does your computer has an Ethernet NIC (wired)?
> 
> Then use them for installing the packages.

I have one computer with wifi connection to internet.
The problem is to let installer recognize this wifi adapter.

> > My wifi adapter is TP-LINK TL-WN722N
> 
> Relevant is the USB-ID/PCI-ID.
> Use lsusb/lspci -nnk to find it out.

$ lsusb
Bus 003 Device 002: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 04f3:0103 Elan Microelectronics Corp. ActiveJet K-2024 
Multimedia Keyboard
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

>From above outut i figure out my adapter is:
Bus 003 Device 002: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n

Martin



How to install Sid with non-free firmware for wifi?

2023-11-01 Thread Martin
Hello,
I am currently using Sid version of Debian - in /etc/apt/sources.list i have:
deb http://httpredir.debian.org/debian/ sid main contrib non-free 
non-free-firmware

non-free and non-free-firmware I have because of drivers I need for my machine
(most acute is wifi receiver, but i guess for sound and graphic too)

Now my hard drive is dieing and I bought a new HD. I want to install debian on
new HD to replace current one.

I tryed many approaches but what looks like more strightforward is using
installer from:
https://cdimage.debian.org/cdimage/daily-builds/sid_d-i/arch-latest/amd64/iso-cd/debian-testing-amd64-netinst.iso
This is net installer with all non-free firmware I guess. Ist size is 644M.

The problem is that my wifi receiver is not recognized by installer.

On my current computer it need some password to be supplied when
starting computer (it is done in /etc/network/interfaces
iface wlxe8de27a5ab1c inet dhcp
 wpa-ssid Thomson
 wpa-psk mypassword
)

When I use installer CD I do see that lights on this wifi adapter does
NOT blink at all (it stay off all the time).

How do I get installer to make to recognize my wifi adapter?

I have looked inside CD and it has all nonfree drivers I have installed
on my computer instalation:
firmware-linux-free
firmware-amd-graphics
firmware-atheros
firmware-misc-nonfree
firmware-realtek

My wifi adapter is TP-LINK TL-WN722N

Description of what happen when I start intaller CD:
I start installer in Expert mode (somewhere i read  it is needed to install Sid)
All goes fine until installer try to detect network. It does not recognize my
wifi adapter. It does some testing with ethernet adapter (enp3s0) then test
for wifi searching DHCP and finds nothing (during this search I noticed that
it does not use my wifi adapter - it does not blink at all).
Then it offers me to enter values manualy but it uses those values with 
ethernet adapter.
And I am stuck here: how do I recognize my wifi adapter?

Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-10-26 Thread Martin
On Thu, Oct 26, 2023 at 09:54:22AM +0700, Max Nikulin wrote:
> On 26/10/2023 02:20, Martin wrote:
> > On Wed, Oct 25, 2023 at 07:33:52PM +0700, Max Nikulin wrote:
> > > should have something like
> > > 
> > > table ip sharedconnection {
> > >chain postrouting {
> > >  type nat hook postrouting priority srcnat; policy accept;
> > >  ip saddr 192.168.231.3/24 ip daddr != 192.168.231.3/24 masquerade
> > >}
> > > }
> 
> "sharedconnection" is an arbitrary name. It should be chosen to not conflict
> with other applications. Actually you have nat masquerading rules created by
> docker for other interfaces. Read /usr/share/doc/nftables/README.Debian and
> choose a convenient for you way to add rules. You may add the following
> heading and may save rules to a file that may be read by either "nft -f
> FILE.conf" or just executing it.
> 
> #!/usr/sbin/nft -f
> table inet sharedconnection {}
> flush table inet sharedconnection
> # table ip shared connection { ... } from above

I did create FILE.conf and after executing it I can connect to internet from
my phone. THANK YOU!

Now where do I put this FILE.conf? I would like for it to run everytime
I turn on my computer. Is there some standard place for it - perhaps in
/etc directory? Maybe i should create some script in /etc/init.d/
directory?

Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-10-25 Thread Martin
On Wed, Oct 25, 2023 at 02:15:36PM +0200, Marco M. wrote:
> Am 25.10.2023 um 13:33:48 Uhr schrieb Martin:
> 
> > On Wed, Oct 25, 2023 at 08:47:03AM +0200, Marco M. wrote:
> > > 
> > > Why don't you use DHCP like your phone does?  
> > 
> > Because I used this computer before I had WiFi and phone.
> 
> Why it is a problem to change it?
> Do you really want to deal with manually addressing machines?

I only have one computer, and now this new router. Because I only have
one computer I did not feel need to use DHCP to automaticaly assing me
an IP address.

Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-10-25 Thread Martin
On Wed, Oct 25, 2023 at 07:33:52PM +0700, Max Nikulin wrote:
> On 25/10/2023 18:24, Martin wrote:
> > On Wed, Oct 25, 2023 at 03:17:09PM +0700, Max Nikulin wrote:
> > > 
> > > So packet forwarding should be enabled on the computer.
> 
> sysctl net.ipv4.ip_forward
> 
> almost certainly enabled since you have the docker0 network interface

You are right, it is enabled:

$ sudo sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

> I hope, you have a DNS server running on this machine
> 
> host debian.org 192.168.231.3

I did not had dig installed but host worked, alas it showed me that I do
not have installed DNS server. So I installed dnsmasq package and
wonders happened (without me editing any config files - just installing
dnsmasq) - on my mobile phone when I connected to 192.168.31.1 address
(default router address when I look from phone) It showed now green line
from router to internet.

But unfortunatelly phone does not connect to internet yet. I guess I will
need to issue some 'sudo route' command to add path from my router to
outside world (actually I do not have idea if this is the problem).

> Check that you do not have blocking rules in firewall

I do not use firewall anymore, since I stoped using wired home phone
(dialup modem) to connect to internet with ppp protocol. Since I am now
connected to internet via my weak antena which is connected to router(A)
and then to internet I know that distant router(A) is protected enough
(after all it uses only local address that i can see 192.168.0.1).

> and that masquerading
> is enabled for your downstream link enp3s0
> 
> nft list ruleset
> 
> should have something like
> 
> table ip sharedconnection {
>   chain postrouting {
> type nat hook postrouting priority srcnat; policy accept;
> ip saddr 192.168.231.3/24 ip daddr != 192.168.231.3/24 masquerade
>   }
> }

I did not add any masquerading rules by myself and output of command
'nft list ruleset' is showed below. It does not have anything like you
showed in section 'table ip sharedconnection'. I remember using iptables
command to make firewall and masquerading my computer while I was using
dialup modem internet connection. I do not set up use any iptable rules
manualy anymore.

So this is probably what I need to figure out how to use masquerading
and other firewall rules to enable my new router to connect to outside
internet. (I must admit that I forgot what rules should I use to enable
this setup - so I need your help)

Here is output of 'nft list ruleset' 'iptables -S' and 'iptables -L' command:
(I am not sure they provide different info, but here they are)

Thanks a lot
Martin


$ sudo nft list ruleset
# Warning: table ip nat is managed by iptables-nft, do not touch!
table ip nat {
chain DOCKER {
iifname "docker0" counter packets 0 bytes 0 return
iifname "br-7bfdce95ff27" counter packets 0 bytes 0 return
}

chain POSTROUTING {
type nat hook postrouting priority srcnat; policy accept;
oifname "wlxe8de27a5ab1c" ip saddr 10.1.1.0/24  counter packets 
192 bytes 11818 masquerade
oifname != "docker0" ip saddr 172.17.0.0/16 counter packets 0 
bytes 0 masquerade
oifname != "br-7bfdce95ff27" ip saddr 172.18.0.0/16 counter 
packets 0 bytes 0 masquerade
}

chain PREROUTING {
type nat hook prerouting priority dstnat; policy accept;
fib daddr type local counter packets 7727 bytes 479748 jump 
DOCKER
}

chain OUTPUT {
type nat hook output priority dstnat; policy accept;
ip daddr != 127.0.0.0/8 fib daddr type local counter packets 3 
bytes 196 jump DOCKER
}
}
# Warning: table ip filter is managed by iptables-nft, do not touch!
table ip filter {
chain DOCKER {
}

chain DOCKER-ISOLATION-STAGE-1 {
iifname "docker0" oifname != "docker0" counter packets 0 bytes 
0 jump DOCKER-ISOLATION-STAGE-2
iifname "br-7bfdce95ff27" oifname != "br-7bfdce95ff27" counter 
packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-2
counter packets 27 bytes 1780 return
}

chain DOCKER-ISOLATION-STAGE-2 {
oifname "docker0" counter packets 0 bytes 0 drop
oifname "br-7bfdce95ff27" counter packets 0 bytes 0 drop
counter packets 0 bytes 0 return
}

chain FORWARD {
type filter hook forward priority filter; policy drop;
 counter packets 57740 bytes 51358193 accept
counter packets 25 bytes 1644 jump DOCKER-USER
counter packets 25 bytes 1644 jump DOCKER

Re: How do I connect my new wifi router (Mi Router 4C)?

2023-10-25 Thread Martin
On Wed, Oct 25, 2023 at 08:47:03AM +0200, Marco M. wrote:
> 
> Why don't you use DHCP like your phone does?

Because I used this computer before I had WiFi and phone.

> Show 
> ip a

I posted output of that command to Max Nikulin email.

(Do not want to to post same info twice again as first email)

Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-10-25 Thread Martin
On Wed, Oct 25, 2023 at 03:17:09PM +0700, Max Nikulin wrote:
> On 25/10/2023 15:04, Anssi Saari wrote:
> > You have some kind of mysterious internet connection from something.
> > That needs to connect to the router's WAN port.
> 
> My guess is the following:
> 
> - Source of weak WiFi
> - WiFi booster
> - WiFi adapter in computer
> - ethernet port in computer
> - ethernet port of Mi router
> - WiFi provided by Mi router
> - WiFi adapter inside the phone
> 
> So packet forwarding should be enabled on the computer. However I suspect an
> issue with IP addresses. Martin, please, provide output of
> 
> ip address list

You are absolutely correct with your guess - although it take me
some time to understand what you are talking about - which is all my
fault.

here is result of 'ip address list' and also 'ip route' command:

$ ip address list
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
   valid_lft forever preferred_lft forever
2: enp3s0:  mtu 1500 qdisc fq_codel state UP 
group default qlen 1000
link/ether e0:d5:5e:73:c9:d3 brd ff:ff:ff:ff:ff:ff
inet 192.168.231.3/24 brd 192.168.231.255 scope global enp3s0
   valid_lft forever preferred_lft forever
inet6 fe80::e2d5:5eff:fe73:c9d3/64 scope link proto kernel_ll
   valid_lft forever preferred_lft forever
3: wlxe8de27a5ab1c:  mtu 1500 qdisc noqueue 
state UP group default qlen 1000
link/ether e8:de:27:a5:ab:1c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.16/24 brd 192.168.0.255 scope global dynamic wlxe8de27a5ab1c
   valid_lft 535000sec preferred_lft 535000sec
inet6 fe80::eade:27ff:fea5:ab1c/64 scope link proto kernel_ll
   valid_lft forever preferred_lft forever
4: docker0:  mtu 1500 qdisc noqueue state 
DOWN group default
link/ether 02:42:42:5b:a7:3b brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
   valid_lft forever preferred_lft forever
5: br-7bfdce95ff27:  mtu 1500 qdisc noqueue 
state DOWN group default
link/ether 02:42:52:ec:22:75 brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-7bfdce95ff27
   valid_lft forever preferred_lft forever
6: tun0:  mtu 1500 qdisc fq_codel 
state UNKNOWN group default qlen 500
link/none
inet 10.1.1.1/24 scope global tun0
   valid_lft forever preferred_lft forever
inet6 fe80::f84d:e9fc:4ea5:f7fa/64 scope link stable-privacy proto kernel_ll
   valid_lft forever preferred_lft forever

$ ip route
default via 192.168.0.1 dev wlxe8de27a5ab1c
10.1.1.0/24 dev tun0 proto kernel scope link src 10.1.1.1
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-7bfdce95ff27 proto kernel scope link src 172.18.0.1 
linkdown
192.168.0.0/24 dev wlxe8de27a5ab1c proto kernel scope link src 192.168.0.16
192.168.231.0/24 dev enp3s0 proto kernel scope link src 192.168.231.3



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-10-24 Thread Martin
On Wed, Oct 25, 2023 at 07:24:10AM +0200, Marco M. wrote:
> 
> Please specify the EXACT model names and the exact wiring of your
> devices.

There is no other name than 'Mi Router 4C' made by Xiaomi.
2 links that I provided are for exact model I have.
(here they are again:
https://www.mi.com/global/product/mi-router-4c/
https://manuals.plus/_mi/mi-router-4c-manual)


The wiring is as folow:
a) power cable goes from wall to the far right socket
   (when looking from front of modem)
b) ethernet cable is connected from my desktop to far left scoket of router.
   (there are also 2 middle ethernet cable sockets which i do not use
   my guess is they are for connecting other devices -like desktop- to
   subnetwork that wifi router uses which is 192.168.31.X - my phone is
   geting adress from this subnetwork when connected to wifi router)

> Please also tell us if you use NetworkManager or /etc/network for
> configuration.

I am using /etc/network and here is whole /etc/network/interfaces file:

auto lo
iface lo inet loopback

auto enp3s0
iface enp3s0 inet static
  address 192.168.231.3
  netmask 255.255.255.0

# auto wlxe8de27a5ab1c
iface wlxe8de27a5ab1c inet dhcp
 wpa-ssid Thomson
 wpa-psk mybigsecret

Martin



Re: How do I connect my new wifi router (Mi Router 4C)?

2023-10-24 Thread Martin
On Wed, Oct 25, 2023 at 06:52:09AM +0200, Geert Stappers wrote:
> On Wed, Oct 25, 2023 at 06:15:00AM +0200, Martin wrote:
> > I tried lot of setup and none worked.
> 
> And also missed https://lists.debian.org/debian-user/2023/10/msg00684.html
> and https://lists.debian.org/debian-user/2023/10/msg00685.html
> and https://lists.debian.org/debian-user/2023/10/msg00688.html
> and https://lists.debian.org/debian-user/2023/10/msg00690.html

Now I am very, very embarased.

When I first posted this message i got the error message back that it
cculd not be delivered. So I send more same message but did not receive
any response from mailing list. This is when I started looking at
browser on the link
https://lists.debian.org/debian-user/2023/10/threads.html but could not
find my message there (note that it shows only first page of 2 pages of
emails) I did not realize that this list have 2 pages, I always looked
only on the first page. And so I tried to use my different email
addresses that I had and post same message again few times. I also did
not receive any message back from mailing list that i send (some of
addresses were not subscribed to mailing list). Finaly I made a post
from this address and got the message back as posted in mailing list.
I guess it all boils down that I did not realized that 
https://lists.debian.org/debian-user/2023/10/threads.html page
have 2 pages, I was always looking at first page :(

Now I will hide under the rock and be ashamed.

But I really do need some advice about the problem I described in
(lot of the) messages I posted.

Martin



How do I connect my new wifi router (Mi Router 4C)?

2023-10-24 Thread Martin
Hello,

With wifi antena I receive a (rather weak) signal that connect my
computer to internet. I have to use windsurfer antena booster
(http://members.multiweb.nl/schaaijw/windsurfer_wifi_en.pdf)
to get usable signal. So my computer have internet signal from
wifi antena - yay great thing :)

Now I also want to connect to internet with my mobile phone!
So I got a wifi router (Mi Router 4C made by Xiaomi)
(web site https://www.mi.com/global/product/mi-router-4c/
documentation https://manuals.plus/_mi/mi-router-4c-manual)

As it turn out I am not so bright to make this whole setup working :(
I pluged in new router to power and connected ethernet cable from my
computer to router WAN connection. (I belive this is how it should be
connected togheder)

>From now I had some partial successes and whole lot of problems.
I will describe what I tried later, but I would like to ask you now
How do I proceed from now on to set up router?


I tried lot of setup and none worked. Here I will describe one that
i hope should work - but does not :(

While I was seting up router as described in
https://manuals.plus/_mi/mi-router-4c-manual
in Step 2 (point 3) it said I do not have internet.
So I choose to manualy set up 'Static address' for
router as folows (my computer has IP address 192.168.231.3):

 IP address: 192.168.231.5
Subnet mask: 255.255.255.0
Default gateway: 192.168.231.3
DNS: 192.168.231.3

After all this setup I could issue those commands on my desktop:

(this is my desktop IP address - just to show it works)
boza@redmoon:~/work
$ ping 192.168.231.3
PING 192.168.231.3 (192.168.231.3) 56(84) bytes of data.
64 bytes from 192.168.231.3: icmp_seq=1 ttl=64 time=0.074 ms
64 bytes from 192.168.231.3: icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=3 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=4 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=5 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=6 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=7 ttl=64 time=0.058 ms
^C
 --- 192.168.231.3 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6123ms
rtt min/avg/max/mdev = 0.048/0.057/0.074/0.008 ms

(this is new router IP address)
boza@redmoon:~/work
$ ping 192.168.231.5
PING 192.168.231.5 (192.168.231.5) 56(84) bytes of data.
64 bytes from 192.168.231.5: icmp_seq=1 ttl=64 time=0.445 ms
64 bytes from 192.168.231.5: icmp_seq=2 ttl=64 time=0.381 ms
64 bytes from 192.168.231.5: icmp_seq=3 ttl=64 time=0.384 ms
64 bytes from 192.168.231.5: icmp_seq=4 ttl=64 time=0.360 ms
64 bytes from 192.168.231.5: icmp_seq=5 ttl=64 time=0.376 ms
64 bytes from 192.168.231.5: icmp_seq=6 ttl=64 time=0.403 ms
^C
 --- 192.168.231.5 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5107ms
rtt min/avg/max/mdev = 0.360/0.391/0.445/0.027 ms


So ping work as expected but when i look on my mobile phone and
connect wirelesly to router and on phone I look with browser at
address 192.168.31.1 (this is addres router is using when i look
from phone) it show me that I can connet from mobile phone to router
(with green line on the picture it shows) but I can not connect
to internet (it shows red line from router to internet)

I hope someone will be able to give me some hint how to solve
this issue and be able to connect to internet from router - and
connected phone.

Martin



How do I connect my new wifi router (Mi Router 4C)?

2023-10-24 Thread Martin
Hello,

With wifi antena I receive a (rather weak) signal that connect my
computer to internet. I have to use windsurfer antena booster
(http://members.multiweb.nl/schaaijw/windsurfer_wifi_en.pdf)
to get usable signal. So my computer have internet signal from
wifi antena - yay great thing :)

Now I also want to connect to internet with my mobile phone!
So I got a wifi router (Mi Router 4C made by Xiaomi)
(web site https://www.mi.com/global/product/mi-router-4c/
documentation https://manuals.plus/_mi/mi-router-4c-manual)

As it turn out I am not so bright to make this whole setup working :(
I pluged in new router to power and connected ethernet cable from my
computer to router WAN connection. (I belive this is how it should be
connected togheder)

>From now I had some partial successes and whole lot of problems.
I will describe what I tried later, but I would like to ask you now
How do I proceed from now on to set up router?


I tried lot of setup and none worked. Here I will describe one that
i hope should work - but does not :(

While I was seting up router as described in
https://manuals.plus/_mi/mi-router-4c-manual
in Step 2 (point 3) it said I do not have internet.
So I choose to manualy set up 'Static address' for
router as folows (my computer has IP address 192.168.231.3):

 IP address: 192.168.231.5
Subnet mask: 255.255.255.0
Default gateway: 192.168.231.3
DNS: 192.168.231.3

After all this setup I could issue those commands on my desktop:

(this is my desktop IP address - just to show it works)
boza@redmoon:~/work
$ ping 192.168.231.3
PING 192.168.231.3 (192.168.231.3) 56(84) bytes of data.
64 bytes from 192.168.231.3: icmp_seq=1 ttl=64 time=0.074 ms
64 bytes from 192.168.231.3: icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=3 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=4 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=5 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=6 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=7 ttl=64 time=0.058 ms
^C
--- 192.168.231.3 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6123ms
rtt min/avg/max/mdev = 0.048/0.057/0.074/0.008 ms

(this is new router IP address)
boza@redmoon:~/work
$ ping 192.168.231.5
PING 192.168.231.5 (192.168.231.5) 56(84) bytes of data.
64 bytes from 192.168.231.5: icmp_seq=1 ttl=64 time=0.445 ms
64 bytes from 192.168.231.5: icmp_seq=2 ttl=64 time=0.381 ms
64 bytes from 192.168.231.5: icmp_seq=3 ttl=64 time=0.384 ms
64 bytes from 192.168.231.5: icmp_seq=4 ttl=64 time=0.360 ms
64 bytes from 192.168.231.5: icmp_seq=5 ttl=64 time=0.376 ms
64 bytes from 192.168.231.5: icmp_seq=6 ttl=64 time=0.403 ms
^C
--- 192.168.231.5 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5107ms
rtt min/avg/max/mdev = 0.360/0.391/0.445/0.027 ms


So ping work as expected but when i look on my mobile phone and
connect wirelesly to router and on phone I look with browser at
address 192.168.31.1 (this is addres router is using when i look
from phone) it show me that I can connet from mobile phone to router
(with green line on the picture it shows) but I can not connect
to internet (it shows red line from router to internet)

I hope someone will be able to give me some hint how to solve
this issue and be able to connect to internet from router - and
connected phone.

Martin



How do I connect my new wifi router (Mi Router 4C)?

2023-10-24 Thread Martin
Hello,

With wifi antena I receive a (rather weak) signal that connect my
computer to internet. I have to use windsurfer antena booster
(http://members.multiweb.nl/schaaijw/windsurfer_wifi_en.pdf)
to get usable signal. So my computer have internet signal from
wifi antena - yay great thing :)

Now I also want to connect to internet with my mobile phone!
So I got a wifi router (Mi Router 4C made by Xiaomi)
(web site https://www.mi.com/global/product/mi-router-4c/
documentation https://manuals.plus/_mi/mi-router-4c-manual)

As it turn out I am not so bright to make this whole setup working :(
I pluged in new router to power and connected ethernet cable from my
computer to router WAN connection. (I belive this is how it should be
connected togheder)

>From now I had some partial successes and whole lot of problems.
I will describe what I tried later, but I would like to ask you now
How do I proceed from now on to set up router?


I tried lot of setup and none worked. Here I will describe one that
i hope should work - but does not :(

While I was seting up router as described in
https://manuals.plus/_mi/mi-router-4c-manual
in Step 2 (point 3) it said I do not have internet.
So I choose to manualy set up 'Static address' for
router as folows (my computer has IP address 192.168.231.3):

 IP address: 192.168.231.5
Subnet mask: 255.255.255.0
Default gateway: 192.168.231.3
DNS: 192.168.231.3

After all this setup I could issue those commands on my desktop:

(this is my desktop IP address - just to show it works)
boza@redmoon:~/work
$ ping 192.168.231.3
PING 192.168.231.3 (192.168.231.3) 56(84) bytes of data.
64 bytes from 192.168.231.3: icmp_seq=1 ttl=64 time=0.074 ms
64 bytes from 192.168.231.3: icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=3 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=4 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=5 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=6 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=7 ttl=64 time=0.058 ms
^C
--- 192.168.231.3 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6123ms
rtt min/avg/max/mdev = 0.048/0.057/0.074/0.008 ms

(this is new router IP address)
boza@redmoon:~/work
$ ping 192.168.231.5
PING 192.168.231.5 (192.168.231.5) 56(84) bytes of data.
64 bytes from 192.168.231.5: icmp_seq=1 ttl=64 time=0.445 ms
64 bytes from 192.168.231.5: icmp_seq=2 ttl=64 time=0.381 ms
64 bytes from 192.168.231.5: icmp_seq=3 ttl=64 time=0.384 ms
64 bytes from 192.168.231.5: icmp_seq=4 ttl=64 time=0.360 ms
64 bytes from 192.168.231.5: icmp_seq=5 ttl=64 time=0.376 ms
64 bytes from 192.168.231.5: icmp_seq=6 ttl=64 time=0.403 ms
^C
--- 192.168.231.5 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5107ms
rtt min/avg/max/mdev = 0.360/0.391/0.445/0.027 ms


So ping work as expected but when i look on my mobile phone and
connect wirelesly to router and on phone I look with browser at
address 192.168.31.1 (this is addres router is using when i look
from phone) it show me that I can connet from mobile phone to router
(with green line on the picture it shows) but I can not connect
to internet (it shows red line from router to internet)

I hope someone will be able to give me some hint how to solve
this issue and be able to connect to internet from router - and
connected phone.

Martin



How do I connect my new wifi router (Mi Router 4C)?

2023-10-24 Thread Martin
Hello,

With wifi antena I receive a (rather weak) signal that connect my
computer to internet. I have to use windsurfer antena booster
(http://members.multiweb.nl/schaaijw/windsurfer_wifi_en.pdf)
to get usable signal. So my computer have internet signal from
wifi antena - yay great thing :)

Now I also want to connect to internet with my mobile phone!
So I got a wifi router (Mi Router 4C made by Xiaomi)
(web site https://www.mi.com/global/product/mi-router-4c/
documentation https://manuals.plus/_mi/mi-router-4c-manual)

As it turn out I am not so bright to make this whole setup working :(
I pluged in new router to power and connected ethernet cable from my
computer to router WAN connection. (I belive this is how it should be
connected togheder)

>From now I had some partial successes and whole lot of problems.
I will describe what I tried later, but I would like to ask you now
How do I proceed from now on to set up router?


I tried lot of setup and none worked. Here I will describe one that
i hope should work - but does not :(

While I was seting up router as described in
https://manuals.plus/_mi/mi-router-4c-manual
in Step 2 (point 3) it said I do not have internet.
So I choose to manualy set up 'Static address' for
router as folows (my computer has IP address 192.168.231.3):

 IP address: 192.168.231.5
Subnet mask: 255.255.255.0
Default gateway: 192.168.231.3
DNS: 192.168.231.3

After all this setup I could issue those commands on my desktop:

(this is my desktop IP address - just to show it works)
boza@redmoon:~/work
$ ping 192.168.231.3
PING 192.168.231.3 (192.168.231.3) 56(84) bytes of data.
64 bytes from 192.168.231.3: icmp_seq=1 ttl=64 time=0.074 ms
64 bytes from 192.168.231.3: icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=3 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=4 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=5 ttl=64 time=0.058 ms
64 bytes from 192.168.231.3: icmp_seq=6 ttl=64 time=0.048 ms
64 bytes from 192.168.231.3: icmp_seq=7 ttl=64 time=0.058 ms
^C
--- 192.168.231.3 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6123ms
rtt min/avg/max/mdev = 0.048/0.057/0.074/0.008 ms

(this is new router IP address)
boza@redmoon:~/work
$ ping 192.168.231.5
PING 192.168.231.5 (192.168.231.5) 56(84) bytes of data.
64 bytes from 192.168.231.5: icmp_seq=1 ttl=64 time=0.445 ms
64 bytes from 192.168.231.5: icmp_seq=2 ttl=64 time=0.381 ms
64 bytes from 192.168.231.5: icmp_seq=3 ttl=64 time=0.384 ms
64 bytes from 192.168.231.5: icmp_seq=4 ttl=64 time=0.360 ms
64 bytes from 192.168.231.5: icmp_seq=5 ttl=64 time=0.376 ms
64 bytes from 192.168.231.5: icmp_seq=6 ttl=64 time=0.403 ms
^C
--- 192.168.231.5 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5107ms
rtt min/avg/max/mdev = 0.360/0.391/0.445/0.027 ms


So ping work as expected but when i look on my mobile phone and
connect wirelesly to router and on phone I look with browser at
address 192.168.31.1 (this is addres router is using when i look
from phone) it show me that I can connet from mobile phone to router
(with green line on the picture it shows) but I can not connect
to internet (it shows red line from router to internet)

I hope someone will be able to give me some hint how to solve
this issue and be able to connect to internet from router - and
connected phone.

Martin



Re: Happy 30 Years Debian Project

2023-08-17 Thread Martin Petersen

happy birthday Debian !

and thanks to all you contributors and nice people in this community.

i chose debian as a noob after my first experiments w. suse around 
'98/'99 and never looked back.  best os on the planet and simply my 
digital home.


a cheerful toast to this wonderful creation. the whole is indeed greater 
than the sum of it parts.


rip ian <3

On 2023-08-16  13:31, Luna Jernberg wrote:

Happy Birthday 30 years of the Debian Linux Project

https://www.gamingonlinux.com/2023/08/happy-debian-day-going-30-years-strong/
https://wiki.debian.org/DebianDay/2023
https://wiki.debian.org/DebianHistory?action=AttachFile&do=get&target=Debian-announcement-1993-pic-by-Ian_Murdock.png






Xorg.0.log inflating possibly due to 'client bug: Invalid path /dev/input/eventxx'

2023-08-08 Thread Martin Gagnon
Hello,

I have set up 40 identical systems with Debian 12.0: same SBC, same OS
version, same preseed file. These systems use a touchscreen monitor with an
eGalax USB controller. eGalax driver was installed on all of the 40 systems
and everything works fine except for 2 systems that are connected to an Elo
USB touchscreen monitor. These 2 systems log continuously in Xorg.0.log
filling up the hard drive at a rate of ~1MB/min. Please see attached file
for an excerpt of the content dumped into Xorg.0.log.

Can anyone help me understand what's happening and how to fix/prevent this?

Do not hesitate to request additional information if that can help.
Kindly let me know if this should be posted on some other list.

Thank you,
Martin


system-09.Xorg.0.log
Description: Binary data


Re: Xfce destop environment

2023-01-30 Thread Martin Petersen

Hi William,

xfce configuration files relevant to your user session are stored in 
your home dir.


you can more or less just delete / move the config files and they should 
get recreated upon logging in to a xfce session.


I searched on google for "reset xfce configuration" and found many posts 
like this:


https://forums.linuxmint.com/viewtopic.php?t=122332

"Open a terminal, back up your current configuration:

Code: Select all

mv ~/.config/xfce4  ~/.config/xfce4.bak

Then either leave it like that, which will reset to a default Xfce 
desktop (no Linux Mint customizations), or copy the skeleton files with 
the following command, which will reset to a default Linux Mint Xfce 
desktop:


Code: Select all

cp -r /etc/xdg/xfce4 ~/.config

Then log out and log in again to effectuate the new configuration."

I believe you good get results in such a way.

It also might be just smth small which is broken.

Could you describe "broken" some more? A panel might be hidden but u can 
access all xfce configuration panels by right clicking on the empty 
desktop open a menu, than applications follwed by settings.


Also take a look at the xfce project documentation, it's quite large 
with many screenshots to demonstrate the principles of xfce


https://docs.xfce.org/xfce/getting-started#the_desktop_environment

Nearly everything is just a right click from configuration separated.

You could also create a new user account with xfce configured as default 
session and copy your files over :)


Good luck :)

Cheers,

Martin

On 2023-01-30  19:57, William Torrez Corea wrote:

On Mon, Jan 30, 2023 at 12:43 AM David  wrote:


On Mon, 2023-01-30 at 00:07 -0600, William Torrez Corea wrote:

What happened with my desktop environment?

My desktop environment has problems, the title bar is hidden.


Well, William, from your extensive description of the situation, you
may well have enabled full-screen or have a resolution problem.
It could be anything.
When did this first start happening?
Is there any possible causative action you might have taken which
initiated this behaviour?
Cheers!




The problem started 1 month ago. I don't know what caused the problem, a
day logged in on my laptop and the desktop environment is ruined.

I decided to change my desktop environment for gnome but I want to recover
my old desktop environment XFCE.

*What command is needed to show the error?*

In this way I can supply more information about the problem.

P.D: I search some help in https://wiki.debian.org/Xfce but the problem
still exist





Re: freezing / unstable Debian Testing on MSI Stealth GS77 laptop

2023-01-29 Thread Martin Petersen

Hi JD,

sorry to hear that you have these kind of troubles. I dont know much 
about this gpu/igpu setups, but I want to give some proceedings I would 
choose:


You write that there dont seem to be any logs.

Where did You look? I would expect, that there might me /var/log/syslog 
messages concerning kernel panics or maybe SystemD journal entries from 
that last boot (journalctl -b 1 or smth).


What kind of logs did You check or are some logs Your google searches 
might have produced not there or empty? They might have to bee enabled.


Also there might be error messages of the xserver /var/log/Xorg.0.log.

On top I would take a look into the messages of my Xsession itself 
(~.xsession-errors)	


Many places to check, I'm afraid to say :)

If You have another system You could ssh into Your crash prone laptop to 
get messages live.


Posting some details about the versions of the nvidia modules and such 
might be useful. Some other readers might be able to compare such strings.


And which CPU version does Your notebook have? (cat /proc/cpuinfo, 
maybe). If this is a CPU in a combo setup "some big/beefy cores and some 
lightweight/lowpower cores" it have implications w. applications in my 
opinion.


And one thing I would like to recommend: try another, maybe more recent 
system. Boot from a ubuntu or fedora or some outher fresh distributions 
live iso and check / compare modules and configuration parameters and - 
if possible - behaviour of the particular applications.


Good luck and please post log contents or snippes of logs, if You find some.

Cheers,

Martin


On 2023-01-25  09:56, JD wrote:

Hello,

I'm trying to find some help in order to debug or resolve the issues I'm 
facing. Hopefully, someone will be able to help me here.


The main problem that prevents me from trying to solve it myself is the 
absence of logs and messages.



So, my laptop MSI Stealth GS77 with a Debian testing (up to date) 
installed on it can freeze when launching 3D programs (both with setting 
the nVidia card or the integrated Intel chipset). Once it also 
complained about missing SSD drive (nvme). I currently don't know if 
both could be related, but I'd say it's unlikely.



Some information about my system:

I installed Debian testing since latest Debian stable had many issues 
(no audio, not wifi, unstable 3D graphics...). Debian stable with 
backports didn't helped much (it fixed some issues but not all). 
Therefore, the most practicable is Debian testing.



The issue I have is that seldom (but quite often), when running a 3D 
program, the OS is completely freezing. There is no way to retrieve any 
logs or information about the issue. The screen freezes, the keyboard 
doesn't respond. The only thing I can do is to use a long press on the 
power button to switch the laptop off (alt sys o doesn't work either). 
And on the next reboot, my filesystem fixes wrong inodes and therefore 
this is not possible to consultate any logs.



I don't really like to say that, but the laptop works well on Windows 11 
(no freeze, no crash, no nvme issues). Thus my belief that the issue is 
on the Linux side.



More information:

Desktop: XFCE

nvidia: latest proprietary modules available on Debian. Also tested with 
modules directly provided by nVidia.


3D programs run on nVidia or the Intel chipset (with setting 
appropriately __NV_PRIME_RENDER_OFFLOAD and __GLX_VENDOR_LIBRARY_NAME).


I played a lot with bumblebee, update-glx, keeping updating packages, 
but nothing worked at this time.



uname -a
Linux wormhole 6.1.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 
(2023-01-07) x86_64 GNU/Linux



lspci
00:00.0 Host bridge: Intel Corporation 12th Gen Core Processor Host 
Bridge/DRAM Registers (rev 02)
00:01.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI 
Express x16 Controller #1 (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P 
Integrated Graphics Controller (rev 0c)
00:04.0 Signal processing controller: Intel Corporation Alder Lake 
Innovation Platform Framework Processor Participant (rev 02)
00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI 
Express x4 Controller #0 (rev 02)
00:07.0 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI 
Express Root Port #1 (rev 02)
00:08.0 System peripheral: Intel Corporation 12th Gen Core Processor 
Gaussian & Neural Accelerator (rev 02)
00:0d.0 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 USB 
Controller (rev 02)
00:0d.2 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI 
#0 (rev 02)
00:0d.3 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI 
#1 (rev 02)
00:12.0 Serial controller: Intel Corporation Alder Lake-P Integrated 
Sensor Hub (rev 01)
00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI 
Host Controller (rev 01)

00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01)
00:14.3 

Re: An AMD graphics bug is coming to unstable/testing repo

2023-01-15 Thread Martin Petersen

Hi David, hi All :)

thank You very much for this informative mail, David. It is very kind of 
You to think about all AMD Debian users. Much appreciated !


I don't have to add much. The issue at Freedesktop.org is:

https://gitlab.freedesktop.org/drm/amd/-/issues/2171

There is a fix but everybody is unsure when it will find it's way into 
mainline.


Thank You again, David & have a nice day, Y'all,

Martin

On 2023-01-15  12:04, David wrote:

Hi list readers

A FYI: I am far from expert in these things but I noticed that a kernel
with a known bug affecting AMD graphics is about to enter the unstable
distribution [1], and possibly the testing distribution as well.

[1]:"""
I would like to upload linux version 6.1.6-1 to unstable.
[...]
Notably though there is no fix for #1028451
"""

So I quote below from that bug report [2][3] for readers here so that you
can decide if you want to go read it.

My words end here, the rest of this message is quotes from the footnotes
given at the bottom.

[2]: """
Basically this issue breaks all usage of Displayport MST on amdgpu systems.
Which roughly translates to breaking external monitors for everyone using
an USB-C docks with multiple display outputs (which is pretty common these
days) on AMD laptops. As  well as those like myself who daisy-chain display
port monitors with an amdgpu using graphics card.

So I would expect this impacts a lot of people :/ Which is also why there
is loads of activity and duplicates on the fd.o bug now that 6.1 is
trickling into distributions.

For what it's worth; The revert as currently suggested also reverts big
chunks for Intel and nvidia based GPUs, which unsurprisingly the
maintainers of those aren't too thrilled about. And really i'd be amazed if
it doesn't cause regressions for those systems... Unless the AMD folks pull
a small/targetted fix out their hats, this is likely going to take weeks if
not months before it's resolved in a way that's acceptable for 6.1.y :/
"""

[3]: """
The revert may cause much wider issues which upstream may or may not care
(much) about. And it would be a divergence from upstream.

Getting wider testing of the 6.1 kernel is something I find much more
important. There could be other issues lurking which would not get exposure
and therefor wouldn't get fixed until this bug would be fixed.

Uploading 6.1.6 now would give (us/)upstream a couple of more days to
figure out a potential *better* way to deal with it. One which should be
acceptable for the upstream Stable Kernel maintainers.

But I wouldn't let this bug cause further delays to Testing.  Testing is
meant to test things for the next Stable release and things can and will
break from time to time.  If people can't deal with that, they should not
be running Testing.
"""

[1] https://lists.debian.org/debian-kernel/2023/01/msg00169.html
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028451#35
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028451#40






Re: Unable to create output file

2022-12-19 Thread Martin Smith

On 19/12/2022 19:45, to...@tuxteam.de wrote:

On Mon, Dec 19, 2022 at 12:44:56PM -0600, William Torrez Corea wrote:

On Sun, Dec 18, 2022 at 11:09 PM  wrote:

[...]


Go into your DOS box. Do you see a diretory C:\TC20? If you don't, your
Turbo C won't be able either. Try to make it.

Cheers
--
t


I have this configuration in my DOSBOX.

Sorry, I don't understand. Do you have that directory? Can you create a
file there "by hand"?

Cheers


he seems to have the directory, does he have enough space to create the file

--
Martin



Re: multiple messages

2022-12-12 Thread Martin Smith

On 12/12/2022 03:24, David Wright wrote:

On Sun 11 Dec 2022 at 17:52:56 (+), Martin Smith wrote:

I am getting multiple messages, all with the same time and date, has
my thunderbird gone belly up or is anyone else seeing it

this one I have about 50: Re: e-mail with line in body beginning with "From"

and this one:  10/12/2022, 14:49
Re: Monitor traffic on a port

The specific email that you mentioned is at
https://lists.debian.org/debian-user/2022/12/msg00262.html
and shouldn't cause any trouble. But it does quote a couple
of header fields from an earlier post, and that may be a clue
to your underlying problem, but not to its immediate cause.

I suggest you read the thread (about a dozen posts) starting at
https://lists.debian.org/debian-user/2022/12/msg00250.html
and particularly messages #252 and #269. These discuss
a /possible/ cause of your reported symptoms—you've quoted
the topic of the thread at the top of your post.

You need to determine whether "getting multiple messages"
means that you are seeing multiple displays of the same
message, or the display of local duplicates of one or two
messages, or actual newly arriving copies of these same
messages. Knowing which of these is occurring will help
trace the source.

I think it's an unlikely coincidence that these messages
(particularly if the duplicates are all in the set 252/262/269)
would just happen to be the ones causing a random Tbird
duplication bug to trigger. The problem could lie further
up the chain of processes that deliver the emails.

BTW are you running any filters, like procmail etc?

Cheers,
David.


well thanks for all the suggestions, I am just using thunderbird and 
having discussed it with my mail provider I changed the account from pop 
to imap and now its looking fine, it seems to have been a random 
thunderbird bug, it seems to have been a random thunderbird bug


--

Martin




multiple messages

2022-12-11 Thread Martin Smith
I am getting multiple messages, all with the same time and date, has my 
thunderbird gone belly up or is anyone else seeing it


this one I have about 50: Re: e-mail with line in body beginning with "From"

and this one:  10/12/2022, 14:49
Re: Monitor traffic on a port


--
Martin



Re: MacOS VM on Debian: is it reasonably possible?

2022-11-22 Thread Martin Smith

On 22/11/2022 13:44, hede wrote:



Whilst I had mistakenly believed that CentOS was a freeware, open source
kind of MacOS clone,


CentOS was derived from Red Hat Enterprise Linux and was mostly 
compatible to RHEL.

"May God rest its soul."


and found that it is not, when I searched for it, I
had understood that a freeware, open source kind of MacOS kind of clone,
is available, and, when I searched on  the three word combination - open
source macos - I found, in the results, the above URL.

So, as an observer, I wonder whether licencing restrictions apply, to
running MacOS on Linux, as a virtual machine.


If you click through the links on that page, it looks like Apple is
just linking to the source code for open source components used in
their operating systems (things like awk, bash, bind, bzip, etc.), but
the operating systems themselves are certainly not open source, and
cannot be legally used except in accordance with Apple's license terms
and / or applicable law.


Darwin is the core of modern Apple OSes. It is Open Source and POSIX 
compatible.

https://en.wikipedia.org/wiki/Darwin_(operating_system)

But there are plenty of Closed Source parts missing to form either macOS 
or iOS from it. Both - macOS and iOS - are proprietary OSes where you 
have strict license terms to fulfill to use it. One of them is  - AFAIK 
- buying Apple Hardware and running the OS only on Apples Hardware.


MacOSX was originally based on FREEBSD which at the time probably about 
15 years ago I was using BSD for servers in offices and I remember one 
of the senior developers in BSD land went to work for Apple, I can 
remember my delight when I discovered I could summon vi in a terminal on 
a mac


--
Martin



Re: ssh -X authentication with sudo

2022-10-05 Thread martin f krafft

I really didn't mean to kick this off ;)

Original poster: instead of the GUI programm, I recommend you try 
cfdisk. It's not "graphical", but it has a nice UI, and it can do 
everything you need. `sudo cfdisk /dev/device` and you're going to 
be much happier.


--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
"the question of whether computers can think

 is like the question of whether submarines can swim."
   -- edsgar w. dijkstra


Re: ssh -X authentication with sudo

2022-10-04 Thread martin f krafft

Regarding the following, written by "debian-u...@howorth.org.uk" on 2022-10-04 
at 13:52 Uhr +0100:

PS as you surmised, I don't really want root ssh access.


But you are running GUIs as root??

--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
may the bluebird of happiness twiddle your bits.


Re: HTTP Proxy

2022-04-28 Thread Larry Martin
Yes.  I used 192.168.1.45.  I have about given up on the approach and will 
probably go to the multiple CD version of the install.

Thanks to all.

> On Apr 28, 2022, at 12:30 AM, Tim Woodall  wrote:
> 
> On Wed, 27 Apr 2022, Larry Martin wrote:
> 
>> I am using my home router IP address 192.168.1.0 device number 45.
> 
> This doesn't make sense.
> 
> Are you sure it's not one of:
> 192.168.1.1
> 192.168.1.254
> 192.168.1.45
> 
> (if it's the latter then you do not want to use the same address on the
> machine you're installing.)
> 



Re: HTTP Proxy

2022-04-27 Thread Larry Martin
Dan,

Thank you.  That makes perfect sense.

> On Apr 27, 2022, at 2:02 PM, Dan Ritter  wrote:
> 
> Larry Martin wrote: 
>> Dan,
>> 
>> Thank you for the prompt reply.  I am still having problems.  I enter my IP 
>> address as 192.168.1.45 and all appears to go ok.
>> When it gets to the point of connecting to a mirror site it fails.  I have 
>> left the proxy blank.  Any suggestions?
> 
> 
> Hi, Larry.
> 
> The etiquette on open source user mailing lists is to always
> reply to the list, optionally copying the respondent. This is
> for several reasons:
> 
> - many people will see your reply and be able to help, not just
>  one
> 
> - many people in the future will see the archive and thus be
>  helped in turn
> 
> - it doesn't presume that the person who answered your question
>  is going to take responsibility for solving your whole
>  problem. We're not paid, we're your fellow users.
> 
> 
> -dsr-



HTTP Proxy

2022-04-27 Thread Larry Martin
I am installing Debian 11 from a single CD.  My plan was to complete the 
install via the internet.  
I am using my home router IP address 192.168.1.0 device number 45.  
However I have no idea about what to specify as an HTTP proxy.  
I have tried a couple of options but when Debian tries to connect it fails.
Communications is my weak point, so basic advice would be appreciated.

Larry


Resize2fs Questions

2022-01-31 Thread Martin McCormick
I figured I would start a new topic as none of this pertains to
the previous messages I posted.

I've got an almost 30-GB disk image of a working debian
installation for a Raspberry pi that I should be able to easily
squeeze on to a roughly 8 GB SSD card because it only takes up
10% of the 30-GB card and I think I am close but not there yet.
Because I hate drudgery with regards to syntax, I wrote a little
shell script that makes it easier to duplicate the same actions
and also makes it easy to show exactly what is happening so far.
The big image name is

rpi1_good.img

and it is 29 gb in size.  Here are the commands that work so far.

#!/bin/sh
#This resets everything for a new run.
  sudo losetup -d /dev/loop0
#copy a backup to the image name to start fresh.
sudo cp -p rpi1_good.img.bak rpi1_good.img
#This takes about half an hour.  Now, get to business.
sudo losetup -P /dev/loop0 rpi1_good.img
#This should show 2 partitions on loop0 when successful.
sudo ls -l /dev/loop0*
#You get /dev/loop0p1 and p2
#e2fs is required to run before one can resize.
   sudo e2fsck -f /dev/loop0p2
#I should be telling resize2fs to squeeze everything in to a 7GB
#partition.
   sudo resize2fs /dev/loop0p2 +7G

There are no complaints up to this point and resize
appeared to work so now it is time to reduce the size of
partition 2.

This may be where things go off the track.

I run

sudo fdisk /dev/loop0

and fdisk tells me it is 29.9 GB which I expected since Partition
#2 should be mostly empty but for the OS and my login directory.

I note that the starting sector for P2 is 137215 since
one must start at that sector and then I delete P2 and then add a
new partition which defaults to 2.

fdisk prompts for the first sector with a default of 2048 but I
type in 137215.  The last sector is in the 62-million range and I
want only 7 GB as the size so I type +7G and it takes that.

I then type w to save the changes and there is no
complaint.

The first hint of trouble is when you do fdisk -l
/dev/loop0.  The size count is still almost 30 GB but then a ray
of Sun in that P2 has a size of around 7 GB.

I outwitted Murphy this time by using another file on my
computer as the target rather than the SSD card so that if it
went over 8 GB, nothing annoying would happen.

I watched on another console as the size climbed past 5
GB, then 6 and 7 GB and then it was up past ten so it was going
to do the whole 30 GB if I hadn't stopped it.

I am not sure what I missed but the manual page for
resize2fs warns you to use something like fdisk to trim off the
excess empty space which is what I thought I did.  I would also
have thought that the disk image file should have deflated like a
punctured air mattress but it didn't.

I think I am almost there but obviously not yet.

Thanks in advance for ideas.

Martin



Re: SD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-29 Thread Martin McCormick
There's always one more question that nobody mentions and none of
the articles one finds on the topic don't touch.  When looking at
the man page for resize2fs in debian, it talks about the -b
option to turn on "the 64 bit feature."
__

   When shrinking the size of the partition, make  sure
   you do not make it smaller than the new size of the ext2 filesystem!

   The  -b  and  -s  options enable and disable the 64bit feature, respect-
   tively.  The resize2fs program will, of course, take care  of  resizing
   the  block  group  descriptors  and moving other data blocks out of the
   way, as needed.  It is not possible to resize the filesystem concurrent
   with changing the 64bit status.
__

Do I need this since the Pi runs an ARM processor which
would make the command

   #sudo resize2fs -b /dev/loop0p2 6.3g

or is it the same command without the -b flag?

I have determined that the 28.9 gb SSD card is 10% full
with the debian installation and the files I want in my login
directory.  I found a 7.3 gb SSD card that has probably never
been used that came with the first Raspberry Pi I bought around
2012 or so, going for a 32-gb card instead.  If I shrink the
Linux partition to 6.3 gb which is what the small card had
available, I should have it about 40 or 50% full.  I can then
safely dd it on to a larger card any time I want to do so and
then use resize2fs to expand the Linux partition after it is
installed.

What I did so far was to mount the 27-gb partition on
/mnt through /dev/loop0 and edit /mnt/etc/hostname to reflect the
host name for the system being rebuilt.  The edit changes the
image which is really neat.  All that is left is to shrink it
down to 6.3 gb and it should be ready to dd on to the 7.3 gb card
which should be bootable on it's own but which I will use to seed
a new 28-gb system that can be customized after it is running.

Many of the raspbian distributions have a #1 partition
that is a small fat32 lba partition for Windows users to be able
to activate debian from Windows.  Is this even necessary once one
is using unix tools on the disk?

Thanks to all the good advice from everyone.  I am seeing
the end of this project and have learned some new  useful tricks
that are good to know.

Martin



Re: SD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-28 Thread Martin McCormick
My thanks to everybody who has responded here.  I think the
prudent thing to do is use a new SSD card and I have one that is
supposed to be a full 32 gb.  The card I was able to finally
clear the partitions on is several years old but I think it is
still good but the suggestion to use it in a less mission
critical application is a good idea plus it is not a full 32 gb.

I have a radio receiver that can store information on one
of these cards and I'll use it for that since if there turns out
to be a bad cell somewhere, the world won't end like it can if
one's kernel or sector information becomes corrupted if it
happens to land in a vital piece of code.

Again, many thanks.

Martin McCormick



Re: SSD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-28 Thread Martin McCormick
David Wright  writes:
> I've not heard of that problem. You were prevented from zeroing the
> entire device, which would have wiped the partition table anyway.
> 
> What I would want to check is that the OS isn't doing something
> stupid, like trying to automount it, failing, and consequently
> setting the device readonly. By OS, I really mean DEs, or
> automounters in general.
> 
> You could also try zeroing it in another machine, ± any adapters
> required. (Bear in mind that adapters do have readonly sliders.)

I suspect this is the crux of the problem.  the adapter I
connected is a card reader.  You put the SSD in a little plastic
jacket that holds the SSD in such a way that the card reader can
access the edge connector but the holder jacket has no electronics.
There is a small notch in the plastic of the jacket on the left
edge and the right front corner of the plastic carrier has a
diagonal cut to prevent someone from putting it in upsidedown.

Since I posted, there is good news but I still wonder if
I am not going bonkers because after unplugging the Sony card reader
and plugging it back in, I now am getting device /dev/sdg instead
of /dev/sdh.  I was also able to do the following:

#sudo fdisk /dev/sdg

which gave me the fdisk utility as before so I did what crazy
people do which is to do the same thing as before, hoping for
different results.

By Joe, I got them.

I typed d to delete a partition and it put partition 2 up as the
default candidate as before so I selected it and then typed d
again which told me that only partition 1 was left so it was
deleted.

I had gotten this far before so wasn't too excited but type
w and this time got the message stating that the partition table
had been rewritten and fdisk then exited.

Now, doing sudo fdisk -l /dev/sdg yields

1wb5agz martin tmp $ sudo fdisk -l /dev/sdg
Disk /dev/sdg: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Disk model: USB   HS-SD Card
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x680226ff

The partitions are gone.  My latest screwball theory is
that the Sony card reader went in to some sort of protective mode
after the dd operation overwrote the device.  My unplugging the
reader and plugging it back in reran the driver which reset the
protective mode back to normal which may be why it all worked
right this time.

One last question:  Since the image will still be too
large as it is, can tunefs be run on it or a copy of it to shrink
about 4 gb of user space?  The good system I copied the image
from only had about 12%  of the partition used so I should be
able to transplant it to the smaller disk if tunefs can do that
and still leave a bootable device.

Thanks for all useful ideas.

Martin McCormick



Re: SSD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-27 Thread Martin McCormick
Bijan Soleymani  writes:
> Can you delete both partitions, create a new single linux partition, 
> reboot
> then run mkfs.ext4 to create a single new partition and then just install
> linux onto it or try dd again?

Great suggestions but I can't.  Part of the typescript output I
included was me doing just that and I was root when I did it but
the squawk is that I don't have permission as if I wasn't root.

If writing to the SSD card was possible, I could have
just done the dd command, only with a smaller input image and it
would have worked.

Thank you because what you suggest would be the normal way out.
Martin

Martin



Re: SSD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-27 Thread Martin McCormick
Charles Curley  writes:
> I'm no expert on RPis, but that sounds to me like the SD card is
> protected against writes. Check for any physical write protection
> switches on the card itself and the holder.

Thanks for the suggestion, but this is one of those SSD cards
that often is found in a camera and resembles a wafer the size of
a thumbnail.  It has a projection that acts as a key way to keep
a user from inserting it in the wrong way and there is a groove
for a fingernail to help pull the chip out of the socket.  This
particular one was reading and writing just fine until I bricked
it by the DD that must have overwritten some address which now
makes it unwritable.  It went from good to bad without my
removing it from the card reader so there should be some way to
at least clear it for writing again.

Apparently, it stops being writable if the partition
table is corrupted.  In my case, I just want to delete both
partitions and start over.

The OS is debian Buster and has all the tools you can
expect to find and runs on a 64-bit ARM.  Otherwise, it's pure
debian Linux.

Martin



SSD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-27 Thread Martin McCormick
I thanked the person who responded to my post and reported that
there were no unusual log entries in syslog on the failing system
so not much to go on.  I decided to upgrade the Raspberry Pi
which was suddenly having this mysterious problem as I have
backups of the failing system so I figured I'd just clone a
buster image from another Raspberry Pi that is running buster and
use dd to copy it to the Raspberry Pi which was running stretch
and having that weird problem.

Then, assuming the upgraded Pi was alive, I could use the
backup from the stretch system to put all the user space from my
old home directory on the new buster system but I messed up
again.  The SSD card from the older system is 28 GB and the
working buster system's SSD card is 32 GB so the smaller card
filled up and I achieved that "no space left on device" state
that we all love to see.

Simple, I thought.  I'll just delete all partitions, and
do the dd if=rpi_good.img of=/dev/sdh which is where this card shows
up when it is in the reader and I can maybe dd a smaller 8.5-gb
drive which I have that has almost never been used.

Murphy has struck again.  Here is what happens when I try
to use that 28-gb SSD card:  Script dump follows

Script started on 2022-01-26 20:03:52-06:00 [TERM="Linux" TTY="/dev/pts/3" 
COLUMNS="80" LINES="25"]
1wb5agz martin tmp $ sudo su -
[sudo] password for martin: 
root@wb5agz:~# fdisk -l /dev/sdh
/dev/sdh: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Disk model: USB   HS-SD Card
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x680226ff

Device Boot  Start  End  Sectors 
 Size Id Type
/dev/sdh1 8192   137215   129024   63M  c W95 FAT32 (LBA)
/dev/sdh2   137216 62333951 62196736 29.7G 83 Linux
root@wb5agz:~# fdisk /dev/sdh
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdh: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Disk model: USB   HS-SD Card
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x680226ff

/dev/sdh1 8192   137215   129024   63M  c W95 FAT32 (LBA)
/dev/sdh2   137216 62333951 62196736 29.7G 83 Linux

Command (m for help): d
Partition number (1,2, default 2): 

Partition 2 has been deleted.

Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): w
fdisk: failed to write disklabel: Operation not permitted
root@wb5agz:~# logout
2wb5agz martin tmp $ exit

Script done on 2022-01-26 20:07:59-06:00 [COMMAND_EXIT_CODE="1"]

So close and yet so far away.  If I try to use dd on
/dev/sdh again, I get:

1wb5agz martin tmp $ sudo dd if=~/rpi/rpi2_good.img of=/dev/sdh
[sudo] password for martin: 
dd: writing to '/dev/sdh': Operation not permitted
1+0 records in
0+0 records out
0 bytes copied, 0.021666 s, 0.0 kB/s
2wb5agz martin tmp $ exit

I've had usb thumb drives fail when filled to capacity
and, if I hadn't been tired, I would have noticed that the image
was 4 gb too large so this wouldn't have happened but surely,
there is some way to at least zero out everything so the SSD can
be either reformatted or used as the output of an image transfer
using dd.

The SSD passed a fsck test earlier in the day before I
blew it up so the chip should be salvageable.  I don't care for
recovering either of the two partitions which will be overwritten
anyway if the SSD can be made writable again.

One can mount /dev/sdh1 which is the fat32 partition
but it mounts as read-only.  If you try /dev/sdh2, you get a
squawk that says that this partition is not in /etc/fstab which
is certainly true but it doesn't mount either so mount doesn't
understand what I was trying to do.  This is the partition that
got the overflow condition so it's utterly useless.

These last 2 days, I have been a day late, a Dollar short
and 1 step behind on what shouldn't be really that big of a problem.

Martin WB5AGZ



The Raspberry Pi that Took a Day Off.

2022-01-25 Thread Martin McCormick
This Pi is running Debian Stretch.  I believe that's what version
9 is called.  I have it capturing audio from a radio receiver and
it's been doing that for several years now and it was doing that
yesterday morning.  Later in the day, I downloaded more audio
and, after a long pause, I got the message from ssh that the
Raspberry Pi wasn't there any longer so I retrieved the Pi from
the room where it was and brought it to my Debian desktop system
to work on it.

I could login to the Pi which seemed to be up and running
but the short story is that it couldn't talk to any address but
our router.I couldn't even ping it's interface from the Pi,
itself.

If I was on the Raspberry Pi's console, everything looked
normal as long as one wasn't using the TCP/IP interface.  You
could even do a ip addr or an ipconfig -a command and it would
show that it had gotten the correct address from our dhcp server
which is in the router.  It would successfully ping the router
but no other addresses, not even the address it uses on our
network.

I finally quit messing with it and went to bed but fired
it up again today, January 25 and low and behold, it just came
right up and is now back doing what it has been doing.

Is it possible that it got a corrupted lease for dhcp
from the router?  Dhcp leases on our Netgear router are issued
for not quite 24 hours so it may have gotten a bad lease, kept
renewing it for the time it was powered up and then it got a new
version of that lease today and all is well.

It's the same IP address because I have put it in the
router as a static IP address.

The other thing that is weird is that the Raspberry Pi in
question has both a wired Ethernet and a WiFi interface and both
were misbehaving identically.

Normally, the wired port is not used and the dhcp lease
renewal process happens over WiFi.

The results of ip addr always showed a correct subnet
mask and the only rules in iptables are the 2 default rules.  In
other words, all looked normal except that it didn't work.

While I had it on the work bench, so to speak, I ran fsck
-fy on the SSD card since it has been a couple of years since I
last did that and there was not a single squawk about anything.

Thanks for any ideas about how things got wrong and then
magically fixed themselves.

When I turned it off last night, I gave it the halt -p
command.  The power supply has no switch so I unplugged it from
power so it started fresh about 8 hours later.

Martin WB5AGZ



Re: /usr/share/calendar.usholiday

2022-01-17 Thread Martin McCormick
deloptes  writes:
> And if you look into the file, you see it has no years associated with the
> date, so it doesn't matter when it was written unless there was a change 
> in
> the official holidays in the US.

Correct.  I see two types of date references, exact dates
such as Christmas and New-year's and rule-based dates which are
some designated day such as the second Monday in a given month,
what the British refer to as a "bank holiday."

My original question about this file has been answered in
a round-about way in that there are also two types of holidays.
St. Valentines day, for example, is not a postal or bank holiday
but one will certainly get in deep trouble on the home or
romantic front if that day is forgotten.

Also days like Arbor Day are a nice idea but nothing
about normal commerce or daily activities changes

I also noticed that today in the United States should be
marked but hasn't been yet.  It is the third Monday in January
which, since 1986 has been the official recognition of
the birthday of a US civil rights leader, Martin Luther King Jr.

The entry in that file probably should read:

01/MonThird Martin Luther King Birthday (3rd Monday of January)

It is now a major holiday and schools and government
offices are usually closed so it should probably be there.

Thanks to all and sorry if I created  any confusion about
the path.

Martin McCormick.



Re: /usr/share/calendar.usholiday

2022-01-17 Thread Martin McCormick
Greg Wooledge  writes:
> On Sun, Jan 16, 2022 at 09:58:11PM -0600, Martin McCormick wrote:
> > There's a stale version of this file on my system that reflects
> > when Debian was installed but it brings a question to mind.
> 
> The one in the Subject: header?  Are you sure that's the correct
> path for this file?

I goofed.  I thought I could remember it long enough but
it is actually


/usr/share/calendar/calendar.usholiday

I also still had an old directory tree from when I had
wheezy on the system and there is

/home/wheezy/usr/share/calendar/calendar.usholiday

> 
> On Debian 11, I have the file /usr/share/calendar/calendar.usholiday

I am presently running

Debian GNU/Linux 10 as in Buster.
---


> which is a different path from the one you showed.

That was just a mistake on my part.  Sorry to add more confusion.

This also reminds me to get rid of the old wheezy files
since I now don't even remember why I saved them but they are
getting backed up nightly for no reason at all other than they
get caught up in the sweep.

Martin



/usr/share/calendar.usholiday

2022-01-16 Thread Martin McCormick
There's a stale version of this file on my system that reflects
when Debian was installed but it brings a question to mind.

Does this file simply cause messages to appear on an
event calendar or can it be used along with crontab in some way
to either cause or prevent cron jobs from running if a date
matches one of the dates in the file?

I use cron and at jobs all the time and have thought that
it would be nice to skip some jobs if the day is a holiday and
the result might be not what one wanted.

Right now, I don't think this file is doing a thing as it
is for 2017 but this is why I am asking.

I also saw versions of that file for other countries such
as the UK.

Thanks for all good responses.

Martin McCormick



Curious Question about an Extra MAC Address

2021-10-26 Thread Martin McCormick
I was inventorying all the systems on our WiFi and wired network
so I did the following:

   sudo nmap -sn 192.168.1.0/24 followed by
  sudo arp -a and I found nothing extraordinary so I also got on
our Netgear router and told it to cough up a list of attached
devices, showing the same list of stuff that the first two sweeps
found.  Additionally, there was 1 mac address with no other
information such as an IP address or system name, just that MAC
on a row all by itself.

I had been looking for our DVD player which has the
ability to view streamed movies and I think this might be it.

As a computer user who is blind, I don't directly use
this player but my wife does.  We usually play DVD's from it
however she did use it once to watch a movie off the network and
it worked fine.

I asked her if she remembered giving our WiFi password
and she said no but was given a message to go to a certain url to
authorize payment in order to watch the film and it all worked
down to the monetary slurp so this is not a complaint or gripe
about anything.

My question is, did the link she went to on the computer
or maybe her iPhone use javascript to get our WiFi password and
if so, how did the player get the authorization to use our WiFi?

The stray MAC showing up on the router is probably the
player broadcasting an attempt to get in the network but to do
so, it has to send the password in order to get a DHCP lease
which would then allow it to get on the internet.

I am just curious about how did this work and could a
person cause it to log on to our WiFi network and receive a video
stored on a system here?

I'm not trying to rip anybody off but it's good to
know what extra features are under the hood.

What I am actually thinking of is more like a DVR where a
computer can record a TV show like the old-school VCR's and then
one could play it back through the DVD player on the network.

This player can also update it's firmware when necessary
and we've never been prompted from it for a WiFi password.  It
just seems to be able to get through when it needs to.

I guess this could also be a neighbor trying to mooch
WiFi, but I doubt it.  Everything with an IP address belongs to
us and there are no odd amounts of data coarsing through our
router that aren't caused by us.

This is a neighborhood in a college town so one must be
careful but not too paranoid.

Thanks for any good ideas.

Martin



Re: eMail Com Between Hosts on a Private Net

2021-10-22 Thread Martin McCormick
One more question I should know the answer to but am not sure of.
The debian Buster system I use for email presently uses fetchmail
to get mail from the ISP and is configured to use that ISP's
smarthost for out-going mail.  I do not want to  effect
(= muck this up) this  functionality because  it works well for
now.

Shouldn't I be able to install an imap server on the
debian box and forward messages of interest to it, then reach
imap4 on the private net from any system that speaks imap or has
an imap client?

That would do what I need to do.

When I was researching, the article in wikipedia I read
said that many commercial systems have email clients which
understand imap, pop3, etc.  The systems likely to do this on our
network are a windows10 box, an iMac and maybe an iPad.  The idea
would be to forward an email message needing this attention to
imap on the linux box, contact the Linux box from one of the
devices I mentioned, and download the message at which point it
would e as if that system had been hooked up to the ISP and
received it.

I was all ready to use .local as our domain name and then
I looked that up and there is a good wikipedia article which
explains how that is problematic and recommends using something
like .lan, .office or something else that isn't likely to be
registered as a top-level resolvable domain name.

The machine I receive email on presently would be a good
candidate for running a mdns but our netgear router advertises
whatever dns's the isp uses for obvious reasons and that's fine
but it would be nice if the mdns's address could also be known to clients
on our network which could make DNS queries to each other's names
that would resolve properly.

Is there a way to advertise the mdns so that the router
picks it up but doesn't drop the internet DNS's that we all need
to resolve the rest of the world?

I do remember when I was working, we explored open-source
network authentication systems which involved fake DNS's that one
had to advertise as such so their information wouldn't corrupt
the proper working DNS's which could really mess things up if
somebody happened to pickup and cache the wild card * that sent
all new supplicants to the authentication server after they were
already up and running.

In our case, the corruption would be okay and done for
good reasons but the dhcp server in our router  already advertises two
domain name servers so ours would have to be learned about by
discovery.

Thanks again.

Martin McCormick



Re: eMail Com Between Hosts on a Private Net

2021-10-20 Thread Martin McCormick
Joe  writes:
> Indeed so, it is even in a folder called 'etc', which I think is in a
> 'drivers' folder. It's a while since I used it. There may be an
> existing default or example \etc\hosts file. The LMHosts file is also
> here, but of interest only to Windows networks for speeding up share
> lookups.
> 
> --
> Joe
My thanks to all who replied and thanks for reminding me of some
of the considerations one needs to think of when setting this all
up since that's what I used to do as part of my job before
retiring in 2015.  As for there being 16 subnets in the
192.168.x.x number space, one can use variable-width subnet masks
so unless you have a lot of hosts or, for some reason, are
sharing space with another subnet, one can spread out to a Class
B-style network which would be the whole space and have a subnet
mask of 255.255.0.0 or you can make lots of little subnets of
various mask sizes with blocks of 16 addresses being about the
smallest subnet that is practical.  Remember you always lose the
all-zeros and all-ones broadcast addresses because they are
special plus there is likely a router address taken by the router
which leaves 13 addresses for hosts in each subnet.

I remember early in the nineties our campus went from a
single Class C to a Class B network and the whole campus used the
Class B subnet mask with bridges holding the whole thing
together.  You should have seen some of the arp storms that would
blow up like wild fire when somebody had a misconfigured host
trying to be helpful or maybe deliberately misconfigured because
somebody got their socks in a wad over something and started the
fire on purpose.

It wasn't long before we began more efficiently using the
number space with big departments getting let's say 1024 or 512
possible addresses and others getting 16 or 32 addresses.

By the time I left, we were using the huge private
network space of 10.0.0.0 with aNAT or Network Address
Translation to parts of the old Class B network and it generally
worked well.

I wrote a C then a perl program which would assign IP
addresses for hosts on our networks that knew the sizes of all
the subnet masks so assigning IP addresses was something anybody
in our group could do without much more information other than
what host name the customer wanted and what building it was in.
My job was basically to encode all that in to rules for
automation to keep us safe from making mistakes and it worked.

Martin



eMail Com Between Hosts on a Private Net

2021-10-20 Thread Martin McCormick
The installation, here, is like millions of others.  We are on a
private VLAN with the router acting as the gateway to our ISP's
network and the internet.  There is nothing unusual about that so
the question is Can systems on a 192.168.x VLAN use smtp to send
mail to each other?

I really should know the answer to this because I am a
retired systems engineer who used unix systems and mailers all
the time but that was in a university network and I would just
assign a DNS name to each box and maybe a MX record if it was
necessary so that box1.midlevel.edu could deliver mail to
box2.midlevel.edu whether it was across the room or on another
continent.

The DNS support is what you don't have on a private VLAN
so I want to do this in a safe but simple way.

This would make it possible for Linux boxes on the
network to send messages to the system I normally receive mail on
so that squawks about a process crashing or some other problem
are sure to be seen.

The other systems sending those messages don't even
necessarily need to send mail outside the network but they do
need to send mail to the system I normally read mail on.

I looked up this topic using duckduckgo and found very
little hits that were on topic and lots of mercantile buzz about
email hosting companies, etc.  All are necessary but not what I
was asking about.

I have put static IP records in to the dhcp server on our
router so 192.168.1.xx will always either have a specific host at
that address or nothing if the MAC address changes and the record
hasn't been updated.

Also, I have put /etc/hosts files on Linux systems and a
Mac and I believe there is a hosts file one can add to Windows
systems for a similar effect.

Thanks for any good ideas.

Martin McCormick



Re: Proprietary USB Drivers; Ya Gotta' Love'em.

2021-09-25 Thread Martin McCormick
So, what is the easiest route to end up with a kernel that has
this patch in it?

The image for the current kernel is
4.19.0-5-686-pae

The Raspberry Pi is an arm-based system and the image
version number is probably different but the idea is the same,
have a kernel that doesn't choke when one is using the ICR-30
usbC port.

To put it bluntly, this is an area of Linux I have very
little familiarity with because generally, Linux kernels just
work so this is a left-handed complement in that I think this is
the first kernel bug that I have encountered ever.

I am sure I have run kernels with other bugs that I
didn't know about but this is the first time one has bitten me,
so to speak.

Thanks.


Martin     WB5AGZ
Martin McCormick  WB5AGZ



Re: Proprietary USB Drivers; Ya Gotta' Love'em.

2021-09-25 Thread Martin McCormick
Gene Heskett  writes:
> You forgot to mention it can get the message thru better because it has a
> 12 db advantage over competing noise compared to the original AM,
> sometimes called Ancient Mary in our circles.

I did forget that but you are correct.  another
interesting thing about ssb which includes both sidebands is that
it was first tried during the 1930's as a concept and had to wait
until after World War II before amateur radio operators, the
millitary and commercial folks began using it routinely.  To not
stray too far from the group purpose, the usb dongles that give
you a wide coverage receiver from 26 to almost 1000 MHZ use
basically math to decode sideband, AM, FM and data using DSP
techniques.

Martin



Re: Proprietary USB Drivers; Ya Gotta' Love'em.

2021-09-25 Thread Martin McCormick
Charles Curley  writes:
> Possibly a known kernel bug.
> 
> https://forums.opensuse.org/showthread.php/538695-USB-driver-Zero-Length-Descriptor
> 
> https://lore.kernel.org/lkml/1507709452-31260-1-git-send-email-msa...@iotecha.com/
> 
> --
> Does anybody read signatures any more?
> 
> https://charlescurley.com
> https://charlescurley.com/blog/

Thank you.  That's got to be it.  I've been doing debian Linux since
right around 2000 but I must admit that I don't know the easiest
way to include the patch referenced in the second link.

I will need to do that on an i86 box plus the Raspberry Pi
I first discovered the issue on since I am apt to have the radio
connected to either system and, if this problem is fixable, this
solution is preferable because the radio defaults to using the
usbC port as the serial port so it should still work if a full
reset is ever needed and the mechanism for usb should naturally
accept as many different devices as practical because you never
know what you will need to connect until you try it and it fails.

As an amusing aside, the radio has a usb mode, but
that's totally unrelated because in that case, USB stands for
upper side band and is a very energy-efficient method of radio
communication because it is only a spectrum of frequencies
consisting of the sidebands of an audio signal without the
carrier.  It can be LSB or lower side band or USB for upper side
band.  Nothing like a few new acronyms for your day. I guess that's TMI.

Martin McCormick WB5AGZ



Proprietary USB Drivers; Ya Gotta' Love'em.

2021-09-25 Thread Martin McCormick
This is an embedded usb serial port in a radio receiver which
works in MS Windows10 and I was hoping to write some control
routines for a Raspberry Pi running buster and it does the
following:

Sep 22 20:17:15 rpi2 kernel: [551843.541477] usb 1-1.2: new full-speed USB 
device number 6 using dwc_otg
Sep 22 20:17:16 rpi2 kernel: [551843.674681] usb 1-1.2: not running at top 
speed; connect to a high speed hub
Sep 22 20:17:16 rpi2 kernel: [551843.684432] usb 1-1.2: New USB device found, 
idVendor=0c26, idProduct=002b
Sep 22 20:17:16 rpi2 kernel: [551843.68] usb 1-1.2: New USB device strings: 
Mfr=1, Product=2, SerialNumber=3
Sep 22 20:17:16 rpi2 kernel: [551843.684452] usb 1-1.2: Product: IC-R30
Sep 22 20:17:16 rpi2 kernel: [551843.684460] usb 1-1.2: Manufacturer: Icom Inc.
Sep 22 20:17:16 rpi2 kernel: [551843.684468] usb 1-1.2: SerialNumber: IC-R30 
16002557
Sep 22 20:17:16 rpi2 kernel: [551843.727911] cdc_acm 1-1.2:1.0: Zero length 
descriptor references
Sep 22 20:17:16 rpi2 kernel: [551843.727940] cdc_acm: probe of 1-1.2:1.0 failed 
with error -22
Sep 22 20:17:16 rpi2 kernel: [551843.728056] usbcore: registered new interface 
driver cdc_acm
Sep 22 20:17:16 rpi2 kernel: [551843.728061] cdc_acm: USB Abstract Control 
Model driver for USB modems and ISDN adapters
Sep 22 20:21:11 rpi2 kernel: [552078.765119] usb 1-1.2: USB disconnect, device 
number 6

So much for that.  There is one other possibility.  It is
possible that one can go to one of the menu options and flip a
virtual switch that will take the serial data that should have
been on /dev/ttyACMx and put them on a logic-level serial line
that is accessible through the right stereo channel of a
3-conductor jack.  Whether or not that works is beyond the scope
of this list so my question is whether or not there is a wrapper
program of some kind in Linux that can fool an application like
the serial port module that tried to run here in to thinking that
it is home and among friends when it's really been kidnapped.

The possible use of a logic-level serial line is probably
what I will need to do but that means that if one resets the radio to
factory defaults, one will have to go in to the menus on
the radio's screen and restore the virtual switch setting.

As a computer user who happens to be blind, that's a major pain as
well as in a case where the radio is remotely located and one is
operating it headlessly.

I smiled a bit when reading the syslog admonition to
connect to a high-speed hub.  That would be quite a trick.

Thanks for any constructive suggestions.

Martin McCormick WB5AGZ



Re: Pipewire for multiple users

2021-08-19 Thread martin f krafft

Regarding the following, written by "Lucio Crusca" on 2021-08-19 at 16:05 Uhr 
+0200:

lucio@t470:~ $ su - u
...
u@t470:~ $ pactl info 
Connection failure: Connection refused 
pa_context_connect() failed: Connection refused


Pulse and systemd need a dbus session, and `su` will not get you 
that. If you want to use either, you need to ensure that you're 
properly logged in as the user, or configure your system to set up 
the dbus session accordingly.


An easy way to do this is to use `ssh` with X-forwarding:

```
ssh -X u@localhost
```

and then try it again.

If that doesn't work, confirm that "u" can use Pulse when logged in 
with a regular desktop session, i.e. at the graphical login screen.


Hope this helps,

--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
"the problem with america is stupidity. i'm not saying there should

 be a capital punishment for stupidity, but why don't we just take
 the safety labels off of everything and let the problem solve
 itself?"
  -- seen on irc


Re: Swiss Army Knife of Sound has me Baffled.

2021-08-19 Thread Martin McCormick
Dan Ritter  writes:
> > arecord: set_params:1345: Channels count non available
> > sox FAIL formats: can't open input  `-': WAVE: RIFF header not found
> 
> Keep recording 2 channels. Your hardware doesn't like it
> otherwise.
> 
> You can ask sox:
> 
> sox -t wav -c1 - -r44100 $filename
> 
> to merge the channels to a single output channel
> 
> I believe, but have not tested, that a final argument to sox of
> 
> remix 1
> 
> will get you just the left channel, or remix 2 for the right
> channel.
> 
> -dsr-

I haven't tried anything new yet but that sure looks right and
will probably work.

Thanks to all who responded.  This is what I like about
this list as it presently exists.  I had figured out that the
problem was  with the hardware which is a fairly decent device
but severely limited in Linux because a lot of it's power comes
from a proprietary driver like a number of other devices such as
winmodems, etc.  Then I read this:

Nicolas George  writes:
> If you read carefully, you will notice that your problem is not with
> sox, it is with arecord: sox only fails because arecord fails and does
> not produce anything.
> 
> arecord itself fails because "channels count not available": the sound
> device you are using does not like mono, it obviously like only stereo.
> 
> You have two options:
> 
> - Use a sound device that supports mono. Since you cannot change your
>   hardware, it needs to be done in software with an ALSA plugin. This is
>   all streamlined, you only need to write plughw instead of hw.
> 
> - Keep recording in stereo, and have sox convert it to mono before
>   saving. You will need to peruse the manual page of sox to know the
>   option, I only ever use ffmpeg for obvious reasons.
> 
> Note that:
> 
> - If you use plughw instead of hw, then the ALSA plugin can also
>   resample, and therefore you no longer needs sox at all.
> 
> - sox is capable of recording from ALSA directly, with something like
>   "-t alsa plughw:0".
> 
> Regards,

I actually did get a message from arecord about using a plugin
and you  have answered the question as to what needs to be done
to make that happen.  I had not even thought of the plugin
solution so this is a whole new possible route to success which I didn't even
think of before.

David Wright  also writes:
> Try -r 8000, or leave out -r and -c entirely, and you should
> succeed. But I doubt that's really your priority, is it?
> 
> > […] and I
> > guess I could leave it in stereo mode and tell sox to mix the
> > left and right channels which is fine with me but kind of clunky.
> 
> That's why it's the "Swiss Army knife". After mixing the two channels,
> you can write to a single-channel WAV file.
> 
> What you can't do is tell /arecord/ to use an ADC that doesn't exist.
> 
> Cheers,
> David.

I am in no great hurry so I will probably try both the
plugin solution and the sox coding and save them both for later
as the idea is to end up with something that is both efficient and
useful.

Thanks, everybody.

Martin McCormick   WB5AGZ



Swiss Army Knife of Sound has me Baffled.

2021-08-18 Thread Martin McCormick
I have a little shell script called fullstereo which works fine.
It's short so I'll show it to you.  It records sound from a
Creative Labs usb sound card which is probably much happier on a
Windows box but that's not where I need it.  It has only 1
sampling rate that works under debian and that is 48 KHZ.  I want
44.1 KHZ and I get 2 good stereo channels with the following script:

#! /bin/sh
cd ~/tmp
filename=$1.wav
echo $filename
arecord -D hw:1,0 -r 48000 -d $2 -c 2 -f S16_LE - \
| sox -t wav - -r44100 $filename

$2 is a value in seconds, minutes or hours and it goes
like a house on fire with no problem.

So, I want a mono version.  Let's try this:

#! /bin/sh
cd ~/tmp
filename=$1.wav
echo $filename
arecord -D hw:1,0 -r 48000 -d $2 -c 1 -f S16_LE - \
| sox -t wav - -r44100 $filename

This hasn't worked yet.  It is identical to the good version but
for c 1 as the number of channels to arecord instead of c 2 .

When running that script, this is what happens:

$ ./highmono testsound 30
testsound.wav
Recording WAVE '-' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

#Good so far and then

arecord: set_params:1345: Channels count non available
sox FAIL formats: can't open input  `-': WAVE: RIFF header not found

Darn!  A couple of microseconds before that, the same process
understood what I asked it to do.  When the -c parameter was set
to 2, it understood what to do with the standard output but with
c set to 1, it did what you see above.

I can't seem to figure out why 1 channel output is any
different from 2 channel except that the wav header should be
pretty much the same with a channel count of 1 instead of 2.

The man page for arecord even says the following:

   -c, --channels=#
  The number of channels.  The default is one channel.  Valid val‐
  ues are 1 through 32.  Theoretically, one could
leave out -c 1 and it should go ahead as if that flag was
actually there but it breaks instead.  This might also be because
one can not set any parameters without the Windows driver and I
guess I could leave it in stereo mode and tell sox to mix the
left and right channels which is fine with me but kind of clunky.

I am asking the list's wisdom in case there is a better
way to produce the mono channel.

Thanks.

Martin WB5AGZ



Grub Success at Last

2021-06-08 Thread Martin McCormick
I did it!  It works!

Okay.  Here's the short story.  I read some more stuff
about building a boot drive for another system than the one being
used for the rescue.  In this thread were the usual tales of woe
which I have also experienced when misusing grub such as "Oh
#%^*! Now I've got 2 systems that won't boot."  a poster on that
thread states:

   I'm not a grub2 expert (sorry) but try adding --skip-fs-probe to your
   grub-install line, I have found this prevents creation of
   /boot/grub/device.map which can cause booting to a grub prompt. I think
   that without this parameter grub-install, instead of doing what you
   tell it, thinks it is cleverer than you, and may do something
   different.

   Another thing is to be sure you are using the right grub-install (i.e.
   for grub2 and not for original grub). This isn't a problem if you are
   inside Centos but with SystemRecoveryCD both versions are available and
   so you have to use grub2-install. I learned the hard way...

   And as @wurtel pointed out (kudos), you should specify a drive not a
   partition. Grub2 installs in sector 0 of the whole disk drive, and this
   'stub' is what runs at boot time, but it needs to know whereabouts on
   the disk it should install the files for the next stage of booting -
   this is what the --root-directory parameter is for. (I think.)

   Reading man grub-install and googling I see that --root-directory is
   not really meant to be used for grub2 versions 1.99++, though it does
   work in my experience. You are meant to use --boot-directory and refer
   to the actual boot directory, so this would give you:
grub-install /dev/sdb --skip-fs-probe --boot-directory=/media/new_drive/boot

End of quote

I did the following:

#!/bin/sh
#mount the drive being repaired.  Uncomment lines as needed.
  sudo mount /dev/sdd1 /mnt
cd /mnt/boot
#installing to the mounted disk
  sudo grub-install \
--skip-fs-probe \
--boot-directory=/mnt/boot/ /dev/sdd

When you boot your disk that starts out on /dev/sda1,
it's the first partition, in this case, so it will be /dev/sda1
not /dev/sdd1 .  This was quite a long thread and people were
remarking on how it is easy to get confused and do the wrong
thing.

Anyway, It booted right up and then I discovered there
was no network.

The network issue was only tangentially related because
the update-upgrade process also install some more strict and
modified ethernet interface naming rules and eth2 just doesn't
cut it any more.  Now, it's enp0s17 on the system that just got
revived and enp0s18 or something similar on the system that got
the same upgrades but is a little newer and took the tharapy much
easier.  Everything's working again at least in the Linux world.

I saw this ad on TV for some product that is supposed to
improve brain function and memory but I can never remember it's
name.  I could use a few more IQ points and things would flow a
little faster around here.

Thanks for all the help, everybody.

Martin



Re: A Grub Boot Question about initrd

2021-06-07 Thread Martin McCormick
Felix Miata  writes:
> This is a big lurking booby trap that could have been the problem both 
> last time
> and this time. It's one of the reasons why installation systems and Grub 
> switched
> from using device names to using UUIDs: inconsistent and/or unpredicable 
> device
> enumeration.
> 
> Is this a PC with both PATA and SATA controllers? These old PCs can 
> compound the
> issue.
> 
> Different kernel, disk controller, USB controller and BIOS combinations 
> can cause
> e.g. an SATA or PATA disk sda to become sde, or sdb become sda, IOW, 
> device names
> that don't persist. UUIDs are supposed to prevent inconsistent device 
> names from
> being a problem, but in a rescue environment, it can muddy the waters, or 
> backfire.

Yes on all counts.  These are old PC's that use IDE
controllers.  The IDE cables end in the normal 34-conductor
header with one pin missing on one side that plugs directly in to
the drive.  In this case, the connector plugs in to a SATA-to-IDE
converter with a female SATA connector.

I believe you have hit the nail on the head because I
know for a fact that the devices change names.  On the working
system, the boot device we would normally think of as /dev/sda is
/dev/sdc and 5 minutes from now might be /dev/sdq depending on
what drives were plugged in to usb ports when the system booted.

Just yesterday, I mounted /dev/sdd, thinking it was the
now infamous unbootable drive and immediately realized that I was
looking at the boot drive that starts the good system.  I had
plugged a thumb drive in to a usb port some time earlier and then
rebooted the system while failing to remove the thumb drive as it
wasn't even being used right then.

Let's see.  $ dd if=/dev/sdd of=/dev/sde  What could
possibly go wrong?  Just kidding this time but that's what we are
dealing with.  That possibly lethal command can work but only
under the right circumstances so if one forgot to recreate the
world one was working with, it's tuition in the school of hard
knocks.  I haven't yet totally given up and done anything else
rash so it's still full steam ahead.  This is one of those
situations where if a person has the time, this can be a
teachable moment.

I've got several thumb drives that I mount based on their
UUID and that method of doing things is your friend if you
understand how to use it.  If not, what one ends up with is total
chaos.

Felix's message hasn't saved the day yet but it confirms
my hunch that the UUID's have been at the heart of this problem
all along because there is simply no other logical reason why one
can not transplant the same boot logic from one system to the
other when they are functional copies of each other.  The trick
will be to replace every UUID personalization which is doable.
Whether it is practical still remains to be seen.

To briefly reference an earlier message, I checked the
good system to see what rsnapshot did over night and /boot is
now committed to a series of little capacitors which is how SSD's
remember things.  From fstab:

# /etc/fstab: static file system information.
UUID="49c4eda8-3bcc-445e-841b-513b07d560fe" /var/cache/rsnapshot ext4 
relatime,rw,user,noauto  0   0

If that drive wasn't always plugged in, the boot drive
would have a different device number than /dev/sdc1 which is also
mounted by UUID.  That drive also plugs directly in to a usb slot
and not any extender to hopefully insure that it is more likely
to be present.

I will uncompress the initrd files and see how hard it
will be to find the UUID and change it to what it should be on
the problem target system.

Again, thanks to all.

Martin   WB5AGZ



Re: A Grub Boot Question about initrd

2021-06-06 Thread Martin McCormick
I admit I made several big mistakes, here.  The first was not
having a backup of /boot as I thought I did.  The next is
thinking I could just copy the whole boot directory from a
known working system and be able to get it to work by using sed to
replace the UUID's of the system it was on with those of the
system it will be on.  Had I backed up the broken system instead
the minute I knew there was a problem, it would have been
fixable.

Trying to transplant the good boot system to a different
machine really should work if one knows what all changed but if
that was the case, I'd be crowing about how I got it working.

I may try one last thing which is to decompress the initrd
files and see if there is a way to make sure they work after
transplantation.  At this point, it's probably more important to
know what is poisoning the well as a training exercise since
having good backups of /boot would have turned a major halt in
to a minor irritation.  Trust me.  The good system is going to
get daily backups of boot and grub every 24 hours from this day
on.

I haven't actually done anything yet to clone the good
system's boot drive because I want to do the clone in the middle
of the night when things are quieter and I don't run fetchmail
in the wee hours so the backup sees a more stable file system.

If, by chance, I end up actually making the broken system
work, I'll let you know what it was and the one drive can serve
the whole system again.

Martin



Re: A Grub Boot Question about initrd

2021-06-06 Thread Martin McCormick
Felix Miata  writes:
> IMO you gave up too soon. IIRC you never showed us output from parted -l 
> or fdisk
> -l. Very likely on the problem PC the / filesystem was/is not on the first
> partition, where often lies a swap partition. Very likely root=/dev/sda2 
> would
> have been/be correct.

Sorry.  I meant to do that.

Swap is the last partition.

Disk /dev/sde: 29.8 GiB, 32017047552 bytes, 62533296 sectors
Disk model: 600 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0080

Device BootStart  End  Sectors  Size Id Type
/dev/sde1   2048 59314876 59312829 28.3G 83 Linux
/dev/sde2   59314877 62533295  3218419  1.5G  5 Extended
/dev/sde5   59316925 62533295  3216371  1.5G 82 Linux swap / Solaris

$ ls -1 /mnt/

bin
boot
dev
etc
home
initrd.img
initrd.img.old
lib
lost+found
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
vmlinuz
vmlinuz.old



Re: A Grub Boot Question about initrd

2021-06-06 Thread Martin McCormick
Thanks to all for the advice and knowledge you shared about how
grub works.  I am writing this on June 6 and early this morning,
I  edited the boot command in the grub shell after
verifying that my stubborn no-boot drive truly was sitting at
hd0,1msdos and grub-install had picked out hd2,1msdos for every
single drive reference, even the bare metal one.

I did try that one first in case I was missing some magic
but the only drive on the whole system was that one and listing
the contents of (hd0,1msdos) show exactly what you see if looking
at / so grub showed it exactly where one would expect it to be
and hd2,msdos is pure science fiction on that system so I set
every drive reference to hd0,1msdos except the root which grub
wanted to set to /dev/sdc1.

The sample that Greg Wooledge showed looked very close to
how my grub.cfg looked after doctoring the drive references to
point to hd0,1msdos.  and I tried booting that way and set the
root parameter to /dev/sda1, /dev/sdb1 and /dev/sdc1 which is the
one that grub chose, again non-existent.  /dev/sdb1 is actually a
Zipdisk drive but I tried it anyway since there is no zipdisk in
there.

It never booted so I am throwing in the towel, figuring
that in all the messing around, I have corrupted something and
wasted about two weeks on and off trying this, that and the other.

I have a good 32 GB drive left over from a computer that
died last year so I will just clone it from the working system
that is sending this email.  The drive that can't boot but is
otherwise fine will now be the second drive and will mount as
/home where all the important stuff I used it for can still live.

The only good thing about this exercise is that I know a
lot more about what grub does than I did and I also discovered
that while I had perfect backups of the home directory, I had
failed to set rsnapshot to backup /boot which was quite a stupid
oversight on my part.  /var, /etc and several other directories off of
/ get daily backups and I could have sworn /boot did but it's not
there so I have been doing a lot of industrial-grade swearing
lately.

Grub is a very fine tool when used properly and I do
believe that there should be a pristine way to make a disk
bootable that is intuitive and automatic plus unaffected by the
configuration of any other drive on the system, like the old sys
command in DOS to make any DOS diskette bootable.

The unix incarnation of the sys command would have to do
a lot more such as verify that you have a kernel and modules
ready to go plus consult your /etc/fstab and /etc/default/grub
files but that shouldn't be a real problem.  One would basically
do the grub install in a a total jail so it would come out set as
if one had just been running the installer and this was the only
drive on the system.

Thank you all for your help and sorry that it took so
long to determine that nothing simple was going to work.

Martin



Re: A Grub Boot Question about initrd

2021-06-05 Thread Martin McCormick
First I greatly appreciate all this information as the idea is to
fix a problem I probably created long ago though I am not sure
how but the short story is that apt-get upgrade ran update-grub
and update-initramfs late last Fall and I was able to rescue it
but it happened again at the end of April so I figured I had
better fix it correctly since I didn't know it was a ticking
bomb.

Felix Miata  writes:
> Martin McCormick composed on 2021-06-05 12:46 (UTC-0500):
> 
> > I have a plan but I need some more information.  Is there any
> > personalization done by the boot setup process?  Do our UUID's
> > or any other specific information pertaining to the installation
> > make it in to the initrd files?
> 
> Dracut includes a root=UUID= statement in the initrd. A root= 
> statement on
> the Grub linu* line overrides it. The override can be any of the accepted 
> forms,
> including root=LABEL= and root=.

Good to know.

> The translation is easy. UUIDs are assigned to devices. The device names 
> are
> acceptable substitutes, just as they used to be the only option before 
> libata made
> device names capable of playing musical chairs. If devices also have 
> labels,
> labels can be used instead of device names.

Very much like the reasoning behind udev which is a God-send if you
have multiple sound cards as one example.

> UUIDs were designed for computer scripts, not human brains. You'll need 
> to make a
> conversion, but instead of UUIDs, I highly recommend using labels when 
> you know
> device names will be different on the system migrated to. UUIDs are 
> appropriate
> too, just rather unwieldy unless scripted.

There's 1 UUID for the root file system in /boot/grub/grub.cfg
which is the file one must not normally edit by hand.  It 
reads

menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-658da8df-942e-4ad7-8c5b-695f2f2eb4ed' {

> Grub provides a shell. From the shell it's possible to boot using the 
> information
> you have. Instead of trying to figure it all out in advance, drop to the 
> shell and
> use the device names you know. It's really not hard if you have a copy of 
> a grub
> menu from the two PCs planted in your brain or on paper. Once you've 
> booted, it's
> easy to fix everything up by running grub-mkconfig, and if necessary,
> /etc/default/grub.
> 
> >   As an aside, one ought to be able to do something like
> > this.  It makes life a lot simpler.  Both systems are using the
> > same kernel and versions of the same processor the only real
> > differences are the UUID's.  The grub configurations of both are
> > the same down to the serial console.
> 
> Don't let the massive volume of data in grub.cfg mislead you. Its primary 
> job is
> to find and load a kernel and initrd. If you know where they are and 
> their names,
> none of the menu components or apparent search and identification bloat 
> are
> necessary. Before Grub2 you could simply tell Grub's shell the root 
> device, the
> kernel name (with associated parameters, most of which aren't actually 
> necessary),
> and the initrd name, then boot. With Grub2 you may need to precede the 
> root device
> name with loading a module or two or three, which you see in your copy of 
> a
> grub.cfg, then proceed with the important three. I do a lot of cloning, 
> so I've
> done it often.

Thanks again.  I was starting to get discouraged but I
will try using actual labels since I thought you really shouldn't
do that.

Martin



Re: A Grub Boot Question about initrd

2021-06-05 Thread Martin McCormick
Reco  writes:
> On Sat, Jun 05, 2021 at 12:46:13PM -0500, Martin McCormick wrote:
> > I have a plan but I need some more information.  Is there any
> > personalization done by the boot setup process?
> 
> Yes. One of the GRUB's tasks is to supply kernel which is about to boot
> with root=... cmdline parameter. Root filesystem UUID can be used for
> this.
> 
> 
> > Do our UUID's or any other specific information pertaining to the
> > installation make it in to the initrd files?
> 
> In Debian - no, unless you include it there for some bizarre reason.
> It's not needed for the things initrd usually does.
> 
> 
> >   If that is so, then two computers using the same
> > processor type should be able to use copies of the same initrd files
> > and the only thing that is personalized on an individual computer
> > is all the grub configuration in which the UUID's of at least /
> > and /swap partitions are sprinkled throughout grub.cfg and
> > /etc/default/grub.
> 
> It's not the CPU difference you need to worry about.
> Different SATA controllers, video cards, NICs - i.e. what they call
> periphery devices - those things require different kernel modules that
> should be (or could be) used in early boot process, and therefore need
> to be included in initrd.
> 
> Luckily, Debian uses initramfs-tools for building initrd, and
> initramfs-tools should build initrd with everything and a kitchen sink
> included (MODULES=most in /etc/initramfs-tools/initramfs.conf).
> 
> 
> >   One should be able to write a program to get the
> > appropriate UUID's out of fstab on the working system
> > and translate them in to corresponding UUID's for the system on
> > the operating table.
> 
> Er, they've invented filesystem labels for exactly this many decades
> ago.
> 
> 
> >   As an aside, one ought to be able to do something like
> > this.  It makes life a lot simpler.  Both systems are using the
> > same kernel and versions of the same processor the only real
> > differences are the UUID's.
> 
> Perfectly possible for the last 15 years or so. Assuming Debian and
> MODULES=most, of course.
> 
> Reco
> 
> 
It sounds like I haven't missed anything obvious so I will see if
I can write a perl script or some other text-muncher that will
recreate the grub configuration of the working system but with
the UUID's of the non-working system plus a grub.cfg file exactly
like the grub.cfg file on the system that refuses to boot but
with the correct UUID labels describing the boot partition on
that system plus a copy of the kernel and it's module directory.

As for partition labels, I have always thought the name
was much easier to deal with than the 36 randomly-selected
characters that make up the UUID on a unix partition but UUID
labels are supposed to be unique and are what you encounter today
so I will see if I can make the script modern compatible.

Thanks to you and delop...@gmail.com.



A Grub Boot Question about initrd

2021-06-05 Thread Martin McCormick
I have a plan but I need some more information.  Is there any
personalization done by the boot setup process?  Do our UUID's
or any other specific information pertaining to the installation
make it in to the initrd files?

While reading about the boot process, it doesn't appear
that the initrd files or initranfs are personalized with anything
pertaining to this computer and this installation.

If that is so, then two computers using the same
processor type should be able to use copies of the same initrd files
and the only thing that is personalized on an individual computer
is all the grub configuration in which the UUID's of at least /
and /swap partitions are sprinkled throughout grub.cfg and
/etc/default/grub.

One should be able to write a program to get the
appropriate UUID's out of fstab on the working system
and translate them in to corresponding UUID's for the system on
the operating table.

If the target system actually boots, it is probably a
good idea to run update-grub to make sure that still produces a
working boot but this would still more than likely produce the
same results if this process works in the first place.  It's also
possible that the reconstructed grub setup is okay except for the
drive designation which usually starts out as /dev/sda1.  On my
good Buster system, this is now /dev/sdc1 and on the sick one,
the attempt is being made on /dev/sda1.

The idea here is to copy the concept of what is happening
rather than the literal configurations which definitely will
never work unless one used dd to generate the clone drive and I
have actually done that once and it worked but the cloned system
was then adapted for other uses.  Here, all I want to do is
rescue the boot process so it lives on and not have to reinstall
everything else.

As an aside, one ought to be able to do something like
this.  It makes life a lot simpler.  Both systems are using the
same kernel and versions of the same processor the only real
differences are the UUID's.  The grub configurations of both are
the same down to the serial console.

Martin



Re: Boot Repair. Still Going Round and Round.

2021-06-04 Thread Martin McCormick
I placed the ailing drive back on a good Linux system and mounted
it as /dev/sdd1 /mnt
and ran the following commands on it:

#!/bin/sh
#mount the drive being repaired.  Uncomment lines as needed.
  sudo mount /dev/sdd1 /mnt
cd /mnt/boot
#installing to the mounted disk
  sudo grub-install \
--boot-directory=/mnt/boot/ /dev/sda

Installing for i386-pc platform.
Installation finished. No error reported.
root@wb5agz:/#

But wait.  There's more.

root@wb5agz:/# update-grub --boot-directory=/dev/sda
Unrecognized option `--boot-directory=/dev/sda'

Not good.


Continuing on to update initramfs.

#Isolate the disk.


 sudo mount --bind /dev /mnt/dev
 sudo mount --bind /dev/pts /mnt/dev/pts
 sudo mount --bind /proc /mnt/proc
 sudo mount --bind /sys /mnt/sys

That all worked.

 sudo chroot /mnt
root@wb5agz:/# 
update-initramfs -c -k 4.19.0-5-686-pae

That appears to work.


root@wb5agz:/# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19.0-5-686-pae
Found initrd image: /boot/initrd.img-4.19.0-5-686-pae
Found linux image: /boot/vmlinuz-4.9.0-9-686-pae
Found initrd image: /boot/initrd.img-4.9.0-9-686-pae

Now this ruins everything.

Found Debian GNU/Linux 10 (buster) on /dev/sdc1
done

This was a chroot environment but it appears that /dev/sdc1 was
recognized as the boot source for this external drive.  /dev is
part of the system.


The external drive normally lives in another system and
is the only boot source which is why it should be /dev/sda1.

Is there any way to run update-grub from grub itself?

The system this external drive is meant for normally only
has 1 boot drive which is the one that is currently confusing
grub.  If I could run install-grub and update-grub from the dead
system, there would not be any other bootable drives and the only
game in town would be /dev/sda for the boot record and
/dev/sda1-5 for the boot drive.

Understanding what is supposed to happen isn't
particularly difficult but getting grub to think simple and easy
Putting the drive on another system and hoping for no
contamination seems to be a lot easier said than done.

Martin



Re: Boot Repair

2021-06-03 Thread Martin McCormick
Weaver  writes:
> Well, let us know how it goes, because I've noted a few visually
> disadvantaged users on the list, and they would find the reference
> useful.

I have found out that grub is very accessible if one has
defined a serial console and there is a working serial port on
the target system.  In this case, both conditions are true.

The next thing one needs is a talking terminal which is
no problem if one has another computer equipped with a serial
terminal program like microcom or what I consider the gold
standard, kermit which apparently has too many dependencies to be
part of the Debian distributions any more.  Kermit has a decent
scripting language so one can save the commands that work, even
the commands that involve entering a huge string in which one
typo means completely starting over again.

This means you can completely repeat all the things that
work each time and feed it all in again in a fraction of a
second.  Talk about working smarter as opposed to harder.

While I call kermit the gold standard, the gold standard
for scripting is expect so one can call unix applications from
the login shell to any valid command, read the output and
generate commands as if one was there.  You can even simulate
human typing rhythms to defeat attempts to detect robots.  I'd
love to see a good CAPTCHA solver with OCR that was so good that
CAPTCHA designers would go out and find honest work but I digress.

This is actually a systemic problem these days when
dealing with sick machines.  Nobody is selling new desktops
with RS-232 native serial ports and that is fine as long as
there is an alternative way such as a bluetooth interface or ssh
network connection.  The dream solution would be a local network
login covering all the lights-out conditions such as BIOS
configuration and failure to boot as in this situation where grub
is confused.

Before I retired, some of our newest servers used
management interfaces and ipmitool where one could turn power on
and off, do BIOS setups and other configuration remotely.  It was
so cool to be able to do those things on a system in another town
without leaving the chair or grabbing a go bag and blowing a
whole day just to flip a couple of switches.  Of course,  
if it was that simple, we usually could call someone we trusted
at one of our remote campuses and ask them to flip the switches
but I'm sure you see the advantage of remote management.

For folks who are blind, you treat all those things as if
they were halfway round the Earth instead of sitting less than 1
meter apart.  They are all headless even if I can extend my arms
and touch both machines.

I think the grubdisk2 GUI app is basically a lost cause
but that's the rule when dealing with accessibility.  When
it's done wrong, you chase down endless rabbit holes all day and
muse as to how there must be some way to turn the sausage machine
backwards and have live farm animals running away from the
other end.

There was an American country and Western song back in
the early seventies which had a line at the end of each verse
that went,

"Work your fingers to the bone
What do ya' get?
Bony fingers."

I think the best course right now is to take my bony
fingers and workup a kermit script to interact with grub and get
it to produce one boot and then use the running system and grub
to fix itself.  So far, nothing else is less work.

I do appreciate your telling me about grubdisk2 because
sometimes, these things turn out to be life savers and you have
to try the rabbit holes to know for sure.

Martin



Re: Boot Repair

2021-06-02 Thread Martin McCormick
Weaver  writes:
> https://www.supergrubdisk.org/

The site recommends downloading the hybrid version of
grub2disk so that is what I did because all the Linux boxes I
have are x86 hardware and have CD technology built in.

This is quite an interesting creation.  The ISO image is
a wee bit over 16 MB in size and, as I suspected, the package
includes no screen reader modules whatsoever but I did mount the
CD after burning it and ran

find . -name "*" -print and there are serial modules sprinkled
throughout the distribution.  There are occasional references to
a serial console.

In some of the documentation I have found on the site, I
haven't found one iota of text as to how to make this console
work but if computer users who are blind can access this serial
console, that is like finding gold in them thare hills.

Tomorrow, I will look further for any hints as to how to
make the serial console appear but I actually did read the words
"serial console" on that site.

When I listed all the files on the CD, I also ran across
the following:

./boot/grub/i386-efi/morse.mod
./boot/grub/i386-pc/morse.mod
./boot/grub/x86_64-efi/morse.mod

If this has to do with outputting text in Morse Code, I
know Morse since we amateur radio operators once had to know it
to get our licenses and as long as it is sending at a reasonable
rate which, for me, stops at about 20 words per minute, is
perfectly useful to read the output.

I didn't even see any references to Morse Code on the
site so it's another way to make this useful.

The PC being used to run this CD does have a piezo buzzer
on the mother board so if there is a way to make it sing in
Morse, I may not need the serial console but it certainly would
be nice to know all there is about both of those fall-back
methods.

Thanks to anybody who knows where real sentences are that
explain the serial console or the possible Morse code output.

Martin WB5AGZ



Re: Boot Repair

2021-06-02 Thread Martin McCormick
Weaver  writes:
> On 03-06-2021 03:59, Martin McCormick wrote:
> > Is there any free utility that can run in Linux which helps one
> > rebuild a corrupted boot configuration?
> 
> https://www.supergrubdisk.org/

Thank you very much as you did answer my question
perfectly but I did not stop to think about all the possibilities
of the form the solution might take.

So, as a computer user who happens to be blind, is this
stand-alone application using a linux kernel containing the
speakup modules?

On the Linux live CD's, one can get those to talk by
striking the S key as the system boots up and then one can hear
what is on the screen as one works.

Do you know what kind of kernel it uses?

Martin



Boot Repair

2021-06-02 Thread Martin McCormick
Is there any free utility that can run in Linux which helps one
rebuild a corrupted boot configuration?

I have a disk which is currently out of it's usual place
as the boot drive for a debian system.  The past two times that
Buster updated grub, the drive became unbootable after  the
update.  The drive, itself appears to be perfectly good and I
think the problem which makes the update kill the drive is
related to a dd copy I made some years ago of one drive to
another so most of what is there is normal.

After the second killing of the drive, I started to
determine what is misguiding update-initramfs as grub-install
seems to produce a grub.cfg file that is looking for all the
right UUID's but when the system boots, grub now fails by trying
to find a UUID that must have belonged to a now deceased system
as it no longer appears in the fstab of either the newly-dead
system or another system which is alive and well and being used
to try to revive the injured drive.

Everything needed to produce a valid boot is there if
only I can run something that will reconstitude the boot image so
that it looks for the right UUID's.

I do remember seeing this message as the update ripped
through the new grub:

update-initramfs: Generating /boot/initrd.img-4.19.0-5-686-pae
W: initramfs-tools configuration sets RESUME=UUID=6f6f4373-45a3-4c16-97b4-f62613
fe6d3b
W: but no matching swap device is available.

That UUID should start with a 3, not a 6 as the blkid for
/swap is what should be there.

I am not totally sure where tthe UUID that starts with
6f6f comes from but that's also the UUID one sees when grub
crashes and burns on liftoff when trying to boot from that drive.

Martin



Grub on Dead Disk solved

2021-06-01 Thread Martin McCormick
I missed the INSTALL_DEVICE and now the script works.

The next step is to see if the drive boots but I just
forgot that one important detail.  Sorry to waste anyone's time.

Martin



Grub on Dead Disk

2021-06-01 Thread Martin McCormick
I had this same problem late last Fall on this same drive
and am not sure what is going on because there is another Linux
system here whose drive is arranged exactly the same way.  An
update in March modified grub and I didn't even give it a thought
because that system just works but after an update a couple of
days ago, the dead system starts a boot but grub complains about
neither possible image being bootable.

When I rescued that system last Fall, I was advised on
this list to do the following which worked perfectly by the way:

>If you want a grub-install command that writes /boot/grub files
>somewhere onto /dev/sdd then you will first have to mount the desired
>target boot partiton of /dev/sdd on some mountpoint that you choose,
>and then run a command something like this:
>  sudo grub-install
>--boot-directory=/some/mountpoint/where/is/the/sdd/boot /dev/sdd

I mounted the drive on /mnt so looking at /mnt gives you / and
the directory where the correct files are is then /mnt/boot or
possibly /mnt/boot/grub.

I created the following shell script which I named do_grub.

#!/bin/sh
  sudo grub-install \
--boot-directory=/mnt/boot/

I get the following no matter where I point boot-directory:

./do_grub
[sudo] password for martin:
Installing for i386-pc platform.
grub-install: error: install device isn't specified.

I don't remember doing anything else.

I think this time I may also need to do update-grub on
the currently bootless drive.

As with the last time this happened, the dead drive
passes all fsck tests and the first time I ran fsck  on it,
nothing needed fixing.

This is one of these problems that hardly ever comes up
which means that when it happens, one spends/wastes a lot of
time doing duckduckgo and puzzling.  There should be a way to
automate or at least prompt the person running the recovery
attempt to find the right information to get things up and
running if at all possible.  It's all there such as the grub file
in /etc/default which should have the uuid of the/ and swap
partitions.  Right then, one could see if the uuid's are correct
and get a proper boot going in which one could then rerun
update-grub if necessary.  Right now, it's just fumble and fiddle
and wonder what happened.

I must have something set wrong to cause the apt-get
upgrade to build a non-functional grub since the system in
question made a number of reboots successfully between about last
December 1 and now.

I also remember reading a message about problems with
swap which is on /dev/sda5 when the drive is booted.  I found the
messages log which shows swap as correctly mounted and working
before the upgrade.

Is there another log which might still have that message
from apt-get upgrade.  The message was not captured at the time.

I have been using Debian on several systems for a number
of years and this one system is the only one which seems to fall
down every time grub is touched.  That indicates I need to check
one of the configuration files which probably has a wrong
partition ID or something similar.

I am just glad I have another Linux box to mount the
no-boot drive on and that the drive, itself, does not seem
corrupted just as the last time this happened.

Thanks for any constructive ideas.

Martin McCormick   WB5AGZ



Re: Debian-friendly laptop

2021-05-19 Thread Martin Smith

On 19/05/2021 16:32, Andrei POPESCU wrote:

On Mi, 19 mai 21, 11:06:44, Celejar wrote:

On Wed, 19 May 2021 17:27:16 +0300
Andrei POPESCU  wrote:


On Mi, 19 mai 21, 07:58:05, Celejar wrote:


My previous main machine had been a T60. I gave that up when its
keyboard failed. I know that one of the main selling points of
ThinkPads is their keyboards: they are certainly very good, but
apparently they don't last forever ;)


At least they are easy to replace, or for other components (e.g. CPU
fan) the manual with detailed explanations is readily available (been
there, done that).


True, although "easy" is debatable. I suppose that if I could do it, it
must be easy :/, and I'm sure it's easier than with other machines.


Let me qualify that then: at least to replace the CPU fan assembly for
my late R61 all I needed was a suitable screwdriver, basic dexterity,
some other means to display the manual and patience.

According to the instructions one should be using new screws every time,
but reusing them once or twice is possible, unless the heads are
destroyed in the process.

There are probably tear-downs available on Youtube for those who would
like to see that for themselves.


ifixit.com is highly recommended for teardowns of lots of machines 
especially Lenovo, I have used it myself several times



--
Martin



Is there any way to snoop on a USB port?

2021-04-29 Thread Martin McCormick
I have a Windows box that has software on it which programs
two-way radios and it would be nice to know what the radio and
computer are saying to each other.

After trying a Windows application that reportedly can
capture serial port traffic, I find that it doesn't appear to
work with usb ports and unix/linux is my preferred world anyway
so is there any sort of hardware that would pass through a USB
connection from the Windows box to the radio and let me siphon
off the traffic to a linux system and log it?

The Windows app I tried to use has been around for a
decade or more and probably works well with RS-232 ports but the
traffic I need to grab comes from a usb device that creates
/dev/ttyACM0 if plugged in to a Linux box and comm2 on the
Windows system

When I tried it today, it did nothing but complain that
it was not connected.  It finally dawned on me that it probably
sees no serial ports at all as it is supposed to automatically
find and log all port I/O and this is a relatively new HP
Pavilion desktop computer which has no native RS-232 ports or
parallel ports on it and, even if it did, the connection from the
radio to the usb port is a usb plug with the usb hardware in it
and a cable that plugs in to the radio that would most likely
not be practical to tap.

Thanks for any good thoughts.

    Martin  WB5AGZ



fail2ban Squawk

2021-03-26 Thread Martin McCormick
I was attempting to setup a systemd timer and checking the syntax
of that when I ran across a complaint from the fail2ban program
which is a bit confusing.  It reads:

/lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy 
directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → 
/run/fail2ban/fail2ban.pid; please update the unit file accordingly.

So I looked in to that file and the actual line they were
referring 2 is numbered 15 and points fail2ban.pid to
/var/run/fail2ban/fail2ban.pid where it certainly lives with a
recent date.  What is the problem exactly?

Enquiring minds want to know.

Thanks for any and all constructive ideas.

Martin McCormick



Re: [OFFTOPIC] Re: [?] Why should Distros be called as i386 for a 32-bit PC, and as amd64 for a 64-bit PC, when Intel Core PCs are also 64bit systems

2021-03-16 Thread Martin Smith

On 16/03/2021 12:20, songbird wrote:

Nicholas Geovanis wrote:

On Sun, Mar 14, 2021, 1:50 PM Stefan Monnier 
wrote:

...

FWIW And MIPS was there even a bit earlier with their R4000 (tho the
software support for it only appeared some years later: they first
wanted to have an installed base to which to deploy the software), which
I believe was the first 64bit microprocessor.


And the demise of the DEC Alpha was quite unfortunate. It was super-fast
and OSF/1 was rock-solid. But DEC lost the competitive bid on that project
and Sequent/Dynix, based on hundreds of 486 CPUs, won it. Now owned by IBM
and deep-sixed: They really bought the customer base instead.


   i wondered what happened to them, but didn't look into it.
when the university got rid of the mainframe we switched to
Sequent machines.  the two cabinets replaced the entire
floor of Univac hardware (and all the AC and power costs).
the other nice thing was not listening to those printers
hammering away.


when I was working in the Mullard stores in the 60's they had an 
enormous computer in a very large air conditioned hall about a mile from 
the factory, I dont know what it precisely was but it ran off punched 
tape, and in a side room at the stores we have what was called a line 
printer that printed out invoice/advice note pairs it really was like a 
machine gun printing a line at a time





--
Martin



Re: is it possible to add a secondary disk to an existing debian systems and install programs to the secondary disk

2021-02-27 Thread martin f krafft

Regarding the following, written by "Semih Ozlem" on 2021-02-26 at 08:54 Uhr 
+0300:

lvs is in which package?


If it's not installed on your system (the package being `lvm2`), 
then my suggested fix won't work for you anyway, since your system 
isn't set up to use Logical Volume Management.


--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
"cs class at 8:30am. ugly. if you can wake up early enough to get

 good grades here, you need to develop hacker habits..."
 -- jeff bailey on #debian-devel


digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


Re: is it possible to add a secondary disk to an existing debian systems and install programs to the secondary disk

2021-02-23 Thread martin f krafft

Semih,

Maybe I can provide a quick and easy solution, depending on what 
happens when you type


```
$ sudo lvs
```

into a terminal. Could you let us know what that spits out?

Thanks,

--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
the security, stability and reliability of a computer system

is reciprocally proportional to
the amount of vacuity between the ears of the admin.


digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


remove me from this list

2021-01-22 Thread J B Martin

I do not use this product.

Please remove my name.

Thank you.

Bryant Martin

On 1/22/2021 7:59 AM, Andrei POPESCU wrote:

On Vi, 22 ian 21, 08:08:57, steve wrote:

Le 21-01-2021, à 09:45:18 +0200, Andrei POPESCU a écrit :


On Jo, 21 ian 21, 08:34:34, steve wrote:

I have rebooted with udev_log=debug in /etc/udev/udev.conf. I see

Jan 21 08:15:28 box systemd-udevd[607]: sdc6: Failed to update device symlinks: 
Too many levels of symbolic links
Jan 21 08:15:28 box systemd-udevd[607]: sdc6: Preserve already existing symlink 
'/dev/disk/by-path/pci-:00:17.0-ata-2.0-part6' to '../../sdc6'
Jan 21 08:15:28 box systemd-udevd[607]: sdc6: Preserve already existing symlink 
'/dev/disk/by-partuuid/7acd2c90-b372-4bfb-a517-e14d2a17e342' to '../../sdc6'
Jan 21 08:15:28 box systemd-udevd[607]: sdc6: Preserve already existing symlink 
'/dev/disk/by-path/pci-:00:17.0-ata-2-part6' to '../../sdc6'

And the same for other partitions which are all part of a Raid1 array.
Other partitions are not impacted. So I guess this is related.

Could you inspect the /dev directory from a live image or similar (i.e.
with the affected system not running)?

Yes I can do that. What should I look for?
  
I'm guessing it should be empty ;)


At least in buster /dev is a 'devtmpfs' mounted over /dev (is this the
same for you?).
  

Do you have any custom udev rules or any other custom scripts, services,
etc. plugged into the early startup?

Don't know:

tree /etc/udev
/etc/udev
├── hwdb.d
├── rules.d
│   ├── 51-android.rules
│   ├── 55-Argyll.rules
│   ├── 69-libmtp.rules
│   ├── 70-persistent-cd.rules
│   └── 70-persistent-net.rules.old
└── udev.conf

Maybe the output of 'udevadm test /sys/block/sdc/sdc6' can provide some
interesting information, as well as 'ls -l /dev/disk/by-*', otherwise
I'm out of ideas.

Kind regards,
Andrei


--
Joseph Bryant Martin
USA 804 223-0325
Info Voice
804 334-4309



pwc.ko bullseye doesn't work

2021-01-22 Thread Martin Bitter
Hello Team!

Using reportbug I was asked which package the bug occurred.
So I types a 'dpkg -S /lib/modules/5.10.0-1-amd64/kernel/drivers/media/usb/
pwc/pwc.ko' which gave me 'linux-image-5.10.0-1-amd64'. But this package is 
not listed by  https://packages.debian.org/search?
suite=bullseye&arch=amd64&mode=exactfilename&searchon=contents&keywords=linux-
image-5.10.0-1-amd64. Also I didn't find it in the packages listed by 
reportbug.
So I choosed 'other'. Now I'm stuck. Which package should I choose?

Problem in short:

I'm using bullseye 
https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/bullseye_di_alpha3+nonfree/amd64/iso-dvd/firmware-bullseye-DI-alpha3-amd64-DVD-1.iso

I connected to a USB-Webcam (Philips (or NXP) SPC 900NC PC Camera / ORITE CCD 
Webcam(PC370R) that is recognized by the system (demsg: pwc: Philips SPC 900NC 
USB webcam detected. pwc: Registered as video0.)

When I try to grab videos or pictures using either vlc or cheese or firefox 
etc. I get the messages "couldn't open". dmesg reports:  pwc:  Failed to 
allocate urb buffer 0

I mention that it works fine with SUSE Leap 15, and with Debian with kernel-
version 5.9.0-4-amd64.

Any help to use reportbug appreciated.

Kind regards.

martin





-- 
getippt im 9-Fingersystem von mir selbst.




remove

2020-12-23 Thread J B Martin



--
Joseph Bryant Martin
USA 804 223-0325
Info Voice
804 334-4309



Re: Web-bot tarpit aka spider trap (was: swamp rat bots Q)

2020-12-06 Thread Martin McCormick
It's nice to see that I am not the only sick puppy out there.

At 69 years old, I still don't have much trouble with
getting in touch with my inner 12-year-old when it comes to
intrusive marketing which is so prevalent these days.

I found our old dial-up modem in a box of odds and ends 2
years ago and wondered if it could read callerID tones sent after
the first ring.  It can so I started on a perl program that
initializes the modem for callerID and then compares the strings
received with a pair of files, one of which is called scum and
contains callerID name packets of folks we don't want to talk to.
The other is called good and looks for names of friends or anyone
else we like hearing from.  It is actually scanned first and
causes the program to abort.

If anyone's name matches a name in scum, or the caller's
ID appears to be blocked or, in one case, matches a whole
exchange, (first 3 digits after the area code), I call a
subroutine that makes the modem answer for half a second then
drops the call.

We were bombarded with garbage calls all day long until
the US presidential election and it was so satisfying to hear the
program kill the call by answering just as the second ring began.

I also installed subroutines that looked for the word
"SPAM?" just before the name or "ROBO?" also just before the
name.

We now get very few unwanted calls but occasionally,
we'll get a call from lala-land from someone we don't know who
lets the phone ring until the answering machine picks up and then
fails to leave a message and I tell my wife, "I'll go put them on
the juke box." especially if it looks like the name of a business
with which we have no relationship.

    Our phone is very quiet these days except for legitimate
calls.

Martin McCormick



Re: Cron Jobs and Time Zones Has Anything Changed?

2020-12-06 Thread Martin McCormick
Andrei POPESCU  writes:
> On Jo, 03 dec 20, 07:39:14, Martin McCormick wrote:
> >
> >   So, I need to read more general information about the
> > differences between systemd and what we've been using up to
> > recently.
> 
> The Wikipedia page and/or https://systemd.io might be a good place to
> start.
> 
> Kind regards,
> Andrei

I've had a chance to investigate this more and the first
thing I did was to go to wikipedia which told me about systemd,
the on-going argument about it VS older ways to build unix-like
systems and a time line when systemd began to take hold which was
around 2015 when I retired from work so it kind of sneaked up on me
and I didn't realize that I've been using it for 5 years, well,
at least I didn't think much about systemd having different
resources.

I've used udev rules in making sound cards come up in the
right order and that's totally a systemd thing.

While searching for ways to use cron with different time
zones, I found out about something called systemd timers just
mentioned in this thread and it appears they definitely will do
the job but one must magically have made the connection between this
concept and the concept that cron, the usual go to resource for
making lighting come on at a certain time, purging stale files or
backing up the system now has a new kid on the block called
systemd timers.

One can even list all the active systemd timers

https://www.maketecheasier.com/use-systemd-timers-as-cron-replacement/

$ systemctl list-timers

And, sure enough, I had a number of them ticking away.

An on-going problem about self-education is that it's
easy to limit the scope so much that we miss connections.
Systemd timers doesn't even sound like a replacement for cron but
think of it as cron on steroids.

One of the things in the wikipedia article about systemd
was a complaint by someone that it's just too complicated.  All I
can say is that maybe or not that is true but that's just life.
Start simple.  Make more and more complexity as problems with
simple show up.  One day, try to make things simple again.  Lot's
of luck with that.

I'm not so sure that being blind makes nearly as much
difference these days as it once did, but making connections that
relate one knowledge base to another in a meaningful way will
always be a problem for us.

Martin



Re: Cron Jobs and Time Zones Has Anything Changed?

2020-12-03 Thread Martin McCormick
> On Wed, Dec 02, 2020 at 01:58:45PM +, James B wrote:
> > This might be wrong, but as far as I understand doesn't systemd
> > now have the ability to manage cron jobs (as well as mount points,
> > home folders and other things)?. Is there anything in this newer
> > functionality that might make such a thing (re the request at the
> > beginning of this thread) possible?
> 
> Yes, I pointed this out to OP last time OP asked this exact question
 just a few days ago, so I don't know why they are asking again.

I am guilty as charged but haven't yet found the relevant information
as to how systemd helps solve this issue.

Systemd is praised to the rooftops by some and cursed
just as vehemently by others and it is what we are now using but
it feels mostly like unix has always felt.

I am obviously suffering from the worst sort of ignorance
syndrome which can really bite in that sometimes, we have an idea
what we don't know and other times, we don't even know that we
don't know and that's really frightening.

So, I need to read more general information about the
differences between systemd and what we've been using up to
recently.

Martin McCormick



Re: Cron Jobs and Time Zones Has Anything Changed?

2020-12-02 Thread Martin McCormick
Greg Wooledge  writes:
> I was vaguely thinking of a similar approach.  Set up a job that runs
> every hour, or across a set of hours that will cover all the possible
> cases that you care about, in your crontab.  Within the job itself,
> set a TZ variable and determine the time in that time zone by whatever
> means necessary, and then either abort or continue based on that time.
> 
> This is also similar to how one approaches a complex date-based task
> such as "run on the second-to-last day of each month".  For that one,
> you can set up the job to run on the 27th through the 30th every
> month.  Then within the job itself, determine whether it's the
> correct day, and abort if it's not.

What I was thinking of is a modification to cron which
should integrate nicely with what cron already does.

Crontab would have a new field at the beginning of each
line which could normally be left at "default" which would be the
normal behavior that we are used to.

If someone wanted to run a job at 15:00 each day in let's
say Japanese time, the first field of the line would read
Asia/Tokyo instead of default.  The line might look like

Asia/Tokyo 28 15 * * 1-5 sh -c ". $HOME/.master.env;beep -f700 -l500"

Since all unix-like systems start out with UTC and use
those /usr/share/zoneinfo data base files to calculate what local
time is, that information is handy  in the time() function.
localtime(time) gets you the adjusted number of seconds for your
locale arranged in a structure containing fields for the current
year, day of month, day of the week plus the hours, minutes and
seconds with the adjustment for Summer or Winter for that zone.

The sample line above would cause cron to grab the
current epoch in seconds (UTC), feed that to localtimebased on
rules for /usr/share/zoneinfo/Asia/Tokyo and then all those
values to match the fields on the rest of the line.

The time of 15:28 or 3:28 PM in Tokyo occurs around 01:28
in the Central US time zone and that's when your computer would
have beeped.

This would happen Monday through Friday Japanese time
which still would be Monday through Friday in the US but early in
the morning.  If the time referenced in Tokyo had been 7:00 in
the morning , it would happen the previous evening in the US.  As
long as one designated the time zone correctly and doesn't forget
that 07:00 on Monday morning in Japan equals 5 or 6 o/clock on
the evening of the previous day, it should just work.

I haven't looked at the C code for cron, but I have
written a few perl scripts that do things with time and dates and
the current epoch-based number of seconds since utc Midnight January
1, 1970 is based on the C modules such that one's current
wall-clock time is time(localtime).  Just a thought

Martin



Cron Jobs and Time Zones Has Anything Changed?

2020-12-02 Thread Martin McCormick
In a recent discussion, someone indicated that there might be a
way to set individual parts such as accounts on a unix system so
that cron could use another time zone if needed to kickoff jobs
on that system based on the time in another country.

As far as I understand cron, one can set the system's
time zone to only one value which is usually one's local clock
time and that works very well since system logs and cron jobs all
agree with what is appropriate for one's location.

I record a news broadcast from one of the BBC services
every week day at 17:45 British time.  When Europe and North
America stop or start shifting daylight in Autumn or Spring,
there's a really good chance of missing some of the broadcasts if
one doesn't think about it since these shifts don't all happen on
the same time.

One can certainly get the time anywhere as recently
discussed by setting the TZ environment variable but, if you tell
cron to trigger a job at 17:45, it only knows when that is based
on the entire system's local time.

Has anything changed recently to make this logic
obsolete?

In my case, I just have an old Linux box for which I set
it's system time zone to Europe/London and call it good but this
could get out of hand if one had more than 2 or 3 such schedules.

One could also setup VM's if you have the memory to spare
but this adds a lot of resource usage and complexity to the job
at hand so my question is basically, has anything fundamentally
changed in the way cron is used?

This is not a complaint at all.  I was first introduced to
unix-like systems in 1989 and immediately knew that this was the
sort of OS I wanted to stick with in amateur radio and technical
tinkering in general.

Martin McCormick   WB5AGZ



Re: Fixing a Grub Foul-up Solved!

2020-12-01 Thread Martin McCormick
David  writes:
> Your lack of success is because the the command you used has designed
> behaviour to install the grub bootloader to the boot sector of
> /dev/sdd, and also install the grub files you listed into the current
> system /boot/grub (which was not on sdd at the time). That is the
> reason why you see those files on /dev/sda1, because it was the boot
> partition at the time you ran the command.

Aha!! that makes perfect sense now that I think a bit.
> 
> If you want a grub-install command that writes /boot/grub files
> somewhere onto /dev/sdd then you will first have to mount the desired
> target boot partiton of /dev/sdd on some mountpoint that you choose,
> and then run a command something like this:
>   sudo grub-install
> --boot-directory=/some/mountpoint/where/is/the/sdd/boot /dev/sdd

I tried it and by Joe, it wrote to the correct drive so I
don't feel quite so paranoid about using grub.

Interestingly, I goofed again and grub ended up in what
is the / directory instead of /boot/grub so it still didn't work
but I knew immediately that the new grub was working because
there was no error message about symbols not found, etc. 

I mounted the drive back on the good system and simply
removed the grub from the top of the tree and then did the
grub-install command again but thihs time, I installed to
/mnt/boot.

It wrote to /boot/grub as it should have and the system
came right up.

There was a minor glitch when I powered the box up as the
keyboard reported a stuck condition and advised me to press F1 to
continue.  I thought this was a bit amusing since the keyboard
appeared to be malfunctioning but F1 did the trick and about a
tenth of a second later, I heard the beep that grub plays when
the kernel is about to fire off.

In short, the faulty grub that made it onto the system
was all that was really wrong.

Thanks to a lot of you, I appreciate grub more as this
has been quite a little mini course in what it does.

Martin



Re: Fixing a Grub Foul-up, Not There Yet.

2020-11-30 Thread Martin McCormick
I am going to respond to one of my earlier posts as it doesn't
help things at all to spread misinformation which I am guilty of,
here.
"Martin McCormick"  writes:
> I appear to be using grub, not grub2.  

No.  It's grub2.  Old Grub is now grub-legacy and is
probably a dead fly on somebody's wall by now.

> There's an extra little wrinkle in that, as a computer
> warier who happens to be blind, grub isn't really accessible in
> that you can not get direct access to it via a serial port and
> terminal, say, from another computer that is actually working.

I was simply wrong there.  Of course, one has to have the lines now
in /etc/default/grub that used to be in menu.lst but the idea is
the same.  If one has a serial port which is available at boot
time, grub should work headlessly.

The issue with the instance of grub that seems to have a
run-time error due to a problem with modules, may be unusual
because it may actually be a goner before it runs since it
doesn't get to load it's modules.

Martin



Re: 780 files in /usr/share/zoneinfo/

2020-11-30 Thread Martin McCormick
Michael Stone  writes:
> The kernel, compressed, is larger than that. The initrd needed to boot the
> kernel is also typically larger than that. A modern system has more CPU
> cache than that. At some point trying to save bytes is a waste of 
> developer
> and administrator effort, and 3.5MB in 2020 is well past that point. If 
> you
> want a minimal system, debian isn't for you. Instead, you'll need to hand
> craft every file to make sure it isn't "wasting space". If that's your
> thing, great. But it's just not a focus for debian.

About the only place one still needs to think this way is
with embedded systems where the computer is there to manage a
machine of some kind, anything from a lathe to a food processor
to a cement mixer, whatever .  

General-purpose computers are optimized to have as many
resources as one can cram in to a higher and higher-density box
so a few MB here or there aren't noticed but embedded systems are
optimized with different priorities and one may discover that
this box may be lightning fast but a bit skimpy on data storage.

I am thinking of things such as cable TV boxes and
dedicated audio-visual appliances that use DSP to emulate complex
and expensive hardware by using mathematical algorithms that
cause the system to decode digital TV signals or route internet
traffic rapidly.

If you aren't in to trying to modify some sort of
embedded system to do something it wasn't originally designed to
do then ram and storage are getting cheaper by the day and some
things just aren't worth worrying about.

Martin McCormick



Re: 780 files in /usr/share/zoneinfo/

2020-11-30 Thread Martin McCormick
Andy Smith  writes:
> Hi Martin,
> 
> On Sat, Nov 21, 2020 at 08:48:51PM -0600, Martin McCormick wrote:
> > find . -name "*" -exec ls -l {} \;  \
> > |grep -F / \
> > | awk ' { total += $5 } END { print total }'
> >
> >   That usually just adds the sizes of all the files it can
> > find all the way through the tree.
> >
> >   If this is not an accurate way to determine how many
> > bytes there are in a directory then that would be the reason for
> > the discrepancy.
> 
> The same file can be reached by multiple names. So by doing this you
> end up, in this case, with a ~256x amplification.
> 
> A simple "du -sh" does a better job here!
> 
> > cron only works in the time zone for wherever the TZ for the
> > system is set.
> 
> Ah, I see. I've never tried it but I believe that systemd timers can
> have a time spec that includes time zone, so you can set timers that
> fire on a different time zone to that used by the rest of the system.
> 
> $ systemd-analyze calendar '11:00 Europe/London'
>   Original form: 11:00 Europe/London
> Normalized form: *-*-* 11:00:00 Europe/London
> Next elapse: Sun 2020-11-22 11:00:00 UTC
>From now: 6h left
> 
> Cheers,

I do appreciate being corrected, here.  What we really want to
know, here, is how much precious disk space is occupied by
whatever data base we are interested in.  Links make copies of
files appear to exist when the data were only written once even

Martin



Re: Fixing a Grub Foul-up

2020-11-29 Thread Martin McCormick
Dan Ritter  writes:
> Here's what you can do:
> 
> On a good system, mount your drive. Let's pretend that it's
> recognized as /dev/sdg, and you have a /boot on /dev/sdg1 and
> a root partition on /dev/sdg2.
> 
> ls -al /dev/disk/by-partuuid/| grep sdg
> 
> will get you the partition UUIDs for that disk. One of them will
> be for /dev/sdg1 and another for /dev/sdg2.
> 
> The kernel really likes these as root filesystems identifiers.
> The kernel parameter that you put in /etc/default/grub is
> 
> ROOT=PARTUUID=dddf0dd6-dd6b-d542-9eac-015a765cd6f6
> 
> although you will want to substitute in the appropriate
> part-uuid for /dev/sdg2.
> 
> Finally, you can run
> 
> grub-install /dev/sdg
> 
> to get a new copy of grub into the master boot sector of the
> disk.
> 
> Hope that helps,
> 
> -dsr-

This does help a lot and I have read similar examples how
to work on a drive that has been mounted on a different system
than the system on which it will ultimately be used but I am
still doing something wrong and the results are dangerous to say
the least.

At one time, the otherwise good drive was mounted on
/dev/sdd with the root partition on /dev/sdd1.

I typed sudo grub-install /dev/sdd.  It ran for a few
seconds, announced that grub was installed without any errors and
exited.

After looking at /dev/sdd1/grub and seeing no updated
date stamps, I had a sinking feeling and looked at /dev/sda1
which is the boot partition on the system I haven't killed yet
and, sure enough, grub-install had run on that drive.

$ ls -lt /boot/grub
total 2372
drwxr-xr-x 2 root root   12288 Nov 29 11:26 i386-pc
drwxr-xr-x 2 root root4096 Nov 29 11:26 locale
-r--r--r-- 1 root root7276 Sep  3 05:43 grub.cfg
-rw-r--r-- 1 root root 2396122 Sep  3 05:43 unicode.pf2
-rw-r--r-- 1 root root1024 Jun 29  2019 grubenv
drwxr-xr-x 2 root root4096 Jun 29  2019 fonts

It didn't even touch any part of /dev/sdd1.  With
trepedation, I rebooted the good system and thankfully, it came
right up since I hadn't modified /etc/default/grub.  That was a
bit of good luck but I thought it was supposed to write to /dev/sdd1
which would translate to /dev/sda1 when the drive was connected
to the controller of the system that is presently belly up.

I suspect the problem is the issue with the modules which
another poster described.

What am I failing to do to make the changes occur on the
designated drive?  Having it write this kind of stuff to drives
other than the desired target is scary.

Thanks for a good explanation and I may not be so lucky next
time.

Martin



Re: Fixing a Grub Foul-up, Not There Yet.

2020-11-21 Thread Martin McCormick
Dan Ritter  writes:
> in /boot/grub/menu.lst
> 
> serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
> terminal serial
> 
> (yes, that's two lines)
> 
> I hope that helps.
> 
> If you want the option of either serial or console access,
> replace the second line with
> 
> terminal --timeout=10 serial console
> 
> The default will be serial, but if you press a key on the
> console within 10 seconds, it will go there instead.
> 
> -dsr-

Thank you.  That is a tremendous thing to know.  I
thought there was something serial in grub but I couldn't
remember.  This is the first time I ever had any real trouble
with grub and I can put this drive back on the working linux box
and modify that file, assuming the change would take place on the
next run of grub.

Martin



Re: 780 files in /usr/share/zoneinfo/

2020-11-21 Thread Martin McCormick
Andy Smith  writes:
> Hi Martin,
> 
> Are you sure about this? There is no Debian or Ubuntu host I have
> access to that has a /usr/share/zoneinfo/ that contains more than
> 4MiB of data. For yours to have 256 times this much is quite an
> aberration. What did you type to determine that your
> /usr/share/zoneinfo/ has 1GiB of data in it?

find . -name "*" -exec ls -l {} \;  \
|grep -F / \
| awk ' { total += $5 } END { print total }'

That usually just adds the sizes of all the files it can
find all the way through the tree.

If this is not an accurate way to determine how many
bytes there are in a directory then that would be the reason for
the discrepancy.

> 
> >   I've wished one could just set certain parts of the
> > computer to other times but I can also understand why this could
> > be a problem.
> 
> You can set any process to have a different time zone by use of
> environment variables.
> 
> $ date
> Sat 21 Nov 21:34:55 UTC 2020
> $ TZ=America/Los_Angeles date
> Sat 21 Nov 13:35:04 PST 2020

That is very true but cron only works in the time zone
for wherever the TZ for the system is set.

On the system I have set to British time, my local login
shell has TZ=America/Chicago so I read Central Standard Time for
file time stamps but if I set a cron job, it runs on either
British Summer Time or British standard time which is the same as
UTC during Winter.


> Cheers,
> Andy



Re: Fixing a Grub Foul-up, Not There Yet.

2020-11-21 Thread Martin McCormick
Felix Miata  writes:
> Save yourself many keystrokes by using the symlinks in the root directory 
> instead
> of the long-winded full version-named /boot/vmlinuz-4.19.0-5-686-pae

This is wonderful to know and in the root or / directory of this
disk, there is 
initrd.img, initrd.img.old, vmlinuz and vmlinuz.old

Those all point to valid targets.  I presently have the
no-boot disk mounted on a working linux system where it's root
directory is /dev/sde1 and the current links plus the old links
are as follows:

lrwxrwxrwx   1 root root32 Jun 26  2019 initrd.img -> 
boot/initrd.img-4.19.0-5-686-pae
lrwxrwxrwx   1 root root31 Jun 26  2019 initrd.img.old -> 
boot/initrd.img-4.9.0-9-686-pae
lrwxrwxrwx   1 root root29 Jun 26  2019 vmlinuz -> 
boot/vmlinuz-4.19.0-5-686-pae
lrwxrwxrwx   1 root root28 Jun 26  2019 vmlinuz.old -> 
boot/vmlinuz-4.9.0-9-686-pae

I finally have found something that may be a clue to
what's actually wrong. While trying to manually make that drive
boot, I got this:

grub rescue> set prefix=(hd0,1)//boot/grub
grub rescue> insmodnormal
Unknown command `insmodnormal'.

That was a good old syntax error so I tried

insmod normal with a space
grub rescue> insmod normal
error: symbol `grub_calloc' not found.

I'm pretty sure that shouldn't happen at all and is
what's behind the failure to boot.

I haven't found any uuid's that are different although I
first thought I had as I looked at some links which had uuid's
but they were good when I looked at the actual partition.  It's
easy to go down a rabbit hole if one doesn't watch out.

I think there may be something about grub that got left
out or changed during the upgrade.

Martin

Martin



Re: 780 files in /usr/share/zoneinfo/

2020-11-21 Thread Martin McCormick
 writes:
> Suppose a hacker logs into your computer from far, far away, say
> from somewhere in Nepal.
> 
> Surely you'd want this person to see the time adapted to their
> locale? That's the least courtesy you can be expected to provide?
> 
> ;-P
> 
> Now putting my tongue out of my cheek again: in Unix, a computer
> "has" no time zone or language -- people have those. And since,
> again in Unix, several people can be logged in [1] at the same time,
> it's up to the user's environment [2] to decide on time zone,
> language, etc.
> 
> This concept is surprising at first coming from other cultures,
> where Microsoft was happy to sell you another complete version
> of Windows if you wanted your computer to talk to you, e.g.
> Portuguese (and yet another for Brazilian Portuguese, greedy as
> they are).
> 
> Of course, Microsoft has caught up (they are trying since the
> mid-90s), but not without some spectacular messups. Remember that
> one where (I think it was Windows 95), while trying to automate
> the spring DST transition were spotted dithering endlessly between
> 2AM and 3AM?
> 
> Unix has had this abstraction always: there's the internal time,
> and there's the time shown to the user, which depends on the user.
> 
> There's the error itself, and there's the error message shown to
> the user. And so on.
> 
> Cheers

I just cd'd to that directory and it looks like there's
about 1 GB there.  I think it is cool to have all that info and I
even configured a linux system for BST so cron would record shows
I was interested in from the BBC.

It works perfectly when we go from Summer time to
standard time in Winter because North America and the UK don't
switch at the same time but it all works.

I've wished one could just set certain parts of the
computer to other times but I can also understand why this could
be a problem.

By the way, I have never been outside the United States
but am an amateur radio operator and learned at a very young age
to appreciate those time zones if one wants to know when to
listen for interesting things.

Martin



Fixing a Grub Foul-up, Not There Yet.

2020-11-21 Thread Martin McCormick
I did some duckduckgo-ing about grub rescue and found useful
things but am still dead in the water.

I appear to be using grub, not grub2.  One of the
articles I found had an example of how to use grub rescue that all
works except, of course, for the actual booting of the kernel.

There's an extra little wrinkle in that, as a computer
warier who happens to be blind, grub isn't really accessible in
that you can not get direct access to it via a serial port and
terminal, say, from another computer that is actually working.  A
really clumsy work-around does work off of the dead computer in
that it is old enough that the Print-screen key dumps an ASCII
character dump of the screen to the parallel printer output every
time you press Print-screen.  I found out after connecting a
second computer to a parallel-to-serial converter that I was in 
grub rescue>  mode.

Each time one types on a keyboard attached to the dead
computer, one then must hit Print-screen to find out whether it
goes or blows.

This is slow and awkward because there is no
character-by-character feedback so if you hit the n instead of
the m, you don't find out that it's a no go until you read the
whole screen.

Also the Tabs you hit don't show up in the output so
it'salloneunbrokenline.

Is there a way I can write the commands in to a text file
that I can call to at least know what commands I am executing in
grub rescue and do in a tenth of a second what it takes minutes
to do otherwise?

What I have right now is a text file called stuffcommands
and it is sitting in the boot level of the dead boot disk.
When I had the drive mounted on a working system, I did chmod +x
stuffcommands but since there are no shells running, I just put
the following lines in the file.  Everyone of these commands
works when typed in except for the final one which boots the
kernel.

What I need to type in with, of course, no mistakes looks
like:

set root=(hd0,1)
linux   (hd0,1)/boot/vmlinuz-4.19.0-5-686-pae   root=/dev/sda1

#I have yet to see this one work.

initrd (hd0,1)/boot/initrd.img-4.19.0-5-686-pae boot

Here is a screen capture of what pressing Print-screen
produces  The first line is that error message and is probably
the clue as to what went wrong.  The successful commands were
laboriously typed in by hand once again to prove they work
although by now, I know the kernel version number about as well
as my last name.

error: symbol `grub_calloc' not found.  

That's the smoke that the booster is going to blow up on the
launch pad.

Entering rescue mode... 
grub rescue> ls 
(hd0) (hd0,msdos5) (hd0,msdos1) (fd0) (fd1) 

The root partition is Partition #1.

grub rescue> (hd0,1)/boot/stuffcommands 
Unknown command `(hd0,1)/boot/stuffcommands'.   

Ah, if only.  Those few lines would make each retry so much more
efficient.

grub rescue> set root=/de/sda1  

It worked.

grub rescue> linux(hd0,1)/boot/mlinuz-4.19.0-5-686-paeroot=/de/sda1 

And that one worked!

grub rescue>

That much works and it would be so nice not to have to repeat
those steps every time.  Is there a way to call that
stuffcommands text file so that grub thinks it's coming from the
keyboard?


I think I'd like a keyboard that one can store commands
like this in so as to keep the donkey work down to the problem
lines.

Actually, if only grub could be made to operate remotely,
I'd just script all the stuff that works and also know if I
fat-fingered anything when it happens so one could backspace and
fix it the way we fix any typing error.

Before I retired in 2015, I occasionally had to setup new
servers and these had lights-out minicomputers that helped one 
remotely access even a powered-down box in another state,
province or country.  The linux kernel, itself can easily be
configured to be accessible via a serial port or on the local
console so grub sorely needs headless capabilities for those rare
times where stuff just doesn't come back from a reboot.

    I appreciate the good suggestions I have gotten from
several of you so far.

Martin McCormick



Re: Fixing a Grub Foul-up

2020-11-16 Thread Martin McCormick
Dan Ritter  writes:
> Here's what you can do:
> 
> On a good system, mount your drive. Let's pretend that it's
> recognized as /dev/sdg, and you have a /boot on /dev/sdg1 and
> a root partition on /dev/sdg2.
> 
> ls -al /dev/disk/by-partuuid/| grep sdg
> 
> will get you the partition UUIDs for that disk. One of them will
> be for /dev/sdg1 and another for /dev/sdg2.
> 
> The kernel really likes these as root filesystems identifiers.
> The kernel parameter that you put in /etc/default/grub is
> 
> ROOT=PARTUUID=dddf0dd6-dd6b-d542-9eac-015a765cd6f6
> 
> although you will want to substitute in the appropriate
> part-uuid for /dev/sdg2.
> 
> Finally, you can run
> 
> grub-install /dev/sdg
> 
> to get a new copy of grub into the master boot sector of the
> disk.
> 
> Hope that helps,

It certainly does!
First, thanks to all who answered so far.  I think you have
perfectly described what is causing the problem although grub is
not high in my knowledge base like it probably should be.

When I read /boot/grub/grub.cfg, I see
references to a uuid that isn't any of the partitions that have
UUID's.  On my disk, Partition 1 is / and blkid spits out a
number that starts with 9F.  Partition 2 was created to get an
extended partition of 5 which is swap space so 1 and 5 have
UUID's.  The UUID referenced in grub.cfg starts with 3.
The rest of this message consists
of grub.cfg.

Martin

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
insmod all_video
  else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
  fi
}

serial --speed=115200 --unit=1 --word=8 --parity=no --stop=1

terminal_input serial
terminal_output serial
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
set timeout=5
  fi
fi
play 480 440 1
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-3584c851-6616-464f-8a8e-2d634fca5969' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 
--hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  
3584c851-6616-464f-8a8e-2d634fca5969
else
  search --no-floppy --fs-uuid --set=root 
3584c851-6616-464f-8a8e-2d634fca5969
fi
echo'Loading Linux 4.19.0-5-686-pae ...'
linux   /boot/vmlinuz-4.19.0-5-686-pae 
root=UUID=3584c851-6616-464f-8a8e-2d634fca5969 ro console=tty0 
console=ttyS0,115200n8 quiet
echo'Loading initial ramdisk ...'
initrd  /boot/initrd.img-4.19.0-5-686-pae
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-3584c851-6616-464f-8a8e-2d634fca5969' {
menuentry 'Debian GNU/Linux, with Linux 4.19.0-5-686-pae' --class 
debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-4.19.0-5-686-pae-advanced-3584c851-6616-464f-8a8e-2d634fca5969' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; 
fi

Fixing a Grub Foul-up

2020-11-16 Thread Martin McCormick
I have goofed, I think.  There is a serca-2000-vintage Dell
Optiplex that has been working fine up to yesterday when I did
the usual apt-get update followed by the apt-get upgrade on
buster.  The update and upgrade appeared to work.

One of the things that got visited was grub and it was
then that I was reminded that there was another drive in the
system that had a bootable image of buster on it also.  Grub
reported seeing it on /dev/sdc which is coorrect.

This particular system has a zip drive that always shows
up as /dev/sdb so the next hard drive after /dev/sda is /dev/sdc.

I rebooted to make sure all was well and waited and
waited . . .

The system sits there like a bump on a log.

I have a usb device that lets one mount IDE and SATA
drives that are outside the system so I pulled the sata drive
which is the boot drive for the now dead system and plugged it in
to the usb converter.

the drive breezes through fsck and looks perfectly
normal.

I looked at /boot/grub/grub.cfg which one is not supposed
to edit as grub builds it based on /etc/default/grub which one
does edit.

If I was to mount that partition on a working system, it,
of course, will have a different device number such as /dev/sde1
instead of /dev/sda1 which it should have when booting up the
system it normally runs in.

Is there a safe way to mount this drive, possibly using
chroot, re-run grub-config and get the drive bootable again?

If I look at grub.cfg and /etc/default/grub, everything
looks as if it should work but it doesn't.

I think boot problems are some of the most agrevating
issues.  They are true show stoppers.

I've got backups but that's beside the point.  Unless I
can fix whatever happened, it's going to be quite a time waster.

Thanks for any constructive suggestions.

Martin McCormick



Bug report - Samba version 4.9.5-Debian

2020-10-04 Thread Martin Kormunda
Hi,

Sorry, I am not able to use reportbug.

I have installed two debian based OS in Proxmox system. I have a big
issue  with both of them.
1.  Turnkey 16.0  Fileserver
2. OpenMediaVault 5.5.12-1

Both of them are using Samba version 4.9.5-Debian.

It works well in both systems until I try to access, upload or
download more files (35 000 or more)  in total about 300 GB.
Then the samba crashed!!!  The time intervat to crash is various from
20 minutes to 2 hours from try to try.
But the system is not usable as a file server for my use. I can
reproduce the crash but the detail log is too huge.
Is it only my problem?
What should I try?
I am already desperate. I never had such an issue in linux based system before.

Thanks for help

Best Regards
Martin


The example of log at crash:

Oct 1 18:29:09 storage smbd[13319]: [2020/10/01 18:29:09.568347

Oct 1 18:29:09 storage smbd[13319]:
===

Oct 1 18:29:09 storage smbd[13319]: [2020/10/01 18:29:09.568441

Oct 1 18:29:09 storage smbd[13319]: INTERNAL ERROR: Signal 6 in pid
13319 (4.9.5-Debian)

Oct 1 18:29:09 storage smbd[13319]: Please read the Trouble-Shooting
section of the Samba HOWTO

Oct 1 18:29:09 storage smbd[13319]: [2020/10/01 18:29:09.568468

Oct 1 18:29:09 storage smbd[13319]:
===

Oct 1 18:29:09 storage smbd[13319]: [2020/10/01 18:29:09.568483

Oct 1 18:29:09 storage smbd[13319]: PANIC (pid 13319): internal error

Oct 1 18:29:09 storage smbd[13319]: [2020/10/01 18:29:09.599323

Oct 1 18:29:09 storage smbd[13319]: BACKTRACE: 13 stack frames:

Oct 1 18:29:09 storage smbd[13319]: #0
/lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x32)
[0x7efce81058d2]

Oct 1 18:29:09 storage smbd[13319]: #1
/lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x20)
[0x7efce7d251c0]

Oct 1 18:29:09 storage smbd[13319]: #2
/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2f)
[0x7efce81059df]

Oct 1 18:29:09 storage smbd[13319]: #3
/lib/x86_64-linux-gnu/libsamba-util.so.0(+0x24c16) [0x7efce8105c16]

Oct 1 18:29:09 storage smbd[13319]: #4
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7efce8173730]

Oct 1 18:29:09 storage smbd[13319]: #5
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7efce740e7bb]

Oct 1 18:29:09 storage smbd[13319]: #6
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7efce73f9535]

Oct 1 18:29:09 storage smbd[13319]: #7
/lib/x86_64-linux-gnu/libc.so.6(+0x79508) [0x7efce7450508]

Oct 1 18:29:09 storage smbd[13319]: #8
/lib/x86_64-linux-gnu/libc.so.6(+0x7fc1a) [0x7efce7456c1a]

Oct 1 18:29:09 storage smbd[13319]: #9
/lib/x86_64-linux-gnu/libc.so.6(+0x818a2) [0x7efce74588a2]

Oct 1 18:29:09 storage smbd[13319]: #10
/lib/x86_64-linux-gnu/libc.so.6(+0x84af3) [0x7efce745baf3]

Oct 1 18:29:09 storage smbd[13319]: #11
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fc9) [0x7efce8168fc9]

Oct 1 18:29:09 storage smbd[13319]: #12
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7efce74d04cf]

Oct 1 18:29:09 storage smbd[13319]: [2020/10/01 18:29:09.599440

Oct 1 18:29:09 storage smbd[13319]: smb_panic(): calling panic action
[/usr/share/samba/panic-action 13319]

Oct 1 18:29:10 storage postfix/sendmail[13329]: fatal: chdir
/var/spool/postfix: Permission denied

Oct 1 18:29:31 storage smbd[13405]: [2020/10/01 18:29:31.68

Oct 1 18:29:31 storage smbd[13405]:
===

Oct 1 18:29:31 storage smbd[13405]: [2020/10/01 18:29:31.644533

Oct 1 18:29:31 storage smbd[13405]: INTERNAL ERROR: Signal 6 in pid
13405 (4.9.5-Debian)

Oct 1 18:29:31 storage smbd[13405]: Please read the Trouble-Shooting
section of the Samba HOWTO

Oct 1 18:29:31 storage smbd[13405]: [2020/10/01 18:29:31.644559

Oct 1 18:29:31 storage smbd[13405]:
===

Oct 1 18:29:31 storage smbd[13405]: [2020/10/01 18:29:31.644584

Oct 1 18:29:31 storage smbd[13405]: PANIC (pid 13405): internal error

Oct 1 18:29:31 storage smbd[13405]: [2020/10/01 18:29:31.645098

Oct 1 18:29:31 storage smbd[13405]: BACKTRACE: 13 stack frames:

Oct 1 18:29:31 storage smbd[13405]: #0
/lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x32)
[0x7efce81058d2]

Oct 1 18:29:31 storage smbd[13405]: #1
/lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x20)
[0x7efce7d251c0]

Oct 1 18:29:31 storage smbd[13405]: #2
/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2f)
[0x7efce81059df]

Oct 1 18:29:31 storage smbd[13405]: #3
/lib/x86_64-linux-gnu/libsamba-util.so.0(+0x24c16) [0x7efce8105c16]

Oct 1 18:29:31 storage smbd[13405]: #4
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7efce8173730]

Oct 1 18:29:31 storage smbd[13405]: #5
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7efce740e7bb]

Oct 1 18:29:31 storage smbd[13405]: #6
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7efce73f9535]

Oct 1 18:29:31 storage smbd[13405]: #7
/lib/x86_64-linux-gnu/libc.so.6(+0x79508) [0x7efce7450508

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

2020-08-10 Thread martin f krafft

This may be of interest to the OP: https://github.com/noffle/airpipe

--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
stupidity management for the superuser

is a user space issue in unix systems.
 -- alan cox


digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


  1   2   3   4   5   6   7   8   9   10   >