Wednesday, October 6, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


I have done my work but there is still have some error need to be fix. I need to help to fix these error

Posted: 06 Oct 2021 10:13 AM PDT

I have writing my own shell script but it when it's running, it show that:

`"$name:$number"': not a valid identifier  

Can you guys check for me where is the problem and fix it? Below is what i have done.

#!/bin/sh    select $name:$number in `teledir.txt`    do    if [ $# -eq 1 ] ; then   if [ $1 = "$number" ] ; then        echo -e "$name:$number"  elif [ $1 = "$name" ] ; then   echo -e "$name:$number"  else echo "Invalid Name" | echo "Name does not exist"  fi  fi  break  if [ $# -eq 2 ] ; then   if [ $2 = "$name:$number" ] ; then   echo -e "$name:$number"  elif [ $2 = "$name:$number" ] ; then  new="$name:$number"  TELEDIR=$kit213agn/teledir.txt  cat $TELEDIR | grep -w "new"  echo "New entry"  echo "$new">>teledir.txt  else echo "Invalid Name" | echo "Name does not exist"  fi  fi  done  

Here is the shell prompt i want to see:

v`$ ./phone.sh john  John Smith:63243333  $ ./phone.sh Smith  John Smith:63243333  $ ./phone.sh Adams  Name does not exist  $ ./phone.sh Smith12  Invalid name  

Create ZFS partition on existing drive

Posted: 06 Oct 2021 10:09 AM PDT

I hear that ZFS has deduplication, so you can save the same file in multiple places but only use ~1 copy's worth of space. I've noticed I tend to end up with music/images/etc. in multiple places across my hard drive over time, and thought it'd be good to make a ZFS partition and move my media to that. I'm having a hard time finding how to do that, or if it's possible, though. Most tutorials say like, "take 3 disks and RAID them together with ZFS", but I'm on a laptop with a single disk, and a preexisting OS I don't intend to erase. I see comments about ZFS partitions (https://serverfault.com/questions/628632/should-i-create-zfs-zpools-with-whole-disks-or-partitions), but I have yet to find anything that explains how to add a single ZFS partition to an existing disk. Can such a thing be done? (My disk's partition table type is msdos, btw, and I'm running Ubuntu.)

How can I inspect the amount of layers in my image?

Posted: 06 Oct 2021 10:04 AM PDT

Let's say I want to inspect the amount of layers in my image, how many times the image has been modified before it came to its final form, how can I do this?

Can't log in to Kali linux live usb stick

Posted: 06 Oct 2021 09:46 AM PDT

I have recently created a persistent live usb stick with Kali Linux installed.

I have not choosen any password, but the default ones like
usr: root pw: toor,
usr: kali pw: kali
don't work.

How can I log in to the admin account?

Edit: I used this image: kali-linux-2020.4-live-amd64

I flashed the drive using rufus with persistence enabled, everything else was at default settings.

I did not use a manual/tutorial.

Running Abaqus GUI on compute node on Cluster Centos 6.5. remotely

Posted: 06 Oct 2021 09:31 AM PDT

I am trying to run an Abaqus 6.14 job remotely on cluster having Centos 6.5. I have opened Abaqus GUI successfully but is running on the head node. I want to be on the compute node but I cant access it. Please help. Thanks.

How to remove directories that have numbers as file names using command line?

Posted: 06 Oct 2021 10:19 AM PDT

I have a directory where there are subdirectories which have numbers as directories. For example I have a parent directory test now I have some subdirectories like 1,2,3,4,5,6,7. Now I have a local exported variable like export a=3. I want to delete directories that are above or equal to >$a but below or equal to <$a+2, So I want to delete files 4,5. Also if I don't know the least number directory and I want to delete everything below or equal to <$a so the directories 1,2,3 gets deleted. How can I achieve this?

I tried rm -rf {$a..$($a+3)} and rm -rf {<$a}, it didn't work, I tried so many other things but not successful.

why one would use xargs without params?

Posted: 06 Oct 2021 09:25 AM PDT

I'm debugging a complex shell script and there is next code:

echo $data | xargs -n1 | sort -u | sed 's/.*/%&%/' | xargs | sed 's/ /,/g;s/%/"/g'`   

what use may have xargs without any command here?

LVM Volume Group not found

Posted: 06 Oct 2021 08:50 AM PDT

After rebooting my server i get the following error message:

Begin: Running /scripts/init-premount … done.  Begin: Mounting root file system …   Begin: Running /scripts/local-top …  Volume group "ubuntu-vg" not found  Cannot process volume group ubuntu-vg  Begin: Running /scripts/local-premount …  ...  Begin: Waiting for root file system …  Begin: Running /scripts/local-block …  mdadm: No arrays found in config file or automatically  Volume group "ubuntu-vg" not found  Cannot process volume group ubuntu vg  mdadm: No arrays found in config file or automatically # <-- approximately 30 times  mdadm: error opening /dev/md?*: No such file or directory  done.  Gave up waiting for root file system device.   Common problems:  -   Boot args (cat /proc/cmdline)  -   Check rootdelay= (did the system wait long enough?)  -   Missing modules (cat /proc/modules: ls /dev)  ALERT! /dev/mapper/ubuntu--vg-ubuntu--lv does not exist. Dropping to a shell!  

The system drops to initramfs shell (busybox) where lvm vgscan doesn't find any volume groups and ls /dev/mapper only shows only one entry, control.

When i boot the live SystemRescueCD, the Volume Group can be found and the LV is available as usual in /dev/mapper/ubuntu--vg-ubuntu--lv. I am able to mount it and the VG is set to active. So the VG and the LV look fine but something seems broken during the boot process.

Ubuntu 20.04 Server, LVM setup on top of hardware raid1+0 with 4 SSDs. No software raid, no encryption.

Any hints how to find the error and fix the problem?

Remind: Show missed reminders

Posted: 06 Oct 2021 08:48 AM PDT

I have a few reminders set up with remind. When I boot my machine a cron job pipes the output of remind -n -q to a notification so that I can see the reminders for the day.

If I'm out for the day, I may never boot my machine, and so may miss the reminders.

Is there any way to have remind issue reminders from the past that haven't been issued yet, so that I'd see missed reminders the next time the cron job runs?

qt5 program with "-platform linuxfb" does not reset framebuffer when crashing

Posted: 06 Oct 2021 08:35 AM PDT

We have a qt5 program running under Alpine Linux v3.14 which uses a fragile legacy library which may cause the entire program to crash. Alpine Linux switches to framebuffer mode during start up. We compile the library from source but do not have the time to harden the code.

Our program runs in a Linux framebuffer device using qtprogram -platform linuxfb which works well, except that when the program crashes and returns to the shell, the framebuffer is not reset properly giving the incorrect impression that the program is still running but is non-responsive.

I would like to at least blank out the framebuffer and preferably switch back to the Linux console mode so we can see output from the invoking shell script.

How should I approach this?

Unable to install packages/update in elementary-os

Posted: 06 Oct 2021 10:25 AM PDT

I have a problem where I am not able to install anything or update my system from both terminal and the AppCenter. When I install updates it says:

Error while installing package: trying to overwrite '/usr/share/metainfo/granite.appdata.xml', which is also in package libgranite-common 6.1.1+r2107+pkg120~ubuntu6.1.   

In terminal I get an error of:

The following packages have unmet dependencies:  [package name] : Depends: libgranite5 (>= 0.2.0) but it is not going to be installed  E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).  

I tried removing libgranite5.deb but it's being created again. I also did sudo apt --fix-broken install and I got the same error Any ideas? Thanks in advance!

Moving /var onto different disk/partition

Posted: 06 Oct 2021 10:34 AM PDT

I moved the /var directory to a new disk/partition, this part worked well, but I forgot to delete/move the old /var path and it is still using space on / (root) partition. How could I delete the old /var without redo all the process? Any ideas?

Mixed SSD+HDD setup with encrypted LVM

Posted: 06 Oct 2021 08:40 AM PDT

Before anyone dishes out the facile answer, my SSD is not large enough to hold everything. My /home is full of data, documents, and VMs, approx. 720 GB. I do not want to buy a larger SSD.

The SSD is only a 140 GB SATA disk that is now /dev/sda. My HDD (now /dev/sdb) is a different matter. It is 2 TB. The HDD currently houses a Linux install, that for some unrelated reasons, I need to replace with an old faithful Debian installation. The system is a bit of a beast (16 cores, 32 GB of RAM), and uses encrypted LVM.

(The reason for this is not performance-related. I have hit a dead end in upgrading due to decisions made by my current distro (elementary OS), and I have finally found some time to finally do this. This post is not to start a distro flamewar or to discuss whether elementary OS 6 is a good choice or not. I am returning to Debian as I believe in install once and upgrade forever method. I also do not have the bandwidth to invest the time in Arch and other distros. I have been an apt-get guy for a long time (15+ years), and plan to stay that way. It is great that a different choice works for you. You do you.)

So, returning to the issue, since I am doing a new installation anyways, it seemed like a good time to speed up things with an SSD.

Naturally, because of write cycle limitations, even though they have gotten better in recent years, I want to put only those partitions on the SSD that will actually benefit the most, while causing the least amount of wear and tear. My hunch would be partitions that see a lot of reads, but not writes. A good initial set of choices would appear to be /boot, /, /usr/local and /opt.

Ever since I hosted a Slackware system 18 years ago, I have always kept my /tmp and /var/log on separate partitions. Good habits die hard.

Is the following a good plan:

/boot 1GB SSD  /boot/efi 650 M SSD  / 50 GB SSD  /usr/local 50 GB SSD  /opt 38 GB SSD  swap 64 GB HD  /var/log 20 GB HD  /tmp 20 GB HD  /home 1.89 TB HD  

?

Please suggest any changes. One possibly related thing - I also run Windows 10 in a VM for the rare occasions on which I need a native Microsoft Word installation. Is it worthwhile to put docker or kvm images on their own separate partition? Would potentially putting one of these on SSD allow one to overcome the bit of a lag that one sees? How does one ensure that the docker logging remains on HD even if the image lives on SSD?

SSH config for connecting to host via reverse SSH tunnel

Posted: 06 Oct 2021 10:04 AM PDT

I set up a reverse SSH tunnel to access a node, node1, behind a NAT. I have set up an EC2 instance, myEC2, to act as the intermediary. From my laptop, when I want to access node1, I have to SSH into the EC2 in order to then SSH into the node.

The workflow is like this:

  1. In node1, make sure to run: ssh -i key.pem -R 3000:localhost:22 ubuntu@myEC2. This is always running in a service.
  2. From my laptop, SSH into the EC2: ssh ubuntu@myEC2
  3. Once inside the EC2: ssh xavier@localhost -p 3000
  4. I'm in node1!

What I'm looking for is a way of expressing that workflow in a SSH config that I can use to login directly into node1 from my laptop. This will help me access node1 via Visual Studio Code's Remote SSH extension.

I tried something like this:

Host node1  Hostname myEC2  User ubuntu  Port 3000  IdentityFile key.pem  

But that does not work, I assume it is because Port should be 22 rather than 3000. I just really don't know how to express the workflow. I have looked into ProxyJump but I'm not sure if that is what I'm looking for and to be honest I haven't had success with that either.

Any suggestions are welcomed! =D


Edit #1: After following Stéphane's suggestions I ended up with an ssh_config file that looks like this:

Host myEC2  Hostname <myEC2_IP>  User ubuntu  Port 22  IdentityFile ec2_key.pem    Host node1  Hostname localhost  User xavier  Port 3000  IdentityFile /path/to/node1-id_rsa  ProxyJump ubuntu@myEC2  

While I can SSH into myEC2 with no issues, I can't go into node1. My understanding is that this is supposed to be equivalent to ssh -p 3000 -J ubuntu@myEC2 xavier@localhost. Any help is greatly appreciated! This is what I get by adding the -v flag to SSH.

xaviermerino@Xaviers-MBP .ssh % ssh doc  debug1: Executing proxy command: exec ssh -l ubuntu -W '[localhost]:3000' myEC2  debug1: identity file node1-id_rsa type -1  debug1: identity file node1-id_rsa-cert type -1  debug1: Local version string SSH-2.0-OpenSSH_8.1  debug1: Connecting to myEC2 [myEC2_IP_ADDRESS] port 22.  debug1: Connection established.  debug1: identity file ec2_key.pem type -1  debug1: identity file ec2_key.pem-cert type -1  debug1: Local version string SSH-2.0-OpenSSH_8.1  debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.2  debug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.2 pat OpenSSH* compat 0x04000000  debug1: Authenticating to myEC2_IP_ADDRESS:22 as 'ubuntu'  debug1: SSH2_MSG_KEXINIT sent  debug1: SSH2_MSG_KEXINIT received  debug1: kex: algorithm: curve25519-sha256  debug1: kex: host key algorithm: ecdsa-sha2-nistp256  debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none  debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none  debug1: expecting SSH2_MSG_KEX_ECDH_REPLY  debug1: Server host key: ecdsa-sha2-nistp256 SHA256:/U4HE+zUBFNZJgxDM6lWDW7FX8GSHXWYc/fMEyOvMlw  debug1: Host 'myEC2_IP_ADDRESS' is known and matches the ECDSA host key.  debug1: Found key in /Users/xaviermerino/.ssh/known_hosts:226  debug1: rekey out after 134217728 blocks  debug1: SSH2_MSG_NEWKEYS sent  debug1: expecting SSH2_MSG_NEWKEYS  debug1: SSH2_MSG_NEWKEYS received  debug1: rekey in after 134217728 blocks  debug1: Will attempt key: ec2_key.pem  explicit  debug1: SSH2_MSG_EXT_INFO received  debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com>  debug1: SSH2_MSG_SERVICE_ACCEPT received  debug1: Authentications that can continue: publickey  debug1: Next authentication method: publickey  debug1: Trying private key: ec2_key.pem  debug1: Authentication succeeded (publickey).  Authenticated to myEC2 ([IP_Address_Goes_Here]:22).  debug1: channel_connect_stdio_fwd localhost:3000  debug1: channel 0: new [stdio-forward]  debug1: getpeername failed: Bad file descriptor  debug1: Requesting no-more-sessions@openssh.com  debug1: Entering interactive session.  debug1: pledge: network  debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0  debug1: Remote: /home/ubuntu/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding  channel 0: open failed: connect failed: Connection refused  stdio forwarding failed  kex_exchange_identification: Connection closed by remote host  

I'm not sure what this means Does it have to do with the settings at sshd_config in the EC2?. This is what I have in there:

#AllowAgentForwarding yes  #AllowTcpForwarding yes  GatewayPorts yes  X11Forwarding yes  #X11DisplayOffset 10  #X11UseLocalhost yes  #PermitTTY yes  PrintMotd no  #PrintLastLog yes  #TCPKeepAlive yes  #PermitUserEnvironment no  #Compression delayed  #ClientAliveInterval 0  #ClientAliveCountMax 3  #UseDNS no  #PidFile /var/run/sshd.pid  #MaxStartups 10:30:100  #PermitTunnel no  #ChrootDirectory none  #VersionAddendum none  

Any help is greatly appreciated.

How can I set a simple forwarding procmail rule based on FROM?

Posted: 06 Oct 2021 10:12 AM PDT

Using Procmail, I would like to add a rule that dictates:

If any email comes from this specific email address, in addition to delivering it locally, also forward it to this other email address.

My attempt at this rule is as follows:

:0 c:  * ^From:.sender@example.com  ! recipient@horses.example  

... but this does not appear to work. In fact, it appears to not do anything.

Problems with UTF-8 when attaching to a tmux session over ssh

Posted: 06 Oct 2021 08:50 AM PDT

Scenario:

I have a server, on which a tmux session is running. Let's call that session tmux_session in the rest of this post.

Attaching to that session can be done in two, slightly different ways:

  1. By first ssh-ing to the server:

    user@host$ ssh user@server.tld  

    and then attaching to the named session:

    user@server$ tmux a -d -t tmux_session  
  2. By ssh-ing and attaching at the same time:

    user@host$ ssh user@server.tld -t tmux -a -d -t tmux_session  

Symptoms:

Method №1 works as expected. My LANG is set to C.UTF-8, echo-ing it inside tmux_session works fine, and it's reported correctly. Unicode input of characters like "¹²³¤", works perfectly fine.

Method №2 yields a session, which is unable to display Unicode characters, beyond simple ASCII. All other characters get replaced by _ (an underscore). However when entering a special character, the character is actually entered into whatever application is running inside tmux_session, I confirmed it using editors, an IRC client, etc. When I detach and re-attach using method №1, the previously entered character is displayed correctly.

This problem when using method №2, only happens when attaching to the session with the ssh command, and it only affects the display of the characters, not the actual characters being entered.

Some of the output inside tmux is kinda broken both times, though. When I enter echo $LANG inside tmux_session using either method, I see this:

$ echo $LANG                              cho C.UTF-8C.UTF-8  

Something is garbled, for some reason the input line is (partially) repeated. I read in another post on superuser.com, that one should try by first deleting .tmux.conf. I don't have a .tmux.conf, so not having that file doesn't seem to alleviate the issue for me. In any event, $LANG being set to C.UTF-8 is correct.

This garbled output does not happen, when just ssh-ing to the server.

parse gawk over list of files in directory and save to new folder

Posted: 06 Oct 2021 08:36 AM PDT

Hello I have the following code

for i in *.dssp ; do     gawk 'BEGIN{ FIELDWIDTHS = "5 5 1 1 4 1 *"} $4 == "A" {s=s$6} END {print s}' | tr "[HGI]" "H" | tr "[BE]" "E" | tr "[TS ' ']" "C"   done   

I am able to execute successfully by calling the code in the shell with one specific .dssp file, however I have a directory of these files and need it to loop over the entire lot of them and save the output which is a bunch of letter (fasta like) into a new file with the corresponding id that it pulled from. I am not sure where to go from here

How can I execute recipe iff a file exists?

Posted: 06 Oct 2021 08:47 AM PDT

I'm writing a Makefile recipe that needs to execute IF AND ONLY IF a certain file exists...

Here's what I have:

clean:      $(if $(shell test -s ${MFN_LSTF}), \          $(foreach mfn, $(shell cat ${MFN_LSTF}), \              $(MAKE) -f mfd/${mfn} clean;), )  .PHONY: clean  

${MFN_LSTF} holds a filename that contains a one column list of makefile names that are assumed to be at the same local directory as this makefile recipe.

The problem that I've encountered with is that, the foreach statement executes always. I want it to execute ONLY IF the filename ${MFN_LSTF} exists.

I've tried this also:

clean:      [ test -s ${MFN_LSTF} ] &&          for mfn in $(shell cat ${MFN_LSTF}); do              $(MAKE) -f mfd/${mfn} clean          done  .PHONY: clean  

Filter specific parts of a log file

Posted: 06 Oct 2021 10:27 AM PDT

I need to filter the mail-log to send reports to me everyday, so I can track blocked addresses easily.

This is part of the log:

Oct  2 14:22:49 mail postfix/smtp/smtpd[3401121]: NOQUEUE: reject: RCPT from cloud831541.educacaa.com.br[45.140.41.93]: 554 5.7.1 Service unavailable; Client host [45.140.41.93] blocked using dnsbl.sorbs.net; Currently Sending Spam See: http://www.sorbs.net/lookup.shtml?45.140.41.93; from=<planfranciely-fe@educacaa.com.br> to=<leonardo@home-server> proto=ESMTP helo=<cloud831541.educacaa.com.br>  Oct  2 14:26:02 mail postfix/smtp/smtpd[3403329]: NOQUEUE: reject: RCPT from ws21763.adcote.com.br[185.249.200.83]: 554 5.7.1 Service unavailable; Helo command [ws217632.adcote.com.br] blocked using dbl.spamhaus.org; https://www.spamhaus.org/query/domain/adcote.com.br; from=<adrinoworkshop-5i@adcote.com.br> to=<leonardo@home-server> proto=ESMTP helo=<ws217632.adcote.com.br>  Oct  2 14:43:51 mail postfix/smtp/smtpd[3403329]: NOQUEUE: reject: RCPT from o12.mailer.shopify.com[149.72.90.155]: 554 5.7.1 Service unavailable; Client host [149.72.90.155] blocked using spam.dnsbl.sorbs.net; Spam Received See: http://www.sorbs.net/lookup.shtml?149.72.90.155; from=<bounces+12398229-c901-leonardo=home-server.net.br@mailer.shopifyemail.com> to=<leonardo@home-server> proto=ESMTP helo=<o12.mailer.shopify.com>  

I need to cut from RCPT from until : and before 554 5.7.1 and also print from blocked using until ; before Currently Sending.

So the output would be something like this =

RCPT from cloud831541.educacaa.com.br[45.140.41.93] -- blocked using dnsbl.sorbs.net  

A way easier to check who was blocked by my mail filters.

I appreciate any help.

Opensuse and PulseAudio: Failed to initialize SDL: Could not setup connection to PulseAudio

Posted: 06 Oct 2021 10:12 AM PDT

I am trying to open up kdenlive on an OpenSUSE system however I receive an error from the Terminal.

Failed to initialize SDL: Could not setup connection to PulseAudio

When I try to open up kdenlive outside the Terminal I get the following:

"Could not create the video preview window, something wrong with your install or driver settings".

I try to drag and drop an image into the environment but it crashes and closes.

The solutions online that I have seen are specific to Ubuntu and I can't seem to find a solution to an OpenSUSE issue.

EDIT:

Here is a screen shot of the error after running sudo snap install kdenlive --candidate and then trying to open it.

enter image description here

Its in Spanish but it is saying the same message as above with the addition.

Algo falló en la instalación de Kdenlive o en las preferencias del controlador. Por favor. solucionarlo.

  • Something failed in the installation of Kdenlive or in the driver preferences. Please, fix it.

I click accept and it closes the program.

EDIT:

Added output from Terminal:

myUser@linux-9z5s:~> kdenlive  === /// CANNOT ACCESS SPEECH DICTIONARIES FOLDER  =================BUILDING PROFILE REPOSITORY    ========================  Invalid metadata for  "avcolour_space"  Failed to parse "avcolour_space"  Invalid metadata for  "avcolor_space"  Failed to parse "avcolor_space"  Invalid metadata for  "avdeinterlace"  Failed to parse "avdeinterlace"  Invalid metadata for  "swscale"  Failed to parse "swscale"  Invalid metadata for  "swresample"  Failed to parse "swresample"  Invalid metadata for  "audiochannels"  Failed to parse "audiochannels"  Invalid metadata for  "audioconvert"  Failed to parse "audioconvert"  Invalid metadata for  "imageconvert"  Failed to parse "imageconvert"  Invalid metadata for  "jack"  Failed to parse "jack"  Invalid metadata for  "glsl.manager"  Failed to parse "glsl.manager"  Invalid metadata for  "movit.convert"  Failed to parse "movit.convert"  Invalid metadata for  "movit.crop"  Failed to parse "movit.crop"  Invalid metadata for  "movit.resample"  Failed to parse "movit.resample"  Invalid metadata for  "movit.resize"  Failed to parse "movit.resize"  Invalid metadata for  "telecide"  Failed to parse "telecide"  Invalid metadata for  "deinterlace"  Failed to parse "deinterlace"  Unknown asset "avfilter.acompressor"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/acompressor.xml"  Unknown asset "avfilter.aecho"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/aecho.xml"  Unknown asset "avfilter.agate"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/agate.xml"  Unknown asset "avfilter.atadenoise"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_atadenoise.xml"  Unknown asset "avfilter.bwdif"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_bwdif.xml"  Unknown asset "avfilter.deblock"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_deblock.xml"  Unknown asset "avfilter.dedot"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_dedot.xml"  Unknown asset "avfilter.deflate"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_deflate.xml"  Unknown asset "avfilter.derain"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_derain.xml"  Unknown asset "avfilter.doubleweave"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_doubleweave.xml"  Unknown asset "avfilter.field"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_field.xml"  Unknown asset "avfilter.framestep"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_framestep.xml"  Unknown asset "avfilter.fspp"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_fspp.xml"  Unknown asset "avfilter.graphmonitor"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_graphmonitor.xml"  Unknown asset "avfilter.hqdn3d"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_hqdn3d.xml"  Unknown asset "avfilter.inflate"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_inflate.xml"  Unknown asset "avfilter.lagfun"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_lagfun.xml"  Unknown asset "avfilter.random"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_random.xml"  Unknown asset "avfilter.removegrain"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_removegrain.xml"  Unknown asset "avfilter.separatefields"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_separatefields.xml"  Unknown asset "avfilter.shuffleplanes"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_shuffleplanes.xml"  Unknown asset "avfilter.sr"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_sr.xml"  Unknown asset "avfilter.tmix"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_tmix.xml"  Unknown asset "avfilter.w3fdif"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_w3fdif.xml"  Unknown asset "avfilter.weave"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_weave.xml"  Unknown asset "avfilter.yadif"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/avfilter_yadif.xml"  Unknown asset "frei0r.baltan"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_baltan.xml"  Unknown asset "frei0r.bgsubtract0r"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_bgsubtract0r.xml"  Unknown asset "frei0r.bigsh0t_eq_mask"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_bigsh0t_eq_mask.xml"  Unknown asset "frei0r.bigsh0t_eq_to_rect"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_bigsh0t_eq_to_rect.xml"  Unknown asset "frei0r.bigsh0t_hemi_to_eq"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_bigsh0t_hemi_to_eq.xml"  Unknown asset "frei0r.bigsh0t_rect_to_eq"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_bigsh0t_rect_to_eq.xml"  Unknown asset "frei0r.bigsh0t_stabilize_360"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_bigsh0t_stabilize_360.xml"  Unknown asset "frei0r.bigsh0t_transform_360"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_bigsh0t_transform_360.xml"  Unknown asset "frei0r.delay0r"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_delay0r.xml"  Unknown asset "frei0r.delaygrab"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_delaygrab.xml"  Unknown asset "frei0r.facebl0r"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_facebl0r.xml"  Unknown asset "frei0r.facedetect"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_facedetect.xml"  Unknown asset "frei0r.lightgraffiti"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_lightgraffiti.xml"  Unknown asset "frei0r.lightgraffiti"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_lightgraffiti.xml"  Unknown asset "frei0r.tehRoxx0r"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/frei0r_tehroxx0r.xml"  Unknown asset "movit.unsharp_mask"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/movit_unsharp_mask.xml"  Unknown asset "region"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/region.xml"  Unknown asset "timewarp"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/speed.xml"  Unknown asset "vidstab"  ==== PARSING ABORTED FOR:  "/snap/kdenlive/44/usr/share/kdenlive/effects/vidstab.xml"  Unknown asset "region"  ALSA lib conf.c:826:(get_char_skip_comments) Cannot access file /usr/share/alsa/alsa.conf  ALSA lib conf.c:1967:(_snd_config_load_with_include) _toplevel_:13:19:No such file or directory  ALSA lib conf.c:4180:(snd_config_update_r) /etc/alsa-pulse.conf may be old or corrupted: consider to remove or fix it  no alsa devices available  kf.service.sycoca: Service type not found: "video/mlt-playlist"  kf.service.sycoca: Service type not found: "application/x-kdenlive"  kf.service.sycoca: Service type not found: "application/x-kdenlivetitle"  QObject::disconnect: Unexpected nullptr parameter  QObject::disconnect: Unexpected nullptr parameter  QObject::disconnect: Unexpected nullptr parameter  qrc:/qml/timeline.qml:1903:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }  MLT: "[consumer sdl2_audio ] Failed to initialize SDL: Could not setup connection to PulseAudio"  kf.notifications: Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification  === REG FOCUS:  false  === REG FOCUS:  false  Violación de segmento (`core' generado)  

sed to replace path to the image

Posted: 06 Oct 2021 09:28 AM PDT

I need to replace path to the image in multiple xhtml files in directory. The files head part is as follows:

<?xml version="1.0" encoding="UTF-8"?>  <html xml:lang="en-us" lang="en-us" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:ns="http://www.w3.org/2001/10/synthesis">  <head>  

Tried to do it with sed command, but it doesn't work. Possibly due specific sed version, but not sure. I have GNU sed 4.4

original path:  <img src="/api/v2/epubs/urn:orm:book:381260143574/files/line.jpg"  I need replace to:  <img src="graphics/line.jpg"  

I tried

sed -i '.bak' 's/\/api\/v2\/epubs\/urn:orm:book:381260143574\/files/graphics/g' '*.xhtml'  

it return

sed: -e expression #1, char 1: unknown command: `.'  

also tried

sed -i ' ' 's/\/api\/v2\/epubs\/urn:orm:book:381260143574\/files/graphics/g' '*.xhtml'  it return  sed: can't read s/\/api\/v2\/epubs\/urn:orm:book:381260143574\/files/graphics/g: No such file or directory  sed: can't read *.xhtml: No such file or directory  

Is the sed suitable for this?

Debian Installer: "Failure of key exchange and association" when attempting wifi connection

Posted: 06 Oct 2021 09:25 AM PDT

I previously posted here seeking advice on how to get Debian installed on my PC. I managed to get the debian 11 (testing) installer to recognize the intel wireless adapter using a secondary USB drive with non-free firmware, but now I've run into another problem.

I'm getting this error message after using my network passphrase: "Failure of key exchange and association" Does anyone have an explanation/fix for this error? The network/passphrase works on every other device I own.

sks-keyservers gone. What to use instead?

Posted: 06 Oct 2021 08:18 AM PDT

https://sks-keyservers.net/ says

This service is deprecated. This means it is no longer maintained, and new HKPS certificates will not be issued. Service reliability should not be expected.

Update 2021-06-21: Due to even more GDPR takedown requests, the DNS records for the pool will no longer be provided at all.

Which keyservers can I use for gpg --keyserver "$keyserver1" --recv-key keyid that I can expect not will go away anytime soon?

Ignore certain lines when creating/applying a patch with diff/patch?

Posted: 06 Oct 2021 08:50 AM PDT

File A

Apples  Bananas  Clementines  Dates  

File B

Apples  Blueberries  Cherries  Dates  

I want to diff A and B to generate a patch that when applied to C will change the line Clementines > Cherries but will ignore the second line (Blueberries/Blackcurrants/whatever).

File C (before patch)

Apples  Blackcurrants  Clementines  Dates  

File C (after patch)

Apples  Blackcurrants  Cherries  Dates  

Ideally I would like a patch with context, as this sequence is not guaranteed to always appear in the same place in the file. In my mind the context would contain some form of wildcard line after Apples and before Clementines.

I am open to manually editing the diff output if necessary, but if there's a repeatable command for creating a context-based diff with a wildcard in place of a specific regex match that would be great.

I would like to be able to send this patch to a friend who has file C and have them run a patch command without having to manually edit anything on their end.

How can this be done?

How to replace faulty disk in software raid using lvm

Posted: 06 Oct 2021 10:03 AM PDT

one of the SuSE 12 LinuxServers has reported disk failure. Fortunately the Database Server has Software Raid hence the system is still up and running. But as recommended, we would like to replace the failed disk with a new one and rebuild the software raid on it.

System Information is :

Total 4 Internal Disks. sda, sdb , sdc and sdd

The fdisk partitions are :

fdisk -l   Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors   Units: sectors of 1 * 512 = 512 bytes   Sector size (logical/physical): 512 bytes / 4096 bytes   I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disklabel type: dos   Disk identifier: 0x0007d757    Device    Boot   Start           End    Sectors   Size Id Type   /dev/sdb1 *          2048    2105343    2103296     1G fd Linux raid autodetect   /dev/sdb2         2105344   39858175   37752832    18G fd Linux raid autodetect   /dev/sdb3        39858176 1953523711 1913665536 912.5G fd Linux raid autodetect    Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors  Units: sectors of 1 * 512 = 512 bytes   Sector size (logical/physical): 512 bytes / 4096 bytes   I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disklabel type: dos   Disk identifier: 0x000a0e8a    Device    Boot Start        End Sectors      Size Id Type   /dev/sdc1       2048 1953523711 1953521664 931.5G fd Linux raid autodetect    Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors  Units: sectors of 1 * 512 = 512 bytes   Sector size (logical/physical): 512 bytes / 4096 bytes   I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disklabel type: dos   Disk identifier: 0x000caaad    Device    Boot Start        End    Sectors Size   Id Type   /dev/sdd1       2048 1953523711 1953521664 931.5G fd Linux raid autodetect  

Software RAID --> sda + sdb (sda is failed disk) Software RAID --> sdb + sdc

DBServer# cat /proc/mdstat   Personalities : [raid1]     md3 : active raid1 sdc1[0] sdd1[1] 976760640 blocks super 1.0 [2/2] [UU] bitmap: 2/8 pages [8KB], 65536KB chunk    md0 : active raid1 sdb1[1] sda10 1051584 blocks super 1.0 [2/1] [_U] bitmap: 1/1 pages [4KB], 65536KB chunk    md2 : active raid1 sdb3[1] sda30 956832576 blocks super 1.0 [2/1] [_U] bitmap: 2/8 pages [8KB], 65536KB chunk    md1 : active raid1 sdb2[1] sda20 18876288 blocks super 1.0 [2/1] [_U]  bitmap: 0/1 pages [0KB], 65536KB chunk     unused devices:  

So md0,md1 and md2 have failed devices namely sda1,sda2 and sda3

Please note that it also has 2 VGs defined as shown below,

1 VG - system (/dev/md2) 2 VG - ora_db (/dev/md3)

pvdisplay  --- Physical volume ---   PV Name /dev/md3   VG Name ora_db   PV Size 931.51 GiB / not usable 3.81 MiB   Allocatable yes   PE Size 4.00 MiB   Total PE 238466   Free PE 84866   Allocated PE 153600   PV UUID vgPdWQ-x6CW-vvdF-moxh-FKyb-wpSU-NdJqSm    --- Physical volume ---   PV Name /dev/md2   VG Name system   PV Size 912.51 GiB / not usable 2.81 MiB   Allocatable yes   PE Size 4.00 MiB   Total PE 233601   Free PE 182401   Allocated PE 51200   PV UUID rdff2n-ztxd-lcBY-nAqk-8O9u-fnFG-BVI91v  

The grub.conf shows : (Relevant part)

if [ x$feature_default_font_path = xy ] ; then    font=unicode   else    insmod part_msdos msdos     insmod diskfilter mdraid1x lvm     insmod ext2     set root='lvmid/m7AEp0-79EG-D2Vi-ELzE-BTzh-C8mN-CLxrpz/S0eZEl-PlBX-E1ZL-oCwL-SmUx-4Qe4-Mz9NHX'    if [ x$feature_platform_search_hint = xy ]; then       search --no-floppy --fs-uuid --set=root --hint='lvmid/m7AEp0-79EG-D2Vi-ELzE-BTzh-C8mN-CLxrpz/S0eZEl-PlBX-E1ZL-oCwL-SmUx-4Qe4-Mz9NHX' 7c2e3a9c-5f5b-47e3-8a0a-d1e66f12747c     else       search --no-floppy --fs-uuid --set=root 7c2e3a9c-5f5b-47e3-8a0a-d1e66f12747c     fi     font="/share/grub2/unicode.pf2"   fi    if loadfont $font ; then     set gfxmode=auto     load_video     insmod gfxterm    set locale_dir=$prefix/locale     set lang=POSIX     insmod gettext   fi  terminal_output gfxterm   insmod part_msdos msdos   insmod diskfilter mdraid1x   insmod ext2   set root='mduuid/531cd341e2c7d5a71c542ad04d9ea589'   if [ x$feature_platform_search_hint = xy ]; then     search --no-floppy --fs-uuid --set=root --hint='mduuid/531cd341e2c7d5a71c542ad04d9ea589' 96c11697-c3b7-4f11-90fc-3aef207db526   else     search --no-floppy --fs-uuid --set=root 96c11697-c3b7-4f11-90fc-3aef207db526   fi  

Quote: The procedure to follow should go like this,

First we mark /dev/sda1 as failed:

mdadm --manage /dev/md0 --fail /dev/sda1  

Then we remove /dev/sda1 from /dev/md0:

mdadm --manage /dev/md0 --remove /dev/sda1  

Now we do the same steps again for /dev/sda2 and sda3 (which is part of /dev/md1 and /dev/md2)

Then power down the system:

shutdown -h now   

and replace the old /dev/sdb hard drive with a new one

After inserting new SATA disk /dev/sda, boot the system.

Then we create the exact same partitioning as on /dev/sda. We can do this with one simple command:

sfdisk -d /dev/sdb | sfdisk /dev/sda  

Check if both the disks have same partitions (fdisk -l) 8.Next we add /dev/sda1 to /dev/md0 and /dev/sda2 to /dev/md1 and /dev/sda3 to /dev/md3:

mdadm --manage /dev/md0 --add /dev/sda1 mdadm --manage /dev/md1 --add /dev/sda2 mdadm --manage /dev/md2 --add /dev/sda3  

Confirm the synchronisation in progress

cat /proc/mdstat  

Please let me know if I have missed something. 2 important points I guess would be, how should I take care of lvm and grub in this case.

Do I have to do something extra to take care of it or the command sfdisk -d /dev/sdb | sfdisk /dev/sda , should take care of LVM as well.

How should I take care of grub in this case? As grun.conf shows entries pertaining to LVM as well as MDADM. Do I have to change anything here before I shutdown the system?

I understand the system has 2 pointers to take care of mdadm+lvm. Which have complicated things. Else would it be easier to setup completely new system?

Not yet tried anything. Only collecting information.

grub.cfg

### BEGIN /etc/grub.d/00_header ###  if [ -f ${config_directory}/grubenv ]; then    load_env -f ${config_directory}/grubenv  elif [ -s $prefix/grubenv ]; then    load_env  fi    if [ "${env_block}" ] ; then    load_env -f "${env_block}"  fi    if [ "${next_entry}" ] ; then     set default="${next_entry}"     set next_entry=     save_env next_entry     if [ "${env_block}" ] ; then       save_env -f "${env_block}" next_entry     fi     set boot_once=true  else     set default="${saved_entry}"  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  }    if [ x$feature_default_font_path = xy ] ; then     font=unicode  else  insmod part_msdos msdos  insmod diskfilter mdraid1x lvm  insmod ext2  set root='lvmid/m7AEp0-79EG-D2Vi-ELzE-BTzh-C8mN-CLxrpz/S0eZEl-PlBX-E1ZL-oCwL-SmUx-4Qe4-Mz9NHX'  if [ x$feature_platform_search_hint = xy ]; then    search --no-floppy --fs-uuid --set=root --hint='lvmid/m7AEp0-79EG-D2Vi-ELzE-BTzh-C8mN-CLxrpz/S0eZEl-PlBX-E1ZL-oCwL-SmUx-4Qe4-Mz9NHX'  7c2e3a9c-5f5b-47e3-8a0a-d1e66f12747c  else    search --no-floppy --fs-uuid --set=root 7c2e3a9c-5f5b-47e3-8a0a-d1e66f12747c  fi      font="/share/grub2/unicode.pf2"  fi    if loadfont $font ; then    set gfxmode=auto    load_video    insmod gfxterm    set locale_dir=$prefix/locale    set lang=POSIX    insmod gettext  fi  terminal_output gfxterm  insmod part_msdos msdos  insmod diskfilter mdraid1x  insmod ext2  set root='mduuid/531cd341e2c7d5a71c542ad04d9ea589'  if [ x$feature_platform_search_hint = xy ]; then    search --no-floppy --fs-uuid --set=root --hint='mduuid/531cd341e2c7d5a71c542ad04d9ea589'  96c11697-c3b7-4f11-90fc-3aef207db526  else    search --no-floppy --fs-uuid --set=root 96c11697-c3b7-4f11-90fc-3aef207db526  fi  insmod gfxmenu  loadfont ($root)/grub2/themes/SLE/DejaVuSans-Bold14.pf2  loadfont ($root)/grub2/themes/SLE/DejaVuSans10.pf2  loadfont ($root)/grub2/themes/SLE/DejaVuSans12.pf2  loadfont ($root)/grub2/themes/SLE/ascii.pf2  insmod png  set theme=($root)/grub2/themes/SLE/theme.txt  export theme  if [ x${boot_once} = xtrue ]; then    set timeout=0  elif [ x$feature_timeout_style = xy ] ; then    set timeout_style=menu    set timeout=8  # Fallback normal timeout code in case the timeout_style feature is  # unavailable.  else    set timeout=8  fi  ### END /etc/grub.d/00_header ###    ### BEGIN /etc/grub.d/10_linux ###  menuentry 'SLES12'  --class sles12 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-690785da-f0f0-4250-b693-5a008acbba10' {          load_video          set gfxpayload=keep          insmod gzio          insmod part_msdos msdos          insmod diskfilter mdraid1x          insmod ext2          set root='mduuid/531cd341e2c7d5a71c542ad04d9ea589'          if [ x$feature_platform_search_hint = xy ]; then            search --no-floppy --fs-uuid --set=root --hint='mduuid/531cd341e2c7d5a71c542ad04d9ea589'  96c11697-c3b7-4f11-90fc-3aef207db526          else            search --no-floppy --fs-uuid --set=root 96c11697-c3b7-4f11-90fc-3aef207db526          fi          echo    'Loading Linux 3.12.28-4-default ...'          linux   /vmlinuz-3.12.28-4-default root=UUID=690785da-f0f0-4250-b693-5a008acbba10   resume=/dev/md1 splash=silent quiet crashkernel=232M-:116M  showopts          echo    'Loading initial ramdisk ...'          initrd  /initrd-3.12.28-4-default  }  submenu 'Advanced options for SLES12' --hotkey=1 $menuentry_id_option 'gnulinux-advanced-690785da-f0f0-4250-b693-5a008acbba10' {          menuentry 'SLES12, with Linux 3.12.28-4-default' --hotkey=2 --class sles12 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12.28-4-default-advanced-690785da-f0f0-4250-b693-    5a008acbba10' {                  load_video                  set gfxpayload=keep                  insmod gzio                  insmod part_msdos msdos                  insmod diskfilter mdraid1x                  insmod ext2                  set root='mduuid/531cd341e2c7d5a71c542ad04d9ea589'                  if [ x$feature_platform_search_hint = xy ]; then                    search --no-floppy --fs-uuid --set=root --hint='mduuid/531cd341e2c7d5a71c542ad04d9ea589'  96c11697-c3b7-4f11-90fc-3aef207db526                  else                    search --no-floppy --fs-uuid --set=root 96c11697-c3b7-4f11-90fc-3aef207db526                  fi                  echo    'Loading Linux 3.12.28-4-default ...'                  linux   /vmlinuz-3.12.28-4-default root=UUID=690785da-f0f0-4250-b693-5a008acbba10   resume=/dev/md1 splash=silent quiet crashkernel=232M-:116M  showopts                  echo    'Loading initial ramdisk ...'                  initrd  /initrd-3.12.28-4-default          }          menuentry 'SLES12, with Linux 3.12.28-4-default (recovery mode)' --hotkey=3 --class sles12 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12.28-4-default-recovery-    690785da-f0f0-4250-b693-5a008acbba10' {                  load_video                  set gfxpayload=keep                  insmod gzio                  insmod part_msdos msdos                  insmod diskfilter mdraid1x                  insmod ext2                  set root='mduuid/531cd341e2c7d5a71c542ad04d9ea589'                  if [ x$feature_platform_search_hint = xy ]; then                    search --no-floppy --fs-uuid --set=root --hint='mduuid/531cd341e2c7d5a71c542ad04d9ea589'  96c11697-c3b7-4f11-90fc-3aef207db526                  else                    search --no-floppy --fs-uuid --set=root 96c11697-c3b7-4f11-90fc-3aef207db526                  fi                  echo    'Loading Linux 3.12.28-4-default ...'                  linux   /vmlinuz-3.12.28-4-default root=UUID=690785da-f0f0-4250-b693-5a008acbba10  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset     x11failsafe crashkernel=232M-:116M                  echo    'Loading initial ramdisk ...'                  initrd  /initrd-3.12.28-4-default          }  }    ### END /etc/grub.d/10_linux ###    ### BEGIN /etc/grub.d/20_linux_xen ###  ### END /etc/grub.d/20_linux_xen ###    ### BEGIN /etc/grub.d/20_memtest86+ ###  ### END /etc/grub.d/20_memtest86+ ###    ### BEGIN /etc/grub.d/30_os-prober ###  ### END /etc/grub.d/30_os-prober ###    ### BEGIN /etc/grub.d/40_custom ###  # This file provides an easy way to add custom menu entries.  Simply type the  # menu entries you want to add after this comment.  Be careful not to change  # the 'exec tail' line above.  ### END /etc/grub.d/40_custom ###    ### BEGIN /etc/grub.d/41_custom ###  if [ -f  ${config_directory}/custom.cfg ]; then    source ${config_directory}/custom.cfg  elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then    source $prefix/custom.cfg;  fi  ### END /etc/grub.d/41_custom ###    ### BEGIN /etc/grub.d/80_suse_btrfs_snapshot ###  ### END /etc/grub.d/80_suse_btrfs_snapshot ###    ### BEGIN /etc/grub.d/90_persistent ###  ### END /etc/grub.d/90_persistent ###  

I did install grub on /dev/sdb. Please find the output.

# grub2-install /dev/sdb  Installing for i386-pc platform.  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  grub2-install: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  error: cannot read `/dev/sda': Input/output error.  grub2-install: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..  Installation finished. No error reported.  

Not sure why it gave sda errors though.

And then cross checked with following command again.

  # dd bs=512 count=1 if=/dev/sdb 2>/dev/null| strings      ZRr=      `|f      \|f1      GRUB      Geom      Hard Disk      Read       Error  

Centos 7 firewalld opened a port but cannot get connected

Posted: 06 Oct 2021 10:04 AM PDT

I have port 5000 via the firewalld in centos 7 as shown below.

 firewall-cmd --list-all  public (active)    target: default    icmp-block-inversion: no    interfaces: ens32    sources:    services: dhcpv6-client http ssh    ports: 5000/tcp    protocols:    masquerade: no    forward-ports:    sourceports:    icmp-blocks:    rich rules:  

Then I check my active zone f

firewall-cmd --get-active-zones  public  

Then I check the port itself

firewall-cmd --zone=public --query-port=5000/tcp  yes  

But when I telnet to the port 5000 is not responding what else could be missing in terms of configuration ?

I have checked there is not other firewall cause when I run this systemctl stop firewalld all works fine.

Here is what and how I run the telnet commands

Microsoft Telnet> o *.*.*.*  5000  Connecting To *.*.*.*...Could not open connection to the host, on port  50  00: Connect failed  

Change atop log interval from 10 minutes to 1 minute

Posted: 06 Oct 2021 10:07 AM PDT

I'm having post-mortem atop log on Ubuntu machine, which I'm able to view with

atop -r  

The problem is that log files are shown in 10 minute intervals with t and Shift+t, while I would prefer 1 minute intervals. When current time is changed with b, it is quantized to nearest 10 minute point.

I have a line in /etc/init.d/atop, but I'm not sure if it affects anything here:

INTERVAL=60  

How can I make atop logs to be browsed with 1 minute accuracy with t and Shift+t?

Is the information between these 10 minute intervals already lost?

What are the possible workarounds if this is not possible?

How to determine if computer has TPM (Trusted Platform Module) available

Posted: 06 Oct 2021 09:48 AM PDT

Wanting to play around with Trusted Platform Module stuff, I installed TrouSerS and tried to start tcsd, but I got this error:

TCSD TDDL ERROR: Could not find a device to open!  

However, my kernel has multiple TPM modules loaded:

# lsmod | grep tpm  tpm_crb                16384  0  tpm_tis                16384  0  tpm_tis_core           20480  1 tpm_tis  tpm                    40960  3 tpm_tis,tpm_crb,tpm_tis_core  

So, how do I determine if my computer is lacking TPM vs TrouSerS having a bug?

Neither dmidecode nor cpuid output anything about "tpm" or "trust". Looking in /var/log/messages, on the one hand I see rngd: /dev/tpm0: No such file or directory, but on the other hand I see kernel: Initialise system trusted keyrings and according to this kernel doc trusted keys use TPM.

EDIT: My computer's BIOS setup menus mention nothing about TPM.

Also, looking at /proc/keys:

# cat /proc/keys   ******** I--Q---     1 perm 1f3f0000     0 65534 keyring   _uid_ses.0: 1  ******** I--Q---     7 perm 3f030000     0     0 keyring   _ses: 1  ******** I--Q---     3 perm 1f3f0000     0 65534 keyring   _uid.0: empty  ******** I------     2 perm 1f0b0000     0     0 keyring   .builtin_trusted_keys: 1  ******** I------     1 perm 1f0b0000     0     0 keyring   .system_blacklist_keyring: empty  ******** I------     1 perm 1f0f0000     0     0 keyring   .secondary_trusted_keys: 1  ******** I------     1 perm 1f030000     0     0 asymmetri Fedora kernel signing key: 34ae686b57a59c0bf2b8c27b98287634b0f81bf8: X509.rsa b0f81bf8 []  

Determine the name of the static/dynamic library

Posted: 06 Oct 2021 10:00 AM PDT

Quite often I am using third party snippets of C code that uses a Unix/Linux C library, an example #include <glib.h>, #include <net/if.h>. And they require me to know the specific library file name or pkg-config name, an example -lglib-2.0, -lbluetooth, pkg-config --libs dbus-1. Note that a lot of them differ from the header file having a '2.0', '1' so you just can't guess it.

How the heck can I find out the exact name of the library file an API/library has? Using my examples above; how do I find that #include <glib.h>'s library file is called -lglib-2.0? It's quite frustrating that the online references for Glib/dbus/all of them don't just say "the name of the library file is glib-2.0".

Are there any terminal commands I can use to find this out? Are there utilities I can use to find this out? Online API/Library references are really bad for finding this out.

If I want to find where hci.h is located I can easily just go locate hci.h and find its location. Is there anything like a terminal command for finding out the library name?

Diagnosing a mdm/Cinnamon freezing problem?

Posted: 06 Oct 2021 09:03 AM PDT

I use Linux Mint 16 64-bit Cinnamon. I've just deployed it on two computers and (again) suffer from spontaneous freezing of the graphics terminal. Fortunately the rest of the system seems to be running OK, and I can switch to another virtual terminal and do stuff to diagnose the problem.

Logs (syslog, Xorg.0.log, mdm/:0.log) don't reveal anything except for AIGLX: Suspending AIGLX clients for VT switch which is normal when you switch to another virtual terminal. Unfortunately, this log entry never gets coupled with the entry that tells it is resuming...

Symptoms:

  • Freezing happen spontaneously, ca once per 8 hours. So far I cannot find anything that can correlate with the freezing event.
  • No screen update under the graphical terminal.
  • I can still switch between virtual terminals with Alt+Ctrl+Fx
  • All applications still work; music plays, and I can still interact with running applications, like VirtualBox (if it is currently running). I didn't test xdotool and wmctrl
  • Mouse cursor icon is visible and you can control it with the mouse. Clicks are ignored.
  • Mouse cursor icon changes while hovering under different zones of windows drawn on the screen, just like it would if the system was working normally.
  • It looks like the keyboard is ignored too; except for Ctrl+Alt+Backspace (if a correct script is loaded which intercepts this key combination). Ctrl+Alt+T (to display terminal), Alt + F2 (to show "Run command..." dialog) are ignored.

The problem is concerning only the Linux Mint 16 (I never experienced anything like that on Linux Mint 15). I am able to reproduce these symptoms on two computers: desktop PC with ASUS 990FX motherboard, and on ASUS N56VZ notebook. The previous installation of Linux Mint 16 on the notebook was free from the problem. Unfortunately I decided to expand the hard drive and reinstalled the system. I still posses the HDD with the previous installation, so I can theoretically I can do some form of diff between them. But both installations should be the same - the only thing I really changed was a bigger hard drive, but unless you use some form automation (like Puppet), you are never able to install two systems identically.


Edit: This specific problem seems to be related to the event of desktop change.

It can be reproduced by:

  1. Install the Linux Mint 16 with Cinnamon 2.0 64 bit
  2. Install a program that changes wallpaper (tested on variety, and wallch) and set it to start changing wallpaper as the background task.
  3. Wait for background to change several times. The bug doesn't kick in on the first background change, you need to wait a moment.
  4. On the .xsession.errors you will see something like that.

No comments:

Post a Comment