Tuesday, October 12, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Question regarding port forwarding from local to remote

Posted: 12 Oct 2021 10:39 AM PDT

Hi am just learning some port forwarding concepts and my doubt/question is below. I have a remote ec2 where jasper (j.s.p.r) is running on 7000 port, i can only access this jasper ec2 instance via a bastion server b.s.t.n then ssh to j.s.p.r . Now my question is i need to be able to deploy the jasper reports from local jasper studio directly on to the j.s.p.r server by forwarding my port. So here is what i am using to achieve the same but not successfully.

ssh -N -L 7000:j.s.p.r:7000 -p 22 xxid@b.s.t.n  

How to scp files from a ssh cli to my local computer

Posted: 12 Oct 2021 10:36 AM PDT

I'm using ssh to enter the command line interface of my remote machine, and I'd like to scp files there to my local machine.

I got my local IP address using ifconfig, say it's aaa.bbb.c.ddd, and in the remote machines' cli I ran:

scp ./* myname@aaa.bbb.c.ddd:~/

And the scp command hanged for a while, and gave:

ssh: connect to host aaa.bbb.c.ddd port 22: Connection timed out  lost connection  

Is there a way to work around this? Note that I only want to run scp from the remote machine's cli. Thanks!

Polkitd uses too much percent of CPU

Posted: 12 Oct 2021 10:29 AM PDT

Im using ispmanager panel on centos and noticed that polkitd uses almost 100% of the CPU, what could it be? Nginx, php-fpm, MySQL with direct access

htop:enter image description here

Decrypt automatically boot partition in Fedora 34

Posted: 12 Oct 2021 09:35 AM PDT

I recently installed Fedora 34 on my laptop and I need an easy way to decrypt automatically my luks2 root partition.

I tried this guide: https://forums.centos.org/viewtopic.php?t=53452 and worked on a controlled environment (VM) but doesn't work on my laptop, even with secure boot disabled. Then I came across this guide https://chrisx.xyz/blog/auto-decrypt-root-volumes-with-tpm2/ . Is it good to decrypt the root partition with TPM?

Found also this guide that was kinda interesting but it's outdated https://askubuntu.com/questions/59487/how-to-configure-lvm-luks-to-autodecrypt-partition

My idea was to decrypt the root partition using a USB stick with a key file on it, for security reasons it sould be encrypted.

Hardware:

Huawei Matebook D14 (3500u) with fTPM 2 and secure boot disabled

Activate pop up to confirm ssh-agent access through agent forwarding

Posted: 12 Oct 2021 10:24 AM PDT

I have a successful ssh connection with agent forwarding activated on my Ubuntu 21.04. This is my ~/.ssh/config:

Host my_host      HostName server_address      User my_username      LocalForward localhost:8899 localhost:8899      ForwardAgent yes  

Because ssh-agent forwarding allows unrestricted access to my local ssh-agent, I would like to confirm each access with a pop up on my local machine. However, this would only be necessary for requests from the remote ssh connection, not from my local machine. Is there a way to achieve this?

I know there is Guardian Agent, however I was looking for a more standard approach, potentially only editing the config file.

If there is a white space remove it, if none ignore

Posted: 12 Oct 2021 10:08 AM PDT

I want to create a .csv file from a program output. I have tailored some of the original output to this level.

  36.343074719185125    -1.488697037254009     0.517768286726280  -1.488697037254009    48.906350248447872    -0.255764113311881   0.51776828  6726280    -0.255764113311881    31.687963239227631  

I have used these commands till now,

tail -12 Q.out | head -3 | sed 's/^........//' | tr -d '\n' > q.txt  

The problem is there is no specific number of whitespaces in between. Sometime there are 4 or sometime 3. This all depend on the output of the program. For instance, if the first value is 36.343 then there are two space at the front, if it is 3.6 there are three spaces, if it is 360.34 then one space. Is there any way to make it cleaner?

Original Data

                     0                     1                     2                0     36.343074719185125    -1.488697037254009     0.517768286726280      1     -1.488697037254009    48.906350248447872    -0.255764113311881      2      0.517768286726280    -0.255764113311881    31.687963239227631        alpha_(0.000) =      38.979129402287 a.u.  FCHKWriter: !WARNING! method 'CCSD'' renamed to label 'CC'.  FCHKWriter: Writing 0100-A_ccsd.fchk with label ' CC Density'.        Psi4 stopped on: Tuesday, 12 October 2021 04:09PM      Psi4 wall time for execution: 0:17:43.19    *** Psi4 exiting successfully. Buy a developer a beer!    

Expected result

36.343074719185125,-1.488697037254009,0.517768286726280,-1.488697037254009,48.906350248447872,-0.255764113311881,0.51776828  6726280,-0.255764113311881,31.687963239227631  

I am using UBUNTU 20.04

What exactly is the Openssl -md flag used for?

Posted: 12 Oct 2021 09:20 AM PDT

I was just playing around with openssl for decrypting some files.

The command I ended up using looks like so (found it elsewhere):

openssl enc -d -aes-256-cbc -md sha256 -iv 0 -in in.enc -out out.data  

I was looking at the part that says -md sha256. I tried looking in in the documentation, but it only has flags where a number after "md" is defined. But I couldnt find what the -md flag is and what it is used for.

I assume that it is a hash function which in someway is used internally in the encryption/decryption function that I am defining. But what exactly it is used for?

How does Linux display Unicode characters?

Posted: 12 Oct 2021 10:16 AM PDT

I have a simple Python PIL script that's render some list of unicode symbols with FreeSerif font, which is have the most full unicode support (about 65k glyph)

but in reality Arch Linux with last version of KDE Plasma can render more

meanwhile as main OS font i'm using Noto - which is have very poor coverage

can someone explain why?

enter image description here

Filesystem "Operation not permitted", even as sudo

Posted: 12 Oct 2021 08:58 AM PDT

I have a directory that I'm unable to perform any filesystem operation on.

I'll paste below the attempts I made to find the issue.

I tried ls -al and the permissions looked good. I tried getfacl and the permissions looked good. I tried strace and didn't see any information that would help point to the issue.

The directory is normal in every way that I can tell. Inside the directory, I have some subdirectories that some RAID volumes get mounted to. The mounts work. I can create files under mnt/mymount/etc... but I can't do anything at mnt/.

eihli@molavia:~$ mkdir mnt/foo  mkdir: cannot create directory 'mnt/foo': Operation not permitted    eihli@molavia:~$ touch mnt/foo  touch: setting times of 'mnt/foo': No such file or directory    eihli@molavia:~$ ls -al mnt  total 28  drwxr-xr-x   7 eihli eihli 4096 Sep  8 09:35 .  drwxr-xr-x  33 eihli eihli 4096 Oct 12 10:22 ..  drwxr-xr-x   3 eihli eihli 4096 Sep  7 11:24 data  drwxrwsr-x+  5 eihli share 4096 Oct 12 10:39 hitraid  drwxr-xr-x   2 eihli eihli 4096 Aug 17 09:32 ssd1  drwxr-xr-x   2 eihli eihli 4096 Aug 22 13:04 usb  drwxr-xr-x   2 root  root  4096 Sep  7 19:46 wd500raid    eihli@molavia:~$ sudo getfacl mnt  # file: mnt  # owner: eihli  # group: eihli  user::rwx  group::r-x  other::r-x    eihli@molavia:~$ strace touch mnt/foo  execve("/usr/bin/touch", ["touch", "mnt/foo"], 0x7fffdd2a6e28 /* 48 vars */) = 0  brk(NULL)                               = 0x55b68276e000  ...  openat(AT_FDCWD, "mnt/foo", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 EPERM (Operation not permitted)  utimensat(AT_FDCWD, "mnt/foo", NULL, 0) = -1 ENOENT (No such file or directory)  ...  close(1)                                = 0  close(2)                                = 0  exit_group(1)                           = ?  +++ exited with 1 +++  

pdsh and command exit code

Posted: 12 Oct 2021 08:52 AM PDT

I would like to use pdsh to assert that a command successfully run on multiple nodes, if the command fails on any nodes the exit code (from pdsh) should be non-zero.

Consider the following examples:

$ pdsh -w host1,host2 "exit 0"; echo $?  host1: host1  host2: host2  0  
$ pdsh -w host1,host2 "exit 1"; echo $?  host1: host1: ssh exited with exit code 1  host2: host2: ssh exited with exit code 1  0  
$ pdsh -w host1,host2,host3 "exit 1"; echo $?  host1: host1: ssh exited with exit code 1  host2: host2: ssh exited with exit code 1  host3: host3: ssh exited with exit code 255  0  

The second example should return a non-zero exit code.

In the third example host3 does not exist and still the exit code is zero.

Am I missing something?

Thanks

How can I set default display settings when switching KVM?

Posted: 12 Oct 2021 07:41 AM PDT

I have a desktop running XFCE on Manjaro Linux with dual monitors. I use a KVM switch to go back and forth between my desktop and my laptop using those two monitors.

Every time I switch between the laptop and desktop, my Manjaro desktop changes the display settings to Mirror, and then when I change it back to dual display instead of mirror displays, it has the monitors reversed.

Is there a way to set persistent display settings, so that it always keeps my monitors in the correct orientation, and doesn't ever try to mirror my displays?

USB 3.1 hub doesn't work properly on Thinkpad laptop

Posted: 12 Oct 2021 07:25 AM PDT

for quite a long time I was using USB 3.0 hub with my mouse, keyboard, Audio DAC, and xrl to usb interface. Everything was working fine but recetly I decided to buy new USB 3.1 hub, this time with a fancy switch that allows to switch between two computers. The problem is that now, with my brand new USB 3.1 hub, only my mouse and keyboard work while audio devices don't.

My laptop is Lenovo Thinkpad T470P and currently working on 5.15.0-1-MANJARO (today changed from 5.13 to experimental 5.15 hoping it might help). Thank you for your time in advance.

Below both hubs are connected.

~ ❯ lsusb -t          /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M          |__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M          |__ Port 1: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 12M          |__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M          |__ Port 2: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 12M          |__ Port 2: Dev 6, If 1, Class=Audio, Driver=snd-usb-audio, 12M          |__ Port 2: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 12M          |__ Port 2: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M          |__ Port 3: Dev 8, If 2, Class=Human Interface Device, Driver=usbhid, 12M          |__ Port 3: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M          |__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 12M          |__ Port 3: Dev 8, If 1, Class=Human Interface Device, Driver=usbhid, 12M      |__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M      |__ Port 7: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M      |__ Port 7: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M      |__ Port 8: Dev 7, If 1, Class=Video, Driver=uvcvideo, 480M      |__ Port 8: Dev 7, If 0, Class=Video, Driver=uvcvideo, 480M      |__ Port 9: Dev 9, If 0, Class=Chip/SmartCard, Driver=, 12M  
~ ❯ sudo dmesg | grep -E 'usb|audio|alsa'  [    9.387551] usb 1-2.2: 2:2: usb_set_interface failed (-28)  [    9.388521] usb 1-2.2: Not enough bandwidth for new device state.  [    9.388524] usb 1-2.2: Not enough bandwidth for altsetting 2  [    9.388526] usb 1-2.2: 2:2: usb_set_interface failed (-28)  [    9.389294] usb 1-2.2: Not enough bandwidth for new device state.  [    9.389297] usb 1-2.2: Not enough bandwidth for altsetting 2  
~ ❯ lsusb                 Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  Bus 001 Device 009: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader  Bus 001 Device 007: ID 04f2:b5c0 Chicony Electronics Co., Ltd Integrated Camera  Bus 001 Device 005: ID 8087:0a2b Intel Corp. Bluetooth wireless interface  Bus 001 Device 003: ID 138a:0097 Validity Sensors, Inc.   Bus 001 Device 008: ID 04d9:a231 Holtek Semiconductor, Inc. USB-HID Keyboard  Bus 001 Device 006: ID 1852:7921 GYROCOM C&C Co., LTD Audiotrak ProDigy CUBE  Bus 001 Device 004: ID 046d:c539 Logitech, Inc. USB Receiver  Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  

Squid fails to block Facebook

Posted: 12 Oct 2021 07:51 AM PDT

I have squid proxy server running on Centos 8 its failed to block any https site.

#  # Recommended minimum configuration:  #    # Example rule allowing access from your local networks.  # Adapt to list your (internal) IP networks from where browsing  # should be allowed  #acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)  #acl localnet src 10.0.0.0/8        # RFC 1918 local private network (LAN)  #acl localnet src 100.64.0.0/10     # RFC 6598 shared address space (CGN)  #acl localnet src 169.254.0.0/16    # RFC 3927 link-local (directly plugged) machines  #acl localnet src 172.16.0.0/12     # RFC 1918 local private network (LAN)  #acl localnet src 192.168.0.0/16        # RFC 1918 local private network (LAN)  #acl localnet src fc00::/7          # RFC 4193 local private network range  #acl localnet src fe80::/10         # RFC 4291 link-local (directly plugged) machines    acl localnet src 200.200.200.0/24  http_access allow localnet    acl SSL_ports port 443  acl Safe_ports port 80      # http  acl Safe_ports port 21      # ftp  acl Safe_ports port 443     # https  acl Safe_ports port 70      # gopher  acl Safe_ports port 210     # wais  acl Safe_ports port 1025-65535  # unregistered ports  acl Safe_ports port 280     # http-mgmt  acl Safe_ports port 488     # gss-http  acl Safe_ports port 591     # filemaker  acl Safe_ports port 777     # multiling http  acl CONNECT method CONNECT    #  # Recommended minimum Access Permission configuration:  #  # Deny requests to certain unsafe ports  http_access deny !Safe_ports    # Deny CONNECT to other than secure SSL ports  http_access deny CONNECT !SSL_ports    # Only allow cachemgr access from localhost  http_access allow localhost manager  http_access deny manager    # We strongly recommend the following be uncommented to protect innocent  # web applications running on the proxy server who think the only  # one who can access services on "localhost" is a local user  #http_access deny to_localhost    #  # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS  #badsite block  #acl badsite url_regex "/etc/squid/block"  #http_access deny badsite   acl badsite dstdomain .facebook.com  http_access deny badsite    # Example rule allowing access from your local networks.  # Adapt localnet in the ACL section to list your (internal) IP networks  # from where browsing should be allowed  http_access allow localnet  http_access allow localhost    # And finally deny all other access to this proxy  http_access deny all    # Squid normally listens to port 3128  http_port 3128    # Uncomment and adjust the following to add a disk cache directory.  #cache_dir ufs /var/spool/squid 100 16 256    # Leave coredumps in the first cache dir  coredump_dir /var/spool/squid    #  # Add any of your own refresh_pattern entries above these.  #  refresh_pattern ^ftp:       1440    20% 10080  refresh_pattern ^gopher:    1440    0%  1440  refresh_pattern -i (/cgi-bin/|\?) 0 0%  0  refresh_pattern .       0   20% 4320  

Shift of dates in a CSV file via bash script

Posted: 12 Oct 2021 08:04 AM PDT

Currently I have a file with records like this :

D20211011,S0519,306668,1  D20211004,S1600,306668,1  D20211009,S1604,306668,1  D20211010,S1605,306668,1  D20211006,S1610,306668,1  D20211011,S1611,306668,1  

Assuming that the current date is 20211011, I need to apply a transformation on the rows only where date is less than the current date and that row with date in the past should be updated to current date.

In the example shared above, transformation should be done on rows 2 to 5.

D20211004,S1600,306668,1 -> D20211011,S1600,306668,1  D20211009,S1604,306668,1 -> D20211011,S1604,306668,1  D20211010,S1605,306668,1 -> D20211011,S1605,306668,1  D20211006,S1610,306668,1 -> D20211011,S1610,306668,1  

how can I make a webpage rendered by w3m reload automatically?

Posted: 12 Oct 2021 07:48 AM PDT

While rendering a webpage (say https://www.ubuntu.com) with w3m, how to enable meta_refresh for it?

I know I need to add:

<meta http-equiv="refresh" content="5; URL=https://www.ubuntu.com"/>  

to it's html so it can be refreshed every 5 seconds. But what will the w3m command line with said addition look like, if it can be done?

Not able to install Teams on Ubuntu

Posted: 12 Oct 2021 09:31 AM PDT

When I try to install Teams on my Ubuntu 16 laptop by command

sudo apt-get install teams  

I get the below error

Reading package lists... Done  Building dependency tree         Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:   teams : Depends: libgtk-3-0 (>= 3.19.12) but 3.18.9-1ubuntu3.3 is to be installed  E: Unable to correct problems, you have held broken packages.  

Configuring vsftpd to be accessible remotely

Posted: 12 Oct 2021 08:37 AM PDT

I am trying to access my vsftpd server remotely from a different network.I forwarded the ports 21 and 10000-10100.

Edit: As it turns out my port is not forwarding correctly(Thanks to @ Artem S. Tashkinov for the open port tester link).It might have to do something with my dual router setup.Thank you all for the help you guys provided.

dnf breaks when changing symlink from python3.9 to 3.10

Posted: 12 Oct 2021 07:43 AM PDT

I am completely baffled. on Fedora34 and python 3.9.7 dnf works as it should.

I have changed to the /usr/bin directory for this.

If I change the symlink to 3.10 as in the following, dnf breaks:

➜  bin ln -s -f python3.10 python3  ➜  bin dnf  Traceback (most recent call last):    File "/usr/bin/dnf", line 57, in <module>      from dnf.cli import main  ModuleNotFoundError: No module named 'dnf'  

Then I change it back to 3.9 and dnf works.

➜  bin ln -s -f python3.9 python3     ➜  bin dnf  usage: dnf [options] COMMAND  etc...  

Can someone explain this to me and how to update the system so that having the python3 command point to 3.10 without breaking dnf?

How to add fsck at boot like a regular service?

Posted: 12 Oct 2021 09:47 AM PDT

I remember that certain distros, used to run fsck at boot after x boots, in a regular way.

How can be added to the boot process the fsck service to be

  1. deployed in rpm distro/Fedora,RHEL,Oracle,Suse?
  2. deployed in any distro/Arch,Debian,Slackware?

Thanks

I need some service that trigger actions once after any file is created, modified, deleted, copied or moved

Posted: 12 Oct 2021 08:12 AM PDT

The problem is that I'm not being able to keep track of all my files and I'm also tired of not telling which ones are important and which ones are a temporary file that some random programmer decided that it would look nice as a hidden file on my home folder.

I keep copies and organize my drives, but chaos happens sometimes.

For this I though that something that would help me to create and modify xattrs each time a file changes or is created would be very helpfull.

I tried with creating a service based in inotify but the problem is that it's low level description doesn't help that much and I would need more development to be sure that it's possible but I suspect that it's not.

The idea is to keep a record which app created foo, when, why, where, when it was moved from where to where,when it was copied from where to where, how many copies it haves, where are they, what files were deleted from it's directory, etc.

May be I'm asking too much to the filesystem, but can you give me some ideas?

Sending bunch of commands from txt file in Expect

Posted: 12 Oct 2021 09:10 AM PDT

How to send bunch of commands to Cisco router from txt file like:

configure  class-map match-any popc_fiberpower004_booster_v4   match access-group ipv4 bng_permit_v4   match access-group ipv6 bng_permit_v6  end-class-map  policy-map popc_fiberpower004_booster_v4_in   class popc_fiberpower004_booster_v4    police rate 110 mbps    set dscp 0   class class-default  end-policy-map  

And of course from Expect script via telnet. Thank you in advance for help.

Pulseaudio issues with module-echo-cancel not cancelling audio

Posted: 12 Oct 2021 10:41 AM PDT

EDIT: Ok so it appears to be working... kind of... sometimes the cancellation kicks in, other times it doesn't within the same call. This is not solved would still love some input.


2nd EDIT: I've posted in the Pulseaudio IRC so hopefully get some advice on this setup.


I have pulseaudio loading the module-echo-cancel and it doesn't seem to be working properly, or it is and I'm not doing something right... I honestly have no way to confirm which I suppose is my first issue.

My architecture is fairly simple, I have a windows 10 machine that I'm rdp'ing into from Linux.

Default source:

  • ATR (with echo cancel at HDMI)

Default Sink:

  • HDMI (with echo cancel at ATR)

I shouldn't think that remote access would affect the cancellation as it's still being processed locally from the HDMI speakers directly into the microphone, both of which are local devices.

Here is how I am loading module-echo-cancel in ~/.config/pulse/default.pa and I can only assume it is loading given that I can see the devices (as listed above) in pasystray.

.ifexists module-echo-cancel.so  load-module module-echo-cancel source_master=alsa_input.usb-Conference_USB_microphone_ATR4697-USB-00.mono-fallback sink_master=alsa_output.pci-0000_00_03.0.hdmi-stereo source_name=echocancel sink_name=echocancel1  set-default-source echocancel  set-default-sink echocancel1  .endif  

Are there any extra controls I need to consider or should this work OOTB? I can't see anything in the manual that could be relevant.

How do you make a process a service under systemd?

Posted: 12 Oct 2021 09:22 AM PDT

what is the command or how would you make a process into a service in Linux? isn't a service basically a daemon?

LVM Volume Group not found

Posted: 12 Oct 2021 09:47 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. The hardware RAID controller is HPE Smart Array P408i-p SR Gen10 controller with firmware version 3.00. Four HPE SSDs model MK001920GWXFK in a RAID 1+0 configuration. The server model is HPE Proliant DL380 Gen10.

No software raid, no encryption.

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

EDIT I:

/proc/partitions looks good enter image description here

blkid enter image description here

Where

  • /dev/sdc1 is /boot/efi
  • /dev/sdc2 is /boot
  • /dev/sdc3 is the PV

Booting from an older kernel version worked once until executing apt update && apt upgrade. After the upgrade the older kernel had the same issue.

EDIT II:

In the module /proc/modules I can find the following entry: smartpqi 81920 0 - Live 0xffffffffc0626000

No output for lvm pvs in initramfs shell.

Output for lvm pvchange -ay -v

No volume groups found.  

Output for lvm pvchange -ay --partial vg-ubuntu -v

PARTIAL MODE. Incomplete logical volumes will be processed.  VG name on command line not found in list of VGs: vg-ubuntu  Volume group "vg-ubuntu" not found  Cannot process volume group vg-ubuntu  

There is a second RAID controller with HDDs connected to another PCI slot; same model P408i-p SR Gen10. There is a volume group named "cinder-volumes" configured on top of this RAID. But this VG can't be found either in initramfs.

EDIT III:

Here is a link to the requested files from the root FS:

  • /mnt/var/log/apt/term.log
  • /mnt/etc/initramfs-tools/initramfs.conf
  • /mnt/etc/initramfs-tools/update-initramfs.conf

How to deal with www.postgres.org certificate expired?

Posted: 12 Oct 2021 08:15 AM PDT

I've started getting errors when getting certificate keys from the postgres website:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -  #6 0.310 --2021-10-04 20:56:35--  https://www.postgresql.org/media/keys/ACCC4CF8.asc  #6 0.315 Resolving www.postgresql.org (www.postgresql.org)... 87.238.57.232, 72.32.157.230, 217.196.149.50, ...  #6 0.318 Connecting to www.postgresql.org (www.postgresql.org)|87.238.57.232|:443... connected.  #6 0.902 ERROR: The certificate of 'www.postgresql.org' is not trusted.  #6 0.902 ERROR: The certificate of 'www.postgresql.org' has expired.  

Which I tried working around by using --no-check-certificate, but then I get a different issue when installing the postgres libraries:

apt-get update \      && DEBIAN_FRONTEND=noninteractive apt-get install -y \      postgresql-client-common postgresql-client-13 \      && rm -rf /var/lib/apt/lists/*    #9 2.579   404  Not Found [IP: 147.75.85.69 80]  #9 2.606 Fetched 7888 kB in 2s (3486 kB/s)  #9 2.606 Reading package lists...  #9 2.974 W: The repository 'http://apt.postgresql.org/pub/repos/apt -pgdg Release' does not have a Release file.  #9 2.974 E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/-pgdg/main/binary-arm64/Packages  404  Not Found [IP: 147.75.85.69 80]  #9 2.974 E: Some index files failed to download. They have been ignored, or old ones used instead.  

Is there another way to deal with this? It suddenly started happening today.

How to convert my Fedora Linux system from BIOS to UEFI

Posted: 12 Oct 2021 09:35 AM PDT

I'm changing my BIOS boot Fedora system to UEFI. I was following the guide here:

How to convert an Arch Linux system from BIOS to UEFI?

I have /dev/sda1 as a 1GB /boot partition. This has flags "boot" and is ext4. See the image here:

enter image description here

The guide says to convert to UEFI I need:

- "EFI System" partition with type EF00, VFat formatted, and mounted at /boot/efi  - A small Linux partition, mounted at /boot  

efibootmgr -v gives "EFI variables are not supported on this system."

What would I have to do to change my partitions to match this - please be specific with commands, as I'm fairly new to this I have got a bit lost.

Thanks in advance

How to OCR a PDF file and get the text stored within the PDF?

Posted: 12 Oct 2021 07:33 AM PDT

First, apologies if this has been asked before - I searched for a while through the existing posts, but could not find support.

I am interested in a solution for Fedora to OCR a multipage non-searchable PDF and to turn this PDF into a new PDF file that contains the text layer on top of the image. On Mac OSX or Windows we could use Adobe Acrobat, but is there a solution on Linux, specifically on Fedora?

This seems to describe a solution - but unfortunately I am already lost when retrieving exact-image.

What to do if the owner of /usr/bin/* changes to a non-root?

Posted: 12 Oct 2021 10:08 AM PDT

It would be the right thing to say that I messed up!

Accidentally, I changed the owner of all files in /usr/bin to 'dev' from 'root'. Now, sudo does not work! If I use sudo with any command, I get -

sudo: effective uid is not 0, is sudo installed setuid root?

I cannot use chown command to change the owner back to 'root'. This is a major set back!

Because this is a Virtual Machine, I cannot access the Recovery Console. Infact, even the reboot command needs the user to have 'root' access.

Experts, please help me in getting control of the OS without having to re-image.

Thanks!

P.S - Possibly a duplicate but reposting as his solution was to start afresh.

More info -

su - root always says incorrect password. Unfortunately, the owner of su is also 'dev'.

I am able to create a new user using the GUI. It accepted the root password. How do I grant the new user with root access without using visudo.

Failed to open vdpau backend - Nouveau

Posted: 12 Oct 2021 08:09 AM PDT

I'm using ArchLinux and when I run vlc or mplayer, I used to get the error

Failed to open VDPAU backend libvdpau_nouveau.so: cannot open shared object file: No such file or directory  

This doesn't seem to cause any error as far as video playback is concerned, but I want to know the reason for this problem.

I referred to this post in UbuntuForums and one of the suggestions to solve the problem was to install nouveau-fw. Looking at the installed files by the nouveau-fw package, I couldn't find libvdpau_nouveau.so at all in the list, but surprisingly mplayer stopped showing the error after installing the package. But vlc still continues to show the error.

The only other solution given in the post was to install official nvidia drivers. I'm hoping to avoid this and just use the open-source drivers. Hoping someone can provide a solution to this.

No comments:

Post a Comment