Autosys failure after 24 hours Posted: 17 Dec 2021 06:29 AM PST I have an Autosys job launching Datastage. Job fails in Autosys after 24 hours, but continues to run in datastage. Maxrun time set at 2000 mins, but Autosys fails at 24 hours +- 1 minute. Is there a time limit for the listening process? |
Samba: permission denied Posted: 17 Dec 2021 06:22 AM PST I have a server with a host and a Virtualbox VM. The host is running CentOS 7 and it is updated. Indeed the VM is running CentOS 5 and I know this OS is not supported by several years but I can't update it now. The alert of the problem is too generic and it's shown when I try to mount on the VM the samba folder that is living on the host: mount error 13 = permission denied I just followed this guide: Install and configure samba CentOS 7 Samba version: Host -> samba 5 VM -> samba 3 I tried: Disabling firewalld and SELinux Using NFS Change password of users and use several users But all this got nothing changed. Hope y'all got tips and solutions for me. Thanks in advance |
Removing lines with empty fields in CSV by sed Posted: 17 Dec 2021 06:00 AM PST I have a CSV file with two columns. The first is ID (int) and the second is text. All lines have the ID column. I want to remove files where the second column is empty (zero-length or space only). I tried sed -i '/^[0-9]+,\s*$/d' file.csv but it does not work. |
ImportError /usr/lib64/libQt5Core.so.5 - in several software packages Posted: 17 Dec 2021 05:35 AM PST Working with Fedora 35: I want to run a few different software packages that share a dependency, seemingly Qt. In the shell, I get this response, from Cadence and other software: ImportError: /lib64/libQt5Core.so.5: version `Qt_5_PRIVATE_API' not found (required by /usr/local/lib/python3.10/site-packages/PyQt5-5.15.6-py3.10-linux-x86_64.egg/PyQt5/QtCore.abi3.so) ldconfig -p | grep "libQt5Core.so.5" gets me libQt5Core.so.5 (libc6,x86-64, OS ABI: Linux 3.17.0) => /lib64/libQt5Core.so.5 If I remove /lib64/libQt5Core.so.5 I get ImportError: libQt5Core.so.5: cannot open shared object file: No such file or directory Reinstalling python3-pyqt5-sip or other qt , lib or python dependencies does not seem to help. So, libQt5Core.so.5 is found by the system, but it does not work. Though others with Fedora 35 do not have this problem. How can I provide Pathon with the required Qt_5_PRIVATE_API ? |
Use awk to parse input and print multiple columns? Posted: 17 Dec 2021 07:09 AM PST My input file line format is: themostsimpleproject', branch 'debug_randomnness' : AFFECTED. Affected image discovered: [7.19, 8.37] I want to use awk to print - the project name and the version of the affected image. Example: themostsimpleproject 7.19, 8.37 How can i do it in awk. I will prefer a simple code that i can execute over command line. Ex: awk -F"\," 'print $1 $4' . But a simple script is also welcome. Note: i don't want to print the ' at the end of project name. |
How to query USB serial device, capture output and exit? Posted: 17 Dec 2021 05:06 AM PST I have several Arduino devices, connected to linux box. The only difference between them is what they answer on connect. They are not distinguisheable by lsusb command. Although I don't know how to convert output of lsusb to ttyUSB? name, I was unable to find my device anyway: $ lsusb Bus 002 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter Bus 002 Device 006: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter ... But if I connect to a device by cu , I can distinguish them: $ cu -l /dev/ttyUSB0 -s 9600 Connected. OK ~. Disconnected. $ cu -l /dev/ttyUSB1 -s 9600 Connected. Relay module awaiting commands Command 'help' is for help ~. Disconnected. Can I grab such output by cu or by any other means with bash script being able to determine a device? Can't distinguish Arduinos by serial too # udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' ATTRS{serial}=="0000:00:1d.0" # udevadm info -a -n /dev/ttyUSB1 | grep '{serial}' ATTRS{serial}=="0000:00:1d.0" |
What are the possible words to send them over a serial port in order to know what kind of UPS I am dealing with? Posted: 17 Dec 2021 05:47 AM PST Before ANYTING please do NOT change the wording of my question what-so-ever ! Hello. I have a UPS whose driver or protocol is unknown and can be accessed over a serial port. And recommending me a UPS is OK, but now my question is not only about the UPS, it's about anything running on serial port communication. What are the possible words or commands or whatever that I can send over a serial port in order to know what kind of UPS I am dealing with? I know 100% that this is not socket programming and Ethernet thing. I read also this article that lets me know how to tap or sniff a serial port: How to send data to a serial port and see any answer? Let me give you examples to clarify my question. 1- In email smtp server , you can send HELO using telnet to get response to HELO, it verifies that it's an email server. 2- In web server, you can use GET and POST HTTP protocol commands to know that the server is seriously a web server 3- Now I know from the program called "Network UPS Tool (nut)" that there are serial port protocols like megatech . all of them failed to reckon the UPS. and I know there is also AT commands that can be used. What else do you think I should put into account to use them in my guess? thanks. |
Dumping virtual memory addresses of an executable from /proc/pid/maps Posted: 17 Dec 2021 05:01 AM PST I want to dump the virtual memory addresses of a running executable. This is the command I'm running: ./executable & cat /proc/$(pidof executable)/maps > maps.dump , and this is the error I get: cat: /proc//maps: No such file or directory My intention of using & is to keep the executable running in the background so the process will remain alive and its /proc/$(pidof executable) directory will be still there when trying to access it to dump the maps info, but obviously it's not doing so since pidof executable is returning empty which means the process is no longer running. |
OpenVPN daemon keeps my harddrives spinning on NAS home server Posted: 17 Dec 2021 05:42 AM PST I have a home NAS server with OpenVPN daemon installed, however I want to keep my harddrives in idle mode (so they last longer) when nobody actively uses the VPN or files on the NAS. OpenVPN daemon prevents that because it keep writing its PID to the file: root@NAS:~# iotop Total DISK READ: 0.00 B/s | Total DISK WRITE: 3.80 K/s Current DISK READ: 0.00 B/s | Current DISK WRITE: 0.00 B/s TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND 725 be/4 nobody 0.00 B/s 3.80 K/s 0.00 % 0.00 % openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid 1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init 2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd] 3 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_gp] 4 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_par_gp] It is very annoying because I can hear the hard drives spinning on/off whole night and I am worried that because of constant turning spinning it will shorten their lifespan. It is the only process I can see in the iotop using the harddrives so I guess it is the only reason why my harddrives keep spinning constantly during the night. |
fedora bluetooth not working Posted: 17 Dec 2021 04:20 AM PST My bluetooth suddenly stopped working. In the settings I didn't even have access to the button to turn it on or off. The command systemctl status bluetooth give me ➜ systemctl status bluetooth ○ bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: inactive (dead) Docs: man:bluetoothd(8) Dec 17 10:13:18 fedora systemd[1]: Condition check resulted in Bluetooth service being skipped. Dec 17 10:14:06 fedora systemd[1]: Condition check resulted in Bluetooth service being skipped. After a sudo modprobe -r btusb sudo modprobe btusb systemctl restart bluetooth the systemctl status bluetooth give me ➜ systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2021-12-17 10:14:30 CET; 3s ago Docs: man:bluetoothd(8) Main PID: 5335 (bluetoothd) Status: "Running" Tasks: 1 (limit: 18989) Memory: 1.9M CPU: 52ms CGroup: /system.slice/bluetooth.service └─5335 /usr/libexec/bluetooth/bluetoothd Dec 17 10:14:30 fedora systemd[1]: Starting Bluetooth service... Dec 17 10:14:30 fedora bluetoothd[5335]: Bluetooth daemon 5.62 Dec 17 10:14:30 fedora bluetoothd[5335]: Starting SDP server Dec 17 10:14:30 fedora systemd[1]: Started Bluetooth service. Dec 17 10:14:30 fedora bluetoothd[5335]: Bluetooth management interface 1.21 initialized The enable button on the bluetooth setting reappeared but it does nothing... But now i'm enable to do bluetoothctl --monitor , with a list I have 0 result. With devices I have No default controller available . A cold reboot do nothing too. Anything is open rfkill list 0: ideapad_wlan: Wireless LAN Soft blocked: no Hard blocked: no 1: ideapad_bluetooth: Bluetooth Soft blocked: no Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no For dmesg ➜ dmesg | grep -i bluetooth [ 99.703042] Bluetooth: Core ver 2.22 [ 99.703105] NET: Registered PF_BLUETOOTH protocol family [ 99.703105] Bluetooth: HCI device and connection manager initialized [ 99.703108] Bluetooth: HCI socket layer initialized [ 99.703109] Bluetooth: L2CAP socket layer initialized [ 99.703111] Bluetooth: SCO socket layer initialized [ 108.295602] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 108.295605] Bluetooth: BNEP filters: protocol multicast [ 108.295608] Bluetooth: BNEP socket layer initialized ➜ dmesg -t --level=alert,crit,err,warn x86/cpu: SGX disabled by BIOS. MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details. #5 #6 #7 ENERGY_PERF_BIAS: Set to 'normal', was 'performance' ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.XHC.RHUB.TPLD], AE_ALREADY_EXISTS (20210730/dswload2-326) ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS01], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS02], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS03], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS04], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS05], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS06], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS07], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS08], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS09], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS10], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS11], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS12], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.HS13], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.XHC.RHUB.HS14._UPC], AE_ALREADY_EXISTS (20210730/dswload2-326) ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.XHC.RHUB.HS14._PLD], AE_ALREADY_EXISTS (20210730/dswload2-326) ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.USR1], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.USR2], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS01], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS02], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS03], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS04], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS05], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS06], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS07], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS08], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS09], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.XHC.RHUB.SS10], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C2.TPD0], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C3.TPL1], AE_NOT_FOUND (20210730/dswload2-162) ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.PEG0.PEGP._ON], AE_ALREADY_EXISTS (20210730/dswload2-326) ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220) ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.PEG0.PEGP._OFF], AE_ALREADY_EXISTS (20210730/dswload2-326) ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220) i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log. integrity: Problem loading X.509 certificate -65 ipmi_si: Unable to find any System Interface(s) usb 1-14: device descriptor read/64, error -71 wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01) usb 1-14: device descriptor read/64, error -71 r8169 0000:08:00.0: can't disable ASPM; OS doesn't have ASPM control acpi device:4a: Cannot transition to power state D0 for parent in D3hot ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20210730/nsarguments-61) ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20210730/nsarguments-61) usb 1-14: device descriptor read/64, error -71 usb 1-14: device descriptor read/64, error -71 nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 122124 [ PRIVRING ] usb 1-14: Device not responding to setup address. usb 1-14: Device not responding to setup address. usb 1-14: device not accepting address 6, error -71 usb 1-14: Device not responding to setup address. usb 1-14: Device not responding to setup address. usb 1-14: device not accepting address 7, error -71 usb usb1-port14: unable to enumerate USB device kauditd_printk_skb: 18 callbacks suppressed systemd-sysv-generator[887]: SysV service '/etc/rc.d/init.d/livesys' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. systemd-sysv-generator[887]: SysV service '/etc/rc.d/init.d/livesys-late' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. ipmi_si: Unable to find any System Interface(s) systemd-journald[908]: File /var/log/journal/f77120fe512e49eaba005ed0ca8db1dd/system.journal corrupted or uncleanly shut down, renaming and replacing. systemd-journald[908]: File /var/log/journal/f77120fe512e49eaba005ed0ca8db1dd/user-1000.journal corrupted or uncleanly shut down, renaming and replacing. nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 122124 [ PRIVRING ] Result for sudo lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 04ca:7070 Lite-On Technology Corp. Integrated Camera Bus 001 Device 002: ID 056a:0314 Wacom Co., Ltd PTH-451 [Intuos pro (S)] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
using awk with variables in a shell script Posted: 17 Dec 2021 04:56 AM PST I have a file called "random" that looks like this: A B C D A B C D A B C D How can I get this shell script to print up the second column? #! /usr/bin/tcsh -f set variable = "2" awk '{print "$""'"$variable"'" }' random It gives: $2 $2 $2 $2 $2 if I hardcode $2 like this: #! /usr/bin/tcsh -f awk '{print $2 }' random I get B B B But I need to set the value differently each time so hardcoding isn't an option |
Why dd is giving me a different SD card than its source? Posted: 17 Dec 2021 04:32 AM PST I have a 32 Gb SD card with my OS on it (Raspberry Pi OS Buster) and I wish to make a backup using standard dd , using sudo dd if=/dev/sdb of=/mnt/toshiba2tb/pi20211217.img bs=1M The source SD card seems perfectly fine under lsblk --fs db ├─sdb1 vfat RECOVERY 796F-5014 ├─sdb2 ├─sdb5 ext4 SETTINGS 3b129a7c-44fe-4062-8819-2be9ec66edea ├─sdb6 vfat boot 3830-AECC └─sdb7 ext4 root 92847503-3b1f-4e22-9fa0-f6794b8fed0c Once the image is done I copy it with dd onto a (brand) new card sudo dd if=/mnt/toshiba2tb/pi20211217.img of=/dev/sdb bs=1M , and I obtain a different partition table, which does not even boot the RPi sdb ├─sdb1 vfat RECOVERY 796F-5014 └─sdb2 fdisk confirms and reports and absurd 2T partition ... what is going on? $ sudo fdisk -l /dev/sdb Ignoring extra data in partition table 5. Ignoring extra data in partition table 5. Ignoring extra data in partition table 5. Invalid flag 0xffff of EBR (for partition 5) will be corrected by w(rite). Disk /dev/sdb: 29.7 GiB, 31914983424 bytes, 62333952 sectors Disk model: LRWM04U Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000edc50 Device Boot Start End Sectors Size Id Type /dev/sdb1 8192 3781250 3773059 1.8G e W95 FAT16 (LBA) /dev/sdb2 3781251 60751871 56970621 27.2G 5 Extended /dev/sdb5 4298748546 8593715840 4294967295 2T ff BBT More info from sudo /sbin/fdisk -l /mnt/toshiba2tb/pi20211217.img $ sudo /sbin/fdisk -l /mnt/toshiba2tb/pi20211217.img Ignoring extra data in partition table 5. Ignoring extra data in partition table 5. Ignoring extra data in partition table 5. Invalid flag 0xffff of EBR (for partition 5) will be corrected by w(rite). Disk /mnt/toshiba2tb/pi20211217.img: 29 GiB, 31104958464 bytes, 60751872 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000edc50 Device Boot Start End Sectors Size Id Type /mnt/toshiba2tb/pi20211217.img1 8192 3781250 3773059 1.8G e W95 FAT16 (LBA) /mnt/toshiba2tb/pi20211217.img2 3781251 60751871 56970621 27.2G 5 Extended /mnt/toshiba2tb/pi20211217.img5 4298748546 8593715840 4294967295 2T ff BBT |
How to change network interface name Posted: 17 Dec 2021 04:11 AM PST I am trying to write a bash script to configure a number of network interfaces and have issues with some of the NICs getting a Wired Connection name instead of the device name. E.g. $ nmcli dev status DEVICE TYPE STATE CONNECTION ens22 ethernet connected ens22 ens18 ethernet connected Wired connection 2 ens19 ethernet connected ens19 ens20 ethernet connected Wired connection 1 ens21 ethernet connected ens21 lo loopback unmanaged -- The impact of that is these commands fail because it is expecting the Connection Name, not the Device Name: printf "\n${YELLOW}### Configure ens20: ###${NC}\n" sudo nmcli con mod ens20 ipv4.addresses 10.70.20.254/24 sudo nmcli con mod ens20 ipv4.dns 8.8.8.8 sudo nmcli con mod ens20 ipv4.method manual Questions: - What causes only some of the interfaces to get the name "Wired Connection?"
- Is there an option in nmcli to use the interface name instead?
- Is it possible to rename a connection? I have tried to rename the Connection attribute but I can only do it if I modify the connection, not the device.
This works: sudo nmcli connection modify "Wired connection 2" connection.id "ens18" This does not work: sudo nmcli device modify ens18 connection.id "ens18" Thanks |
Automatic SSH prompt input Posted: 17 Dec 2021 05:29 AM PST I'm trying to copy a bunch of RSA keys to multiple servers for a specific user. Whenever I issue the ssh-copy-id command it asks me to confirm by typing "yes", then asks me for the password. I wanted to avoid wearing out my arms and fingers, so, I decided to create a script for this task, something like this: #!/bin/bash runuser -u $RMTUSER -- ssh-copy-id root@172.24.168.47 runuser -u $RMTUSER -- ssh-copy-id root@172.24.168.48 (...) runuser -u $RMTUSER -- ssh-copy-id root@172.24.168.212 runuser -u $RMTUSER -- ssh-copy-id root@172.24.168.213 I can't seem to find a good way to automate that task. Nothing seems to work. How can I input "yes" and the password automatically? I've realized my initial question was quite lackluster. I'm sorry for that... it remains above, though. I've improved the script to something similar to what Marcus proposed. I'm stuck at the "for" loop wondering how to pass that password for different server arrays. My host sets are all static and there's much more. #!/bin/bash LOCUSER="$1" # USER FOR REMOTE ACCESS RMTUSER="$2" # REMOTE USER PASSWD="$3" # SITE PASSWORD SITE="$4" # SERV SITE function uras() { for IP in "$@"; do runuser -u "${LOCUSER}" -- sshpass "-p${PASSWD}" ssh-copy-id "${RMTUSER}@${IP}" [ "$?" -eq "0" ] && echo "OK - $IP" || echo "FAIL! - $IP" done } case $SITE in "sa") ARRAY_A=( $(cat ./serv_a.txt) ) uras "${ARRAY_A[@]}" ;; "sb") ARRAY_B=( $(cat ./serv_b.txt) ) uras "${ARRAY_B[@]}" ;; "sc") ARRAY_C=( $(cat ./serv_c.txt) ) uras "${ARRAY_C[@]}" ;; *) echo "INVALID SITE" ;; esac Still, the script fails for every host. # ./auto_ssh_copy.sh [user] root [pass] [site] /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/zabbix/.ssh/id_rsa.pub" FAIL! - 172.24.168.48 /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/zabbix/.ssh/id_rsa.pub" FAIL! - 172.24.168.49 /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/zabbix/.ssh/id_rsa.pub" FAIL! - 172.24.168.50 (...) I tried using "-f" as well, but the result is the same. I agree that using something robust like Ansible might be a better tool for the job, but unfortunately it is just not available in my working set for now. This is what I came up with so far. |
centos stream 9: cannot connect to hotspot, asking for password in a loop Posted: 17 Dec 2021 06:23 AM PST I have the following dev environment wireless access points (all of them are wired connected to internet) - commercial wireless AP FRITZ!Box 7490
- 1st BRIX mini PC (for hardware info pls. see my question here) with CentOS stream 9 installed without GUI, with manually installed AP and dhcpd (like here)
- 2nd BRIX mini PC with CentOS stream 9 installed as server with GUI, running built-in Hotspot
wireless clients - MacAir
- iPad
- 3rd BRIX mini PC, with CentOS stream 9, installed as server with GUI, plus dhclient
My problem is, that only both MacAir and iPad connect properly to all three AP's without problems, getting correct DNS entries (manually from 1st BRIX AP, automatically from 2nd BRIX AP) and have speedful internet connection BUT The 3rd BRIX only connects properly to commercial AP, but not to both 1st and 2nd BRIX AP. If I want to establish connection (both in graphical interface and/or manually over nmcli or nmtui ) I can see the SSID, but come into a loop of beeing asked for password every few seconds. Cannot get IP, aborted after a while. Here's the leases-file from 2nd BRIX AP for example: # nano /var/lib/NetworkManager/dnsmasq-wlp2s0.leases 1639650694 98:e0:d9:8c:60:b5 10.42.0.24 Michaels-Air 01:98:e0:d9:8c:60:b5 1639649921 96:b6:4c:7c:ee:6c 10.42.0.157 iPadvonMichael 01:96:b6:4c:7c:ee:6c which looks OK, but why not the 3rd BRIX ? UPDATE Added a 4th BRIX mini PC to the setup, installed with Linux Mint 20.2, kernel updated to 5.14, et voilà, connected to all three AP's with no problems. |
SOLVED : Slackware(64) 14.2 + chroot + xfce4-session + audio + (NV-)GLX? Posted: 17 Dec 2021 04:32 AM PST Hi there look i had wrote this script for me. Just for make more ease for mount my Slackware 14.2 Installation i had on another patition (is 32 Bits 100% real native) note : this is a copy from LinuxQuestion Well making some test this afternoon i can start xfce4-session like root user (but that is not the thing i need XD) : Well i need to know if someone can help me with the follow things 1 - Redirect Audio to Host, because 2 - Is possible use 3D,DRI with nvidia ? (i saw something on Gentoo forum but i don't understand the point of that explaniation) 3 - Hide some commands and/or outputs from my script : The lines are : local being added to access control list export DISPLAY=localhost:1 2>/dev/null exit and when i close the Xephyr Window appear below of exit : -su: línea 3: $'\E[01mHP': no se encontró la orden My script "slack32-chroot" content : #!/usr/bin/env bash echo ' Autor ----------------> Inukaze ( Venezuela ) Sitio ----------------> https://goo.gl/ij6WqW Correo-E -------------> bloginukaze@gmail.com Licencia -------------> GPL 2 ' #Establecer mediante la variable "$OBJETIVO" #La particion con una distribucion a la cual se accedera mediante chroot export OBJETIVO="/media/Slack32" #Prevenir que se autoejecuten las funciones que se definiran despues unset montar unset desmontar unset MensajeBase #Establecer y definir funciones : function MensajeBase() { echo -e "\nLa forma correcta de utilizar este guion es :\n$0 «montar» , «montar_xephyr» ó «desmontar», Por ejemplo : \n" echo -e "$0 montar" echo -e "$0 montar_xephyr" echo -e "$0 desmontar\n" } function montar(){ #Preparar acceso para programas de entorno grafico : export DISPLAY=:0.0 2>/dev/null xhost + local 2>/dev/null #Montar todo de una vez para una distro de 32 Bits (En este caso Slackware32 14.2) : mount --rbind /proc "$OBJETIVO/proc" ; \ mount --make-rslave "$OBJETIVO/proc" ; \ mount --rbind /sys "$OBJETIVO/sys" ; \ mount --make-rslave "$OBJETIVO/sys" ; \ mount --rbind /dev "$OBJETIVO/dev" ; \ mount --make-rslave "$OBJETIVO/dev" ; \ mount --rbind /run "$OBJETIVO/run" ; \ mount --make-rslave "$OBJETIVO/run" ; \ mount --rbind /tmp "$OBJETIVO/tmp" ; \ mount --make-rslave "$OBJETIVO/tmp" ; \ mount --bind /etc/fstab "$OBJETIVO/etc/fstab" ; \ mount --bind /etc/hostname "$OBJETIVO/etc/hostname" ; \ mount --bind /etc/hosts "$OBJETIVO/etc/hosts" ; \ mount --bind /etc/resolv.conf "$OBJETIVO/etc/resolv.conf" ; \ cat << EOF | linux32 chroot "$OBJETIVO" export DISPLAY=localhost:1 2>/dev/null EOF linux32 chroot "$OBJETIVO" /bin/bash -l ; \ umount -l "$OBJETIVO" ; \ mount -a 2>/dev/null } function xephyr(){ #Copiar archivo de autorizacion X.Org : rm -f "$OBJETIVO/home/inukaze/.Xauthority" rm -f "$OBJETIVO/root/.Xauthority" cp -f "/home/inukaze/.Xauthority" "$OBJETIVO/root/.Xauthority" cp -f "/home/inukaze/.Xauthority" "$OBJETIVO/home/inukaze/.Xauthority" chown inukaze:users "$OBJETIVO/home/inukaze/.Xauthority" if [ ! -f "$OBJETIVO/etc/X11/Xwrapper.config" ] ; then # Prevenir el error « /usr/libexec/Xorg.wrap: Only console users are allowed to run the X server » echo '# Xwrapper.config (Debian X Window System server wrapper configuration file) # # This file was generated by the post-installation script of the x11-common # package using values from the debconf database. # # See the Xwrapper.config(5) manual page for more information. # # This file is automatically updated on upgrades of the x11-common package # *only* if it has not been modified since the last upgrade of that package. # # If you have edited this file but would like it to be automatically updated # again, run the following command as root: # dpkg-reconfigure x11-common #allowed_users=console allowed_users=anybody' | tee "$OBJETIVO/etc/X11/Xwrapper.config" fi #Preparar acceso para programas de entorno grafico : export DISPLAY=:0.0 2>/dev/null xhost + local 2>/dev/null #Montar todo de una vez para una distro de 32 Bits (En este caso Slackware32 14.2) : mount --rbind /proc "$OBJETIVO/proc" ; \ mount --make-rslave "$OBJETIVO/proc" ; \ mount --rbind /sys "$OBJETIVO/sys" ; \ mount --make-rslave "$OBJETIVO/sys" ; \ mount --rbind /dev "$OBJETIVO/dev" ; \ mount --make-rslave "$OBJETIVO/dev" ; \ mount --rbind /run "$OBJETIVO/run" ; \ mount --make-rslave "$OBJETIVO/run" ; \ mount --rbind /tmp "$OBJETIVO/tmp" ; \ mount --make-rslave "$OBJETIVO/tmp" ; \ mount --bind /etc/fstab "$OBJETIVO/etc/fstab" ; \ mount --bind /etc/hostname "$OBJETIVO/etc/hostname" ; \ mount --bind /etc/hosts "$OBJETIVO/etc/hosts" ; \ mount --bind /etc/resolv.conf "$OBJETIVO/etc/resolv.conf" ; \ cat << EOF | linux32 chroot "$OBJETIVO" export DISPLAY=localhost:1 2>/dev/null EOF linux32 chroot "$OBJETIVO" /bin/bash -l <<"EOT" #Primero Detectar Particiones, Crear Directorios dentro de /media y finalmente montarlas #Nombre De Particion : # NPD1="1SlackIni" # Esta es la particion /boot de la particion que estoy usando en chroot NPD2="72GB" NPD3="Compartido" NPD4="2SlackIni" # NPD5="Slack64" #Esta es la particion Anfrition, asi que realmente no la necesito para esto. # NPD6="Slack32" #Esta es la que estoy usando en chroot NPD7="2Compartir" #Parte de la Particion # PPD1=$(blkid | grep "$NPD1" | cut -c01-09) PPD2=$(blkid | grep "$NPD2" | cut -c01-09) PPD3=$(blkid | grep "$NPD3" | cut -c01-09) PPD4=$(blkid | grep "$NPD4" | cut -c01-09) # PPD5=$(blkid | grep "$NPD5" | cut -c01-09) # PPD6=$(blkid | grep "$NPD6" | cut -c01-09) PPD7=$(blkid | grep "$NPD7" | cut -c01-09) $(mkdir -p /media/"$NPD2" ; mount "$PPD2" /media/"$NPD2" ) $(mkdir -p /media/"$NPD3" ; mount "$PPD3" /media/"$NPD3" ) $(mkdir -p /media/"$NPD4" ; mount "$PPD4" /media/"$NPD4" ) $(mkdir -p /media/"$NPD7" ; mount "$PPD7" /media/"$NPD7" ) $(su - inukaze) $(Xephyr -ac -screen 1070x888 -br -reset -terminate :1.0 2>/dev/null &) $(export DISPLAY=:1.0) $(DISPLAY=:1 /usr/bin/xfce4-session -- :1 2>/dev/null) EOT umount -l "$OBJETIVO" ; \ mount -a 2>/dev/null } function desmontar(){ # Desmontar umount -l "$OBJETIVO" ; \ mount -a 2>/dev/null } #Este guión necesita ser ejecutado como SuperUsuario #o en su defecto con permisos administrativos suficientes #Para montar / desmontar particiones. if [ "$(whoami)" != root ]; then echo echo echo 'Por favor ejecuta este guion como SuperUsuario (root)' echo echo 'Utilize este guión bajo su Propio Riesgro' echo 'El Autor , o sea yo , no me hago responsable' echo 'de las consecuencias imprevistas que puedan' echo 'acontecer en tu sistema operativo' echo else # Proceder en caso de tener los permisos suficientes para montar/desmontar particiones : #Si el usuario no pasa ningun parametro indicar como se usa este guion if [ -z "$1" ]; then MensajeBase fi #Guion : Aqui se ha definido como se utilizara este guion correctamente para montar o desmontar la particion Objetivo #Entrada : Cualquier palabra pasada por el parametro $1 sera convertida en minusculas Entrada=$(echo "$1" | tr -s '[:upper:]' '[:lower:]') if [ "$Entrada" == "montar" ]; then montar fi if [ "$Entrada" == "xephyr" ]; then xephyr fi if [ "$Entrada" == "desmontar" ]; then desmontar fi #Finalizar la condicion globar de requerir usar el SuperUsuario o en su defectos persmisos administrativos #Para poder (des)montar particiones : fi #Finalizar este guion sin problemas : exit 0 2>/dev/null |
ranger does not show filepreview when in tmux Posted: 17 Dec 2021 05:22 AM PST I just discovered a strange behavior in my ranger-setup. When browsing through source-files with ranger (where I started ranger from within tmux) I realized that the preview-pane does not show my text-file no more. When I browse the same sourcefile in ranger (without being in tmux) it shows the preview as expected: What I really find interesting is, that the preview-pane itself seems to work (even under tmux), because when I browse over a tar-file, ranger lists me the contents of the tar-file in the preview-pane (or when I'm on a elf-file, the preview-pane prompts me the "FileType-Classification"). So it just does not preview plain text-files when I'm on ranger in tmux. Has anyone an idea whats causing this issue?! |
more swapping on RHEL8 than RHEL7? Posted: 17 Dec 2021 07:16 AM PST we've been having a Linux application for quite some time (our journey started a decade ago with RHEL 4). We were recently running our app on RHEL 7.9 and are now moving to RHEL 8.4. We've always being setting vm.swappiness to 1 in order to avoid swapping from occuring as much as possible while there is still lots of available memory (Gigs of pages in the page cache): yes we prefer eating page cache first :-) This has always worked pretty well on RHEL 7.x: we've never seen swapping occuring while available memory was above 500MB or so. Our systems typically have between 16 and 64 GB of RAM. On RHEL 8.4, I'm pretty sure I've witnessed several occurences of swapping occuring while there was plenty (a few Gigs) of available memory. This never happened in similar conditions on RHEL 7. So I'd like to understand what has changed between RHEL 7 and RHEL 8 from the standpoint of swapping 'aggressiveness' or maybe where I should start to better characterize/troubleshoot/understand why this swapping decision is taken. Would you guys have some knowledge/recommendations around how I can achieve this ? Many thanks in advance. ++Cyrille |
Commands don't turn blue/green in terminal Posted: 17 Dec 2021 05:01 AM PST |
Virtualbox guest additions installation in CentOS8 gives "kernel headers not found" error Posted: 17 Dec 2021 07:06 AM PST Running ./VBoxLinuxAdditions.run in CentOS8 gives following error: Kernel headers not found for target kernel 4.18.0-193.6.3.el8_2.x86_64. Please install them and execute /sbin/rcvboxadd setup ValueError: File context for /opt/VBoxGuestAdditions-6.0.22/other/mount.vboxsf already defined modprobe vboxguest failed How do I install the required kernel headers? |
How to change regional settings in Linux, including decimal point Posted: 17 Dec 2021 06:00 AM PST I was on Linux Mint, now I'm trying Ubuntu 18 main distro. At top of Gnome day of week/time is displayed. That's where I started, wanting to change it to English having set regional to Russian via GUI, as by the way I noticed time zone changes if I changed regional to US. I've read and tried this: How to get current or set wanted regional format in the terminal? Strangely, after sudo update-locale LC_TIME=en_CA.UTF-8 and even restart of PC, /etc/default/locale has CA, but locale in bash gives RU. And day of week on top of screen is in Russian still. Why different in file and by command? How to change language on top of screen, is it some short date variable, where to find it? As extension to above, is it possible and how to change decimal point and thousand separator each individually to what I like? |
Download all installed packages Posted: 17 Dec 2021 06:50 AM PST I need to download all installed packages of my current distribution. I am going to need only packages that either were updated or installed after fresh installation. (I prefer not to download packages that were installed by default) Motivation I am trying to make a repository of my currently installed packages, and move that repository to another computer which is located in somewhere with unstable radio link (so I can't download the packages). And I know how to make a repository using reprepro and I know how to download packages without installing them. Howewer the problem is to find which packages have been installed or updated. Distribution: Kubuntu 17.10 Package Manager: apt, dpkg |
Issues installing Nvidia drivers in Debian 9 Posted: 17 Dec 2021 07:06 AM PST I'm new to linux and I decided to install Debian 9, I installed it in my HDD in UEFI mode with a USB stick and the DVD 1 iso found here: https://cdimage.debian.org/debian-cd/current/amd64/bt-dvd/. I had some issues with network drivers but I managed to solve them. Then I wanted to install Nvidia propietary drivers, my laptop is a MSI GL62-7RDX which comes with an i7-7700HQ CPU and a GTX 1050 (2GB) graphics card, I followed the steps specified here: https://wiki.debian.org/NvidiaGraphicsDrivers#Debian_9_.22Stretch.22 which are: The problem is that when I rebooted I only got a black screen with a blinking cursor. I decided to follow the steps shown here: https://wiki.debian.org/NvidiaGraphicsDrivers#Backing_out_in_case_of_failure in order to throw back the changes. After rebooting I could see the login screen, but when I tried to login I got a login loop, despite of the password being correct. I also tried to install Nvidia drivers as shown here: How to install the latest NVIDIA drivers on Debian 9 Stretch Linux but I got black screen with blinking cursor again. In summary, I would like to know how to properly install Nvidia drivers in my laptop. I think I am missing something and that the problem is related to my specific hardware, because a few days ago I tried to install Ubuntu 17.10 and it only worked if I added nomodeset by pressing e in the GRUB. |
What are the POSIX "mandatory utilities"? Posted: 17 Dec 2021 04:32 AM PST The POSIX docs here and here refer to "mandatory utilities", but I can't find any listing of such utilities. Is there one somewhere in the POSIX docs? Granted, the links given above point to older version of the docs. Maybe the nomenclature has changed since then (E.g., maybe what used to be called "mandatory utilities" are now called "required utilities", or "obligatory utilities", or "core utilities", etc.) or the mandatory/optional distinction has been dropped altogether? Clarifications welcome. |
Is there ever a good reason to run sudo su? Posted: 17 Dec 2021 07:10 AM PST To launch a root shell on machines where the root account is disabled, you can run one of: sudo -i : run an interactive login shell (reads /root/.bashrc and /root/.profile ) sudo -s : run a non-login interactive shell (reads /root/.bashrc ) In the Ubuntu world, I very often see sudo su suggested as a way to get a root shell. Why run two separate commands when one will do? As far as I can tell, sudo -i is equivalent to sudo su - and sudo -s is the same as sudo su . The only differences seem to be (comparing sudo -i on the left and sudo su - on the right): And comparing sudo -s (left) and sudo su (right): The main differences (ignoring the SUDO_foo variables and LS_COLORS ) seem to be the XDG_foo system variables in the sudo su versions. Are there any cases where that difference warrants using the rather inelegant sudo su ? Can I safely tell people (as I often have) that there's never any point in running sudo su or am I missing something? |
ssh 3des private key encrypt and decrypt Posted: 17 Dec 2021 04:06 AM PST i have converted my ssh private key with 3des encryption openssl pkcs8 -topk8 -v2 des3 -in ~/.ssh/id_rsa.old -out ~/.ssh/id_rsa how do I remove encryption and get the old key? |
Linker error: /usr/bin/ld: cannot find -lgcc_s Posted: 17 Dec 2021 05:05 AM PST I am trying to compile symlinks (tar.gz-file), which is a very small tool with one line for compilation: gcc -Wall -Wstrict-prototypes -O2 -N -s -o symlinks symlinks.c which gives the error .... /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status The output of /sbin/ldconfig -p | grep libgcc is libgcc_s.so.1 (libc6) => /lib/i386-linux-gnu/libgcc_s.so.1 and trying to include the mentioned directory directly gcc -Wall -Wstrict-prototypes -L /lib/i386-linux-gnu/ -O2 -N -s -o symlinks symlinks.c produces the same error. Three questions: - Why does it not work with the first command, as the lib seems to be in the search path
- Why does including the path itself does not help
- How to fix this?
|
Save complete GNU screen session state Posted: 17 Dec 2021 04:49 AM PST Is it possible to persist the "state" of a GNU screen window (or just a standard shell) so that I can reload everything after a reboot: - The number of opened shells
- The name of each shell
- The current directory of each shell
- The history of each shell
- If possible, their environment variables
|
No comments:
Post a Comment