Wednesday, April 7, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Linux Mint 20: apt and apt-utils have mismatched versions

Posted: 07 Apr 2021 10:54 AM PDT

I'm using Linux Mint 20, and I can no longer get software updates because apt and apt-utils have mismatched versions. This is the output of sudo apt-get upgrade:

Reading package lists... Done  Building dependency tree         Reading state information... Done  You might want to run 'apt --fix-broken install' to correct these.  The following packages have unmet dependencies:   apt-utils : Depends: apt (= 2.0.4) but 2.0.5 is installed  E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).  

I did try sudo apt --fix-broken install, but that just prints usage info.

I'm not sure precisely how this happened. I've been applying upgrades using the Update Manager as usual without problems for the last several months.

Advice would be greatly appreciated!

Should i use default.target or timers.target value for WantedBy for a systemd user timer?

Posted: 07 Apr 2021 10:39 AM PDT

My .timer file located in ~/.config/systemd/user doesn't show in output of systemctl --user list-timers --all command unless i enable it. Is it normal for this command to not show disabled .timers alongside enabled ones?

I cannot enable the .timer without an [Install] section because of The unit files have no installation config error. According to freedesktop.org documentation:

Timer units will automatically have a dependency of type Before= on timers.target

Does this mean that i do not have to enable my .timer for it in order to work?

If i do need to enable my .timer:

I believe that default.target is what software which is to be executed after successful user login is WantedBy.

I also believe that the user systemd instance is started by pam_systemd, which i believe happens before default.target.

So it seems to me that if i use default.target the timer will be activated after login. If i use OnStartupSec in this case, will it correctly count the time from the startup of the systemd user instance?

On the other hand, if i use timers.target, since this is a user timer, will it be activated before login and start counting the seconds from its activation time, or it will just register and start counting time only after systemd --user is started?

fping output vs. nmap -sn output behind two firewalls

Posted: 07 Apr 2021 10:41 AM PDT

I've tried to scan a network, behind two firewalls, for online hosts only. With fping I did:

fping -a -q -g 192.168.222.0/24

and I got this output

@>~]$ > fping -a -q -g 192.168.222.0/24
192.168.222.1
192.168.222.23
192.168.222.53
192.168.222.86

when I did this with nmap I got this output (all host are online, which is not true):

@>~]$ > nmap -n -sn 192.168.222.0/24
Starting Nmap 7.80 ( https://nmap.org ) at 2021-04-07 19:10 CEST
Nmap scan report for 192.168.222.0
Host is up (0.016s latency).
Nmap scan report for 192.168.222.1
Host is up (0.0065s latency).
Nmap scan report for 192.168.222.2
Host is up (0.0040s latency).
Nmap scan report for 192.168.222.3
Host is up (0.0053s latency).
Nmap scan report for 192.168.222.4
Host is up (0.0053s latency).
Nmap scan report for 192.168.222.5
Host is up (0.0065s latency).
Nmap scan report for 192.168.222.6
Host is up (0.0040s latency).
Nmap scan report for 192.168.222.7
Host is up (0.0074s latency).
Nmap scan report for 192.168.222.8
Host is up (0.0065s latency).
Nmap scan report for 192.168.222.9
Host is up (0.0039s latency).
Nmap scan report for 192.168.222.10
Host is up (0.0039s latency).
Nmap scan report for 192.168.222.11
Host is up (0.015s latency).
Nmap scan report for 192.168.222.1
2 Host is up (0.017s latency).
Nmap scan report for 192.168.222.1
3 Host is up (0.0063s latency).
Nmap scan report for 192.168.222.14
Host is up (0.0070s latency)............and so on

How I can get the nmap output like fping and without sudo?

Thanks you in advance for your help.

Linux dd is stuck writing to md0, does anyone see problem?

Posted: 07 Apr 2021 10:43 AM PDT

I am using Ubuntu 18.04 and have an md0 raid array of 4x500GB drives, ie. 2TB

I ran this command dd if=/dev/zero of=./swapfile bs=1MiB count=350KiB

Which I expected to create a 350GB file,

However the command is stuck, it has not returned and the file size is not longer growing, has been same for 20 minutes now.

$ ls -lrt  total 311956800  -rw-r--r-- 1 root root 319443763200 Apr  7 17:59 swapfile  $   $ df -k .  Filesystem      1K-blocks      Used  Available Use% Mounted on  /dev/md0       1953017856 262744128 1689747456  14% /mnt/nvme1  

What is issue?

ps: I did this

$ strace -p 2318  strace: Process 2318 attached  ^C^C^C^C    ^C^C^C^C^C  ^C^C^C  

There was no output, and I could not unattach... CTRL-C does not work.

apt-get 404 error?

Posted: 07 Apr 2021 10:21 AM PDT

Hi I'm trying to install

sudo apt-get install libmagick++-6.q16-5v5  

My OS is

Description:    Debian GNU/Linux 10 (buster)  Release:        10  Codename:       buster  

When I try to run apt-get update I get the following error.

Hit:1 http://security.debian.org/debian-security buster/updates InRelease  Hit:2 http://deb.debian.org/debian buster InRelease  Hit:3 http://deb.debian.org/debian buster-updates InRelease  Ign:4 http://ppa.launchpad.net/webupd8team/java/ubuntu groovy InRelease  Err:5 http://ppa.launchpad.net/webupd8team/java/ubuntu groovy Release    404  Not Found [IP: 91.189.95.85 80]  Reading package lists... Done  E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu groovy Release' does not have a Release file.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.  

I ignore this and try to install the libMagick but got the following error

    E: Unable to locate package libmagick++-6.q16-5v5  E: Couldn't find any package by glob 'libmagick++-6.q16-5v5'  E: Couldn't find any package by regex 'libmagick++-6.q16-5v5  

Is there anything else I can do to get this to install? thanks advance.

apt/aptitude - How can I display a package dependency tree for a collection of packages, taken as a whole?

Posted: 07 Apr 2021 09:57 AM PDT

I had a problem with my apt packages which I resolved. The problem and resolution are discussed here: Aptitude says that lots of my packages need to be removed ...?

However, in discussing this, I realized that I have an ancillary question about apt which I'd like to find the answer to, which is why I'm posting this current question.

I did something accidentally which caused more than 1,400 "auto" packages to become orphaned, and they were were listed as "no longer in use" and flagged for removal in aptitude. It seems now that the reason for this is because they all were ultimately dependent on some base-level package or meta-package that was incorrectly deleted.

If that is the case, is there a utility or procedure I can use to take a list of apt packages as input, and produce a dependency tree for this entire set of packages, taken as a whole? If so, I would probably have been able to identify the package at the top of this tree that I accidentally deleted, and I then could have reinstalled this package in order to fix my problem.

In other words, I'm looking for some procedure or utility which would take a list of packages as input and produce something similar to this as output ...

top-package  |--package-000  |-+package-001  | |--package-002  |-+package-003  | |--package-004  | |--package-005  | |-+package-006  | | |--package-007  | |--package-008  |--package-009  ... etc. ...  

... where package-NNN are my list of input packages plus any other packages they happen to be dependencies for, and top-package is the root of the dependency tree. If my hypothesis is correct that my problem was due to a high-level meta-package having been accidentally deleted, then top-package would identify that deleted package. I could then reinstall top-package and presumably fix my problem.

To be clear, I want to repeat that I already solved my specific problem in a different way (see the referenced discussion). I'm asking this here not to solve that particular problem, but rather, because I would like to have some sort of dependency-tree-listing tool like I described above, in order to help diagnose and fix other similar problems which might occur in the future.

Thank you very much for any references or suggestions.

Play files as if they were raw audio samples

Posted: 07 Apr 2021 09:16 AM PDT

I once in the past used to play with files by playing them as if they were raw 8bit audio, but I forgot which program can be used to do this. How can I stream, say, /dev/random to my speakers with a single command?

How do I fix video playback in debian?

Posted: 07 Apr 2021 08:47 AM PDT

enter image description here I downloaded some mkv videos from my google drive using rclone but when I play them they all have this green overlay effect, I know for a fact that the videos aren't corrupted because I downloaded them and tested them in other devices and they all worked fine. I also think that the problem isn't with the video player because I played the videos in vlc and mpv but they were both the same. I haven't installed any graphics drivers because my screen just worked. Any help would be appreciated.

  • OS = Debian GNU/Linux 10 (buster) x86_64
  • Window Manager = DWM
  • GPU = NVIDIA geforce 6150 SE
  • CPU = AMD Athlon II 220 Dual-Core
  • 4GB RAM

Running a singular application on startup, fullscreened

Posted: 07 Apr 2021 08:36 AM PDT

I want to run a single application, specifically a Vulkan game, on Linux. I kind of want it to be like a kiosk, but not just for displaying information. The operating system's one use for me is to run this application.
How exactly do I do this? I am new to Linux, so I don't know much about how to work with it.

How to format text replies with ">" prefix

Posted: 07 Apr 2021 08:53 AM PDT

I sometimes receive an HTML email that I want to reply to as text with a ">" prefix.

When I do a text reply what Thunderbird does is prefix the entire paragraph with a single ">". For example:

> Mozilla Thunderbird is a free and open-source cross-platform email client, personal information manager, news client, RSS and chat client developed by the Mozilla Foundation. The project strategy was originally modeled after that of the Mozilla Firefox web browser.  

What I want is this:

> Mozilla Thunderbird is a free and open-source cross-platform  > email client, personal information manager, news client, RSS  > and chat client developed by the Mozilla Foundation. The  > project strategy was originally modeled after that of the  > Mozilla Firefox web browser.  

autossh system script fails at boot, works on systemctl restart

Posted: 07 Apr 2021 08:35 AM PDT

I am trying to set up an autossh service to forward ports to a remote server when my monitoring server boots. After some finagling, I got a pretty barebones system script working, with one catch. The service fails to properly start when it is run at boot, and yet works fine when started manually, or restarted immediately after reboot.

Description=AutoSSH tunnel service for Grafana to access mariadb on remote; local port 33060  After=network-online.target    [Service]  Environment="AUTOSSH_GATETIME=0"  ExecStart=/usr/bin/autossh -M 0 -N myuser@remote.tld -i /home/myuser/.ssh/id_rsa -o \"ServerAliveInterval 30\" -o \"ServerAliveCountMax 3\" -L 172.17.0.1:33307:127.0.0.1:3306    [Install]  WantedBy=multi-user.target  

On boot, no connection is possible. The output from journalctl is something like:

--   -- The job identifier is 152.  Apr 07 15:25:31 monitoring autossh[752]: port set to 0, monitoring disabled  Apr 07 15:25:31 monitoring autossh[752]: starting ssh (count 1)  Apr 07 15:25:31 monitoring autossh[752]: ssh child pid is 759  Apr 07 15:25:31 monitoring autossh[759]: bind [172.17.0.1]:33307: Cannot assign requested address  Apr 07 15:25:31 monitoring autossh[759]: channel_setup_fwd_listener_tcpip: cannot listen to port: 33307  Apr 07 15:25:31 monitoring autossh[759]: Could not request local forwarding.  

If I immediately sudo systemctl restart autossh-mariadb-tunnel.service, the connection works fine.

display grid of data in bash

Posted: 07 Apr 2021 09:29 AM PDT

would like to get an opinion on how best to do this in bash, thank you

for x number of servers, each has it's own list of replication agreements and their status.. it's easy to run a few commands and get this data, ex;

get servers, output;

dc1-server1 dc1-server2 dc2-server1 dc2-server2 dc3...  

for dc1-server1, get agreements, output;

dc2-server1  dc3-server1  dc4-server1  

for dc1-server1, get agreement status codes, output;

0  0  18  

so output would be several columns based on the 'get servers' list with each 'replica: status' under each server, for that server

this may get munged, but something like;

dc1-server1      dc1-server2      dc2-server1  dc2-server1: 0   dc2-server2: 0   dc1-server1: 0  ...  dc3-server1: 0   dc3-server2: 18  dc3-server1: 13 ...  dc4-server1: 18  dc4-server2: 0   dc4-server1: 0  ...  

something vaguely like this (tho this doesn't work);

#!/bin/bash    . ~/.ldap-config  DOMAIN=$(domainname)  ROWSTOT=0    for SERVER in $MASTER $REPLICAS ; do     ${SERVER}REPLICAS=$(ipa-replica-manage -p $(cat ~/.dsp) list -v $SERVER.$DOMAIN | grep ': replica' | sed 's/: replica//')     ROWS=$(echo "${SERVER}REPLICAS" | wc -l)     [ "$ROWS" -gt "$ROWSTOT" ] && ROWSTOT=$ROWS     ${SERVER}STATUS=$(ipa-replica-manage -p $(cat ~/.dsp) list -v $SERVER.$DOMAIN | grep 'status: Error (' | sed -e 's/.*status: Error (//' -e 's/).*//')  done    for (( C=1; C<=$ROWSTOT; C++ )) ; do     for SERVER in $MASTER $REPLICAS ; do        #echo -n "${SERVER}REPLICAS[$C]: ${SERVER}STATUS[$C]"        printf "%-28s" "${SERVER}REPLICAS[$C]: ${SERVER}STATUS[$C]"     done     echo  done  

Bash script: check wan ip periodically and act if IP is changed

Posted: 07 Apr 2021 10:13 AM PDT

i'm new to Bash and i'm just don't understand how to write a simple script which would do the following thing

Script should check what public IP i have, and if IP is changed (in case of ISP1 failure or in case ISP1 will give me another static IP, that happened before), then script should stop OpenVPN server and start OpenVPN client to remote server.

Right now all i could understand and write is this:

#!/bin/bash  myip="XXX.XXX.XXX.XXX"  checkip="$(dig +short myip.opendns.com @resolver1.opendns.com)"    if [ "$checkip" = "$myip" ] ;    then    /etc/init.d/openvpn.server start  /etc/init.d/openvpn.client stop    else    /etc/init.d/openvpn server stop  /etc/init.d/openvpn.client start    fi  

I can't understand how to loop this script to check IP every 10 seconds and add this to Gentoo to run as a service.

Sorry to bother you, and thanks in advance.

How to crossgrade debian (migrate from i386 to amd64)

Posted: 07 Apr 2021 09:43 AM PDT

How to switch a Debian installation from i386 to amd64 architecture (and vice versa) without reinstalling the system?

built-in monitor recognized when using nvidia driver, but not when using i915?

Posted: 07 Apr 2021 09:21 AM PDT

I'm using Pop 20.10. I'm on a Dell G5 5590 w/ RTX 2070mq (working well) and an i7-9750H. I have a 144hz built-in screen.

In windows, I see the screen is 144hz when using nvidia, can be manually set to 64hz if desired. If i disabled the nvidia card, I see the screen running at 64hz automatically.

In Pop, it auto-defaults to using the nvidia drivers for my machine. This works perfectly, but has poor battery life characteristics.

In this mode, xrandr shows only a 144hz setting for the built in screen, which matches what I see in windows in the nvidia control panel:

when booted with nvidia

When I try to switch to 'integrated' and reboot, I can only get video through my external monitors connected via usb-c. DP-0, which xrandr shows as the internal screen when using nvidia, doesn't even show up in xrandr when the nvidia is disabled.

xrandr with nvidia disabled:

when booted with integrated

I've filed an issue with i915, but have seen no response.

I've tried a number of things, all documented, including 1915.modeset=0 and attempts at xorg.conf files, but nothing seems successful--all shots in the dark for me, though, as this isn't an area I am terribly knowledgeable in.

My guess is that the EDID (or perhaps the DisplayPort Configuration Data/DPCD?) is 'incorrect', similar to the issue referenced here. But I'm pretty over my head trying to debug this on my own, and I'm a bit at a loss of where to go next.

I would also guess, and have in the past, that the iGPU just can't handle the 144hz. But:

  1. if that's the case, wouldn't I still see it in xrandr?
  2. 144hz of 1080p should be well within the range of what the iGPU is capable of, in theory, but if it won't do that in windows, maybe this is a wrong assumption

In any case, what can I try to get my internal monitor working (perferably at 60~hz, I'd like to maximize battery life) with my intel UHD 630 iGPU?

I would guess that I could add /usr/share/X11/xorg.conf.d/20-intel.conf with a 60hz modeline, but that hasn't seemed to work for me. I've tried many variations, but I just don't see my monitor. (You can see me giving an example of what conf file I have tried here).

What logs should I look at here? Here's my boot logs for an 'integrated' boot, grepped for modeset: https://pastebin.ubuntu.com/p/zXsjcpMdMY/ . No mention of DP-0 whatsoever...

However, when I grep through a an nvidia boot, I also see that modeset doesn't ever mention a DP-0 then, either; instead, in an nvidia boot only, I see this line:

Apr 07 16:29:28 pop-os /usr/libexec/gdm-x-session[2327]: (II) NVIDIA(0): Setting mode "DP-0: nvidia-auto-select @1920x1080 +2160+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}"  

This seems like helpful info, and if I wasn't able to see the internal screen working without the nvidia in windows, I would assume the screen is just hardwired to the nvidia card directly, but that can't be right based on everything else.

If some other logs would be helpful, let me know.

Debian switch from stretch to buster results in dependency mess

Posted: 07 Apr 2021 08:16 AM PDT

I needed to move an ancient Debian box originally installed with Jessie and some years ago moved to Stretch to Buster, but got some broken dependencies. I could clean up most of it by removing optional packages with dpkg, but now it comes to packages like mesa driver and systemd where I don't want to mess around. Actually I don't even know what the i386 is doing on my amd64 machine.

$ apt --fix-broken install  Reading package lists... Done  Building dependency tree         Reading state information... Done  Correcting dependencies... failed.  The following packages have unmet dependencies:   libgl1-mesa-dri:i386 : Depends: libllvm7:i386 (>= 1:7~svn298832-1~) but it is not installed                          Depends: libsensors5:i386 (>= 1:3.5.0) but it is not installed   libsensors5 : Depends: libsensors-config but it is not installed   libwayland-egl1-mesa : Depends: libegl1 but it is not installed   mesa-va-drivers:i386 : Depends: libllvm7:i386 (>= 1:7~svn298832-1~) but it is not installed   mesa-vdpau-drivers:i386 : Depends: libllvm7:i386 (>= 1:7~svn298832-1~) but it is not installed   systemd : Depends: libsystemd0 (= 232-25+deb9u12) but 241-7~deb10u7 is installed  E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.  E: Unable to correct dependencies  

Any suggestions on how to proceed?

mdadm does not find the superblock during the assemble operation

Posted: 07 Apr 2021 10:23 AM PDT

I had zero-filled partitions /dev/sda1 and /dev/sdb1 which I put into Linux RAID:

# mdadm --create /dev/md0 --level=1 --raid-disks=2 --metadata 1.0 /dev/sda1 /dev/sdb1  mdadm: array /dev/md0 started.  #  # cat /proc/mdstat  Personalities : [raid1]  md0 : active raid1 sdb1[1] sda1[0]        487360 blocks super 1.0 [2/2] [UU]    unused devices: <none>  #  

Both /dev/sda1 and /dev/sdb1 were part of another mirror before if this matters. Now after I stopped the newly created md0 mirror with mdadm --stop --scan and tried to re-assemble all the arrays with mdadm --assemble --scan, then the /dev/md0 is no longer discovered while rest or the mirrors are:

# cat /proc/mdstat  Personalities : [raid1]  md3 : active raid1 sda4[2] sdb4[1]        892150784 blocks super 1.2 [2/2] [UU]        bitmap: 0/7 pages [0KB], 65536KB chunk    md2 : active raid1 sda3[2] sdb3[1]        29280256 blocks super 1.2 [2/2] [UU]    md1 : active raid1 sda2[2] sdb2[1]        15617024 blocks super 1.2 [2/2] [UU]    unused devices: <none>  #  

If I try to assemble the md0 array using verbose output, then it says, that there is no superblock on /dev/sda1 and /dev/sdb1:

# mdadm -vv --assemble /dev/md0  mdadm: looking for devices for /dev/md0  mdadm: no RAID superblock on /dev/md/3  mdadm: no RAID superblock on /dev/md/2  mdadm: no RAID superblock on /dev/md/1  mdadm: no RAID superblock on /dev/sde2  mdadm: no RAID superblock on /dev/sde1  mdadm: no RAID superblock on /dev/sde  mdadm: no RAID superblock on /dev/sr1  mdadm: no RAID superblock on /dev/sdc  mdadm: no RAID superblock on /dev/sdd  mdadm: cannot open device /dev/sr0: No medium found  mdadm: /dev/sdb4 has wrong uuid.  mdadm: /dev/sdb3 has wrong uuid.  mdadm: /dev/sdb2 has wrong uuid.  mdadm: no RAID superblock on /dev/sdb1  mdadm: no RAID superblock on /dev/sdb  mdadm: /dev/sda4 has wrong uuid.  mdadm: /dev/sda3 has wrong uuid.  mdadm: /dev/sda2 has wrong uuid.  mdadm: no RAID superblock on /dev/sda1  mdadm: no RAID superblock on /dev/sda  mdadm: no RAID superblock on /dev/loop0  #  

However, if I inspect the superblock data on RAID1 members, then it is present:

# mdadm --misc -E /dev/sda1  /dev/sda1:            Magic : a92b4efc          Version : 1.0      Feature Map : 0x0       Array UUID : 5a0545c5:e5b8c31b:0982665c:0cdfe114             Name : ubuntu:0  (local to host ubuntu)    Creation Time : Wed Apr  7 14:21:25 2021       Raid Level : raid1     Raid Devices : 2     Avail Dev Size : 974816 (476.06 MiB 499.11 MB)       Array Size : 487360 (476.02 MiB 499.06 MB)    Used Dev Size : 974720 (476.02 MiB 499.06 MB)     Super Offset : 974832 sectors     Unused Space : before=0 sectors, after=104 sectors            State : clean      Device UUID : 51c870bf:c75f1072:ff17ffcb:0d794b70        Update Time : Wed Apr  7 14:21:27 2021    Bad Block Log : 512 entries available at offset -8 sectors         Checksum : c908caac - correct           Events : 17         Device Role : Active device 0     Array State : AA ('A' == active, '.' == missing, 'R' == replacing)  #  # mdadm --misc -E /dev/sdb1  /dev/sdb1:            Magic : a92b4efc          Version : 1.0      Feature Map : 0x0       Array UUID : 5a0545c5:e5b8c31b:0982665c:0cdfe114             Name : ubuntu:0  (local to host ubuntu)    Creation Time : Wed Apr  7 14:21:25 2021       Raid Level : raid1     Raid Devices : 2     Avail Dev Size : 974816 (476.06 MiB 499.11 MB)       Array Size : 487360 (476.02 MiB 499.06 MB)    Used Dev Size : 974720 (476.02 MiB 499.06 MB)     Super Offset : 974832 sectors     Unused Space : before=0 sectors, after=104 sectors            State : clean      Device UUID : e8517473:237cf164:8fb85c22:5ef79704        Update Time : Wed Apr  7 14:21:27 2021    Bad Block Log : 512 entries available at offset -8 sectors         Checksum : 5a978f80 - correct           Events : 17         Device Role : Active device 1     Array State : AA ('A' == active, '.' == missing, 'R' == replacing)  #  

What might cause such behavior?

Debian assigned hundreds IPv6 public address

Posted: 07 Apr 2021 08:30 AM PDT

My Debian have IPv6 assignment problem. The interface assigned hundreds IPv6 public address:

$ ip addr | grep -c '2409:'  219  

Using ip addr check IPv6 addresses:

  3: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000      link/ether 00:e0:4c:36:93:15 brd ff:ff:ff:ff:ff:ff      inet 192.168.1.10/24 brd 192.168.1.255 scope global noprefixroute enp11s0         valid_lft forever preferred_lft forever      inet6 2409:8a50:a4e:92f0:6174:3f62:57cf:ba6a/64 scope global temporary dynamic         valid_lft 258842sec preferred_lft 85861sec      inet6 2409:8a50:a4e:92f0:f49d:44ca:8557:3ca5/64 scope global dynamic mngtmpaddr noprefixroute         valid_lft 258842sec preferred_lft 172442sec      inet6 2409:8a50:a46:c400:6174:3f62:57cf:ba6a/64 scope global temporary dynamic         valid_lft 258843sec preferred_lft 85861sec      inet6 2409:8a50:a46:c400:7541:7da1:5434:1741/64 scope global dynamic mngtmpaddr noprefixroute         valid_lft 258843sec preferred_lft 172443sec      inet6 2409:8a50:a46:c400:d05e:8af5:f6cf:f42f/64 scope global temporary dynamic         valid_lft 258554sec preferred_lft 85860sec      inet6 2409:8a50:a4e:92f0:d05e:8af5:f6cf:f42f/64 scope global temporary dynamic         valid_lft 258842sec preferred_lft 85860sec      inet6 2409:8a50:a4e:92f0:5999:8fc7:475b:ccef/64 scope global temporary dynamic         valid_lft 258303sec preferred_lft 85572sec      inet6 2409:8a50:a46:c400:5999:8fc7:475b:ccef/64 scope global temporary dynamic         valid_lft 258554sec preferred_lft 85572sec      inet6 2409:8a50:a46:c400:d9d3:ef05:bb58:ca07/64 scope global temporary dynamic         valid_lft 258137sec preferred_lft 85321sec      inet6 2409:8a50:a4e:92f0:d9d3:ef05:bb58:ca07/64 scope global temporary dynamic         valid_lft 258303sec preferred_lft 85321sec      inet6 2409:8a50:a4e:92f0:71c8:2bc:9942:9d25/64 scope global temporary dynamic         valid_lft 258051sec preferred_lft 85155sec      inet6 2409:8a50:a46:c400:71c8:2bc:9942:9d25/64 scope global temporary dynamic         valid_lft 258137sec preferred_lft 85155sec      .......  

and the Kernel message shows:

[496922.494943] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [497266.149336] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [497287.754771] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [497581.736350] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [498100.833291] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [498118.774008] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [498690.290277] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [499141.642258] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [499586.227054] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [499742.201967] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [499901.453946] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [499961.327580] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [500430.519108] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [500727.481891] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [500913.499238] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [500978.223144] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [501374.991352] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [501561.471323] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [501958.160961] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [502102.048465] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [502546.680738] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [502767.658846] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [503042.022824] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [505438.052608] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [505816.211563] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [506099.932168] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [506448.276145] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [506632.626997] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [507026.426232] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [507331.850194] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [507364.491312] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [507578.809108] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  [507628.593994] IPv6: ipv6_create_tempaddr: retry temporary address regeneration  ........  

And the /etc/init.d/networking restart not working.
What cause that? and how to solve it?

thanks!

What is this sit0 device?

Posted: 07 Apr 2021 10:22 AM PDT

I'm setting my computer (running Debian Buster) up for Hurricane Electric's IPv6 tunnel broker. They provide instructions for several configuration methods, but here's for iproute2, which I've been using for testing purposes:

ip tunnel add he-ipv6 mode sit remote 216.66.22.2 local <local-IP-addr> ttl 255  ip link set he-ipv6 up  ip addr add <IPv6-addr>/64 dev he-ipv6  ip route add ::/0 dev he-ipv6  ip -f inet6 addr  

When I do this, a mysterious sit0 interface also appears. Clearly, it's something related to 6in4 tunneling, but I can't find much more about it except that it's somehow special and it exists whenever the sit module is loaded. Out of curiosity, I tried to configure it for the tunnel broker instead of creating a new interface, but it didn't seem to be able to do that.

What is this device?

Is there any limit on line length when pasting to a terminal in Linux?

Posted: 07 Apr 2021 09:57 AM PDT

I am trying to send messages from kafka-console-producer.sh, which is

#!/bin/bash  if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then      export KAFKA_HEAP_OPTS="-Xmx512M"  fi  exec $(dirname $0)/kafka-run-class.sh kafka.tools.ConsoleProducer "$@"  

I am pasting messages then via Putty terminal. On receive side I see messages truncated approximately to 4096 bytes. I don't see anywhere in Kafka, that this limit is set.

Can this limit be from bash/terminal or Putty?

how i can install arch-linux-x64 on UEFI-32bit

Posted: 07 Apr 2021 08:53 AM PDT

i have a tablet laptop with intel Atom , and UEFI 32 bit
i'm using rufus for create bootable usb but usb not able to boot from uefi system

i'm found a solution for ubuntu Here

by copying a file called bootia32.efi to /BOOT/UEFI/  

fortunately it's work for ubuntu but not work for arch because i'm not found this file that work for arch

Filesystem goes read only repeatidly

Posted: 07 Apr 2021 10:19 AM PDT

My 4+yrs old Ubuntu 20.04.2 system on a Dell Latitude E7470 laptop and LITEON CV3-8D128 SSD is now switching to read-only after around 15 mins of use.

Symptoms are:

  • all commands failing because of "input output errors"
  • all icons disapearing
  • nothing works basically
  • sometime the desktop even disapear leaving with a console printing "systemd-journald: failed to write entry, ignoring: read-only file system".

What I tired:

  • Rescue Mode: I can't fsck -f /dev/sda6 because it is said to be "mounted" (or "active" when I try to umount)
  • Live USB: I regularly don't even see the whole SSD aka /dev/sda in parted or even lshw so can't really fsck
  • Dual Boot Windows: I never use this partition, but funily enough I could see the sda6 partition from my Windows dual boot (and recover data).

Does it seems to be hardware failures ? I can read the whole disk when booting Windows, but it may have write errors causing the system to switch into RO mode under Linux?

Thanks a lot !

EDIT:

I just installed a new system (Ubuntu) on another partition nearby (located on the same SSD) and it seems to be OK: no problem for the last 24hrs while the other system fails in about half an hour.


SMART Values from smartctl:

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.8.0-43-generic] (local build)  Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org    === START OF INFORMATION SECTION ===  Device Model:     LITEON CV3-8D128-11 SATA 128GB  Serial Number:    TW0WVD605508566U0BSM  LU WWN Device Id: 5 002303 100a14a70  Firmware Version: T87110B  User Capacity:    128,035,676,160 bytes [128 GB]  Sector Size:      512 bytes logical/physical  Rotation Rate:    Solid State Device  Form Factor:      M.2  Device is:        Not in smartctl database [for details use: -P showall]  ATA Version is:   ATA8-ACS, ATA/ATAPI-7 T13/1532D revision 4a  SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)  Local Time is:    Tue Apr  6 12:43:43 2021 UTC  SMART support is: Available - device has SMART capability.  SMART support is: Enabled    === START OF READ SMART DATA SECTION ===  SMART overall-health self-assessment test result: PASSED    General SMART Values:  Offline data collection status:  (0x00) Offline data collection activity                      was never started.                      Auto Offline Data Collection: Disabled.  Self-test execution status:      (   0) The previous self-test routine completed                      without error or no self-test has ever                       been run.  Total time to complete Offline   data collection:        (   10) seconds.  Offline data collection  capabilities:            (0x15) SMART execute Offline immediate.                      No Auto Offline data collection support.                      Abort Offline collection upon new                      command.                      No Offline surface scan supported.                      Self-test supported.                      No Conveyance Self-test supported.                      No Selective Self-test supported.  SMART capabilities:            (0x0003) Saves SMART data before entering                      power-saving mode.                      Supports SMART auto save timer.  Error logging capability:        (0x01) Error logging supported.                      General Purpose Logging supported.  Short self-test routine   recommended polling time:    (   2) minutes.  Extended self-test routine  recommended polling time:    (  11) minutes.  SCT capabilities:          (0x003d) SCT Status supported.                      SCT Error Recovery Control supported.                      SCT Feature Control supported.                      SCT Data Table supported.    SMART Attributes Data Structure revision number: 1  Vendor Specific SMART Attributes with Thresholds:  ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE    5 Reallocated_Sector_Ct   0x0003   100   100   000    Pre-fail  Always       -       0    9 Power_On_Hours          0x0002   100   100   000    Old_age   Always       -       11705   12 Power_Cycle_Count       0x0003   100   100   000    Pre-fail  Always       -       556  175 Program_Fail_Count_Chip 0x0003   100   100   000    Pre-fail  Always       -       0  176 Erase_Fail_Count_Chip   0x0003   100   100   000    Pre-fail  Always       -       0  177 Wear_Leveling_Count     0x0003   100   100   000    Pre-fail  Always       -       334815  178 Used_Rsvd_Blk_Cnt_Chip  0x0003   100   100   000    Pre-fail  Always       -       0  179 Used_Rsvd_Blk_Cnt_Tot   0x0003   100   100   000    Pre-fail  Always       -       0  180 Unused_Rsvd_Blk_Cnt_Tot 0x0033   100   100   005    Pre-fail  Always       -       568  181 Program_Fail_Cnt_Total  0x0003   100   100   000    Pre-fail  Always       -       0  182 Erase_Fail_Count_Total  0x0003   100   100   000    Pre-fail  Always       -       0  187 Reported_Uncorrect      0x0003   100   100   000    Pre-fail  Always       -       0  194 Temperature_Celsius     0x0003   100   100   000    Pre-fail  Always       -       43  195 Hardware_ECC_Recovered  0x0003   100   100   000    Pre-fail  Always       -       0  199 UDMA_CRC_Error_Count    0x0003   100   100   000    Pre-fail  Always       -       8  238 Unknown_Attribute       0x0003   088   100   000    Pre-fail  Always       -       12  241 Total_LBAs_Written      0x0003   100   100   000    Pre-fail  Always       -       27453  242 Total_LBAs_Read         0x0003   100   100   000    Pre-fail  Always       -       78550    SMART Error Log Version: 1  No Errors Logged    SMART Self-test log structure revision number 1  Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error  # 1  Short offline       Completed without error       00%     11696         -  # 2  Short offline       Completed without error       00%         2         -    Selective Self-tests/Logging not supported  

Find files with matched whole lines from a file

Posted: 07 Apr 2021 08:16 AM PDT

I have a file with this content:

$ cat compromised_header.txt  some unique string 1  some other unique string 2  another unique string 3  

I wanted to find all files that have all the lines of above file exactly in the same order and those lines have no intermediary lines in between.

Example input file:

$ cat a-compromised-file.txt  some unique string 1  some other unique string 2  another unique string 3  unrelated line x  unrelated line y  unrelated line z  

I tried using below grep:

grep -rlf compromised_header.txt dir/  

But I wasn't sure it will give the expected files as it will also match this file:

some unique string 1  unrelated line x  unrelated line y  unrelated line z  

Screen resolution stuck at 720 after removing GPU

Posted: 07 Apr 2021 10:39 AM PDT

I recently removed my GPU from my PC, since I can't set the screen resolution to 1080p only to 720p and my system doesn't recognise my secondary monitor. Both work fine on Windows and from live USBs. I removed Nvidia drivers and intel drivers are installed.

some info:

Neon focal, Plasma 5.21.

tried installing older/newer kernels

xrandr: Failed to get size of gamma for output default    Screen 0: minimum 1024 x 768, current 1024 x 768, maximum 1024 x 768  default connected primary 1024x768+0+0 0mm x 0mm    1024x768      76.00*      xrandr -s 1920x1080  Size 1920x1080 not found in available modes      sudo lshw -c video   *-display UNCLAIMED                description: VGA compatible controller        product: Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller        vendor: Intel Corporation        physical id: 2        bus info: pci@0000:00:02.0        version: 09        width: 64 bits        clock: 33MHz        capabilities: msi pm vga_controller bus_master cap_list        configuration: latency=0        resources: memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64) memory:c0000-dffff      lspci -nnk | grep -i vga -A3  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Co  ntroller [8086:0162] (rev 09)         DeviceName:  Onboard IGD         Subsystem: ASUSTeK Computer Inc. P8 series motherboard [1043:84ca]         Kernel modules: i915  

lsmod broken: https://pastebin.com/hPPez81G

lsmod live usb working: https://pastebin.com/k36efZCw

outputs of

(find /lib64 /lib/modules/ -type f) | awk '{print $2, $1}' | sort > filename.txt   

Install obs studio 26.1 on debian 9

Posted: 07 Apr 2021 10:13 AM PDT

Is it possible to accomplish that? I need the latest version in order to be able to use the virtual camera along zoom or similar

I've tried building from source following instructions, but had a lot of problems with cmake and qt dependencies

I'm reading about installing from sid but I'm not sure what it has to be done and not breaking my system.

Gunicorn + flask + nginx + wsgi error 502 Bad Gateway

Posted: 07 Apr 2021 10:02 AM PDT

I have tried looking for an answer, but mostly people get this error with uwsgi not Gunicorn.

nginx error log has the following output:

2019/09/20 17:23:20 [crit] 28847#28847: *2 connect() to unix:/home/ubuntu/app_test/app_test.sock failed (13: Permission denied) while connecting to upstream, client: <client-ip>, server: <server-ip>, request: "GET / HTTP/1.1", upstream: "http://unix:/home/ubuntu/app_test/app_test.sock:/", host: "<ip-address>"  

I have the following configuration file for the app in nginx's sites-available directory with a simlink to in sites-enabled:

server {      listen 80;      server_name <server-ip>;        location / {          include proxy_params;          proxy_pass http://unix:/home/ubuntu/app_test/app_test.sock;      }  }  

This is the service file in /etc/systemd/system/app_test.service

[Unit]  Description=Gunicorn instance to serve app_test  After=network.target    [Service]  User=ubuntu  Group=ubuntu  WorkingDirectory=/home/ubuntu/app_test  Environment="PATH=/home/ubuntu/app_test/appenv/bin"  ExecStart=/home/ubuntu/app_test/appenv/bin/gunicorn --workers 3 --bind unix:app_test.sock -m 002 wsgi:app    [Install]  WantedBy=multi-user.target  

(By the way, I have tried the socket file with a mask of 007 as well, just to be sure. Still the same response in the log after restarting both service and nginx.)

This is the app_test.pyfile:

from flask import Flask  app = Flask(__name__)    @app.route("/")  def hello():      return "<h1 style='color:blue'>Hello There!</h1>"    if __name__ == "__main__":      app.run(host='0.0.0.0')  

Finally, this is wsgi.py:

from app_test import app    if __name__ == "__main__":      app.run()  

DEAUTH_LEAVING error

Posted: 07 Apr 2021 09:07 AM PDT

I'm not able to manage this error

[  666.695694] wlan0: deauthenticating from xx:xx:xx:xx:xx:xx by local choice (Reason: 3=DEAUTH_LEAVING)  

I obtain the error only when I'm trying to connect to a WPA2-Enterprise network (EAP-MSCHAP2). Other connections work well without any error. This error has been obtained after a Linux upgrade, at now I'm using

Linux root 4.18.0-kali2-amd64 #1 SMP Debian 4.18.10-2kali1 (2018-10-09) x86_64 GNU/Linux   

Lurking I've seen a possible cause to this problem: the TLSv1.2 support has been disabled. I've seen several solutions with wpa_supplicant, but I'm using network manager. I've also tried to configure wpa_supplicant without any result. What can I do?

Linux Cgroup writing to control files, working for CPU but not Device subsystem?

Posted: 07 Apr 2021 10:15 AM PDT

I'm trying to setup Cgroups for a non-root user glassfish.

System setup:

  • CentOS 7.2.1511
  • Kernel 3.10.0-327.el7.x86_64
  • Cgroup mounted at /sys/fs/cgroup

It should be possible to create a Cgroup for non-root user by issuing these commands:

  1. For CPU subsystem:

    $ sudo mkdir /sys/fs/cgroup/cpu/${USER}  $ sudo chown -R ${USER} /sys/fs/cgroup/cpu/${USER}  
  2. For Devices subsystem:

    $ sudo mkdir /sys/fs/cgroup/devices/${USER}  $ sudo chown -R ${USER} /sys/fs/cgroup/devices/${USER}  

This works for the CPU subsystem. Since I am able to write to control files as glassfish, such as cpu.cfs_period_us like below

    echo 43434 > cpu.cfs_period_us  

But writing to the Devices subsystem such as

    echo 'a *:* rwm' > devices.deny  

Results in the following error

    bash: echo: write error: Operation not permitted  

CPU subsystem permissions

Device subsystem permissions

Any help would be deeply appreciated, I've been stuck with this for so long and it just doesn't make sense to me.

How to set up Linux for full AMD APU power management support: Turbo Core, Cool'n'Quiet, Dynamic Power Management?

Posted: 07 Apr 2021 10:34 AM PDT

My objective is to set up a mini server (not HTPC) with low power consumption in idle mode, yet offering nice performance when used. The focus is more on data safety than availability. In other words: quality parts, but redundancy only for storage.

Not considering myself to be biased, after some research I felt that some AMD desktop APUs would offer good value.

Questions remaining are:

  • Will the idle state of the GPU lower power consumption and unleash resources for the CPU?
  • Will Cool'n'Quiet and Turbo Core lead to the intended low power consumption in idle mode but performance under load?
  • Will Linux support this scenario as intended? Quite a few questions and forum discussions seem to suggest that this is not necessarily the case.

Is there a way to dynamically refresh the less command?

Posted: 07 Apr 2021 10:22 AM PDT

I like the watch command, but it has its limitations.

I'm curious to know whether I could mimic the functionality of watch with less. I'm mainly looking for the ability to scroll through my directory as it dynamically gets modified via a running script.

No comments:

Post a Comment