Replace text in terminal Posted: 25 Apr 2022 04:53 AM PDT I am using secure copy to copy some data from a server to a folder (let's say: scp name@server.com:/project1/data/ data1/ ). My question is if it is possible to save the address of the server (in the example name@server.com:/project1/ ) to a shorter form, like an alias, and use it instead of the full name. For example, I'd like to save the address as "prj1" and use the command scp prj1/data data1/ to make the same thing. Unfortunately, alias, and ls -s don't work. Is it possible? Thanks |
Installing a systemd user service for all users Posted: 25 Apr 2022 04:38 AM PDT Goal: install a systemd service, which any user should be able to start. The problem is to enable a user service (no sudo ), as a step of installing it (with sudo ). I put a service file in /etc/systemd/user/ . This requires sudo . Then sudo systemctl --user enable my_service does not work, superuser cannot enable a service that is for users, only users can do that. The issue: I want to install the service as part of the sudo make install of my project. sudo is required here, in order to copy the service file to /etc/systemd/user/ (and other things). I would like this install step to also enable the user service, so that users may start it without the need to enable it. Solutions I can think of: - require the installer to do an extra enable step (without sudo) after
sudo make install , - run the enable step as part of the install step, with
sudo -E -u $USER systemctl... . -E required in order to get to DBUS_SESSION_BUS_ADDRESS (needed by systemctl for users). The problem is that the install command then also needs -E -u $USER , which is unusual. - require users to run
enable on the service, if start fails. - somehow drop the privileges for the
enable step, not sure how. It feels like this should be a usual use case, how do people normally solve this? |
Existing .so file cannot be loaded even though it exists, seems to depend on Docker host OS Posted: 25 Apr 2022 04:29 AM PDT I have built Qt6 in an Alma8 based Docker container, with the Docker host being Fedora 35. Under some circumstances (described below), all Qt libs cannot load libQt6Core.so[.6[.2.4]] . But that file exists and the correct directory is searched for that file. Other Qt libs (e.g., libQt6Dbus.so ) are found and loaded. Extensive debugging, re-building, seaching-the-web did not yield any clues what the underlying cause is and how I could fix it. Locating the problem I have narrowed down the problem to the following scenario: - I created two minimal VMs, one with centos7 and one with alma8.
- I installed Docker from the official repos into both of them.
- I ran the same Docker image in both VMs and installed the same qt6 package.
- It breaks when the Docker host is centos7.
- It works when the Docker host is alma8.
Theory and Question - Qt6 was built on Alma8 and links to some system libraries newer than what Centos7 provides, so Qt6 cannot run unter Centos7 (this is totally expected and okay). But it should run anywhere in the Alma8 Docker container.
- Container images should be able to run anywhere, but in this case "something" from the host OS sneaks into the container and causes the Issue – even though both containers use the exact same image!
The question is: What is this "something" and how/why does it break the build? What I tried I inspected libQt6Gui.so to see whether or not it can load libQt6Core.so and I inspected libQt6Core.so to see if something looks bogus using: ldd and LD_DEBUG=libs ldd which indeed showed some differences (see below) - libtree which showed no differences (but a nice tree :))
- pyldd (from conda-build)
readelf -d What I also tried: - Setting
LD_LIBRARY_PATH (did not change anything – no surprise since I know that the correct path is always searched) - Building Qt6 in an alma8 container with a centos7 host (build failed with "
libQt6Core.so.6 : cannot open file", same error as with the built lib) - Building Qt6 in a centos7 container (build failed due to other problems I could not yet fix)
Differences from ldd In the screenshots below, you see a the Alma8-Docker-Container on a Centos7 host on the left and the Alma8-Docker-Container on an Alma8 host on the *right. The first two images show the results for ldd /opt/emsconda/lib/libQt6Gui.so . libQt6Core can not be found on the left but is found on the right. This second screenshot shows that other Qt libs are found and loaded. The ICU libs are also missing on the left - maybe they are only loaded when libQt6Core was also loaded? This screenshot shows the results of LD_DEBUG=libs ldd ... . You can see that in both cases, libQt6Core is search in the correct location (/opt/emsconda/lib ). But it is only loaded in the right container. The left one additionally looks in `/opt/emsconda/lib/./ (haha)) and then silently walks on to the next lib ... I could not find any error messages. This file is just not opened/loaded. Inspecting the libQt6Core.so itself might give us a clue. It links to a linux-vdso.so.1 . According to this SO question, that file is a virtual lib injected into the userspace by the OS kernel. Since Docker containers do not run their own kernel, I suspect that that file comes from the host OS. Maybe, libQt6Core relies on some functionality in the linux-vdso.so.1 that the centos7 kernel cannot provide? I have no idea ... Since nothing I tried so far yields an error message, I have no clue what the acutal problem might be or how to proceeded with debugging. I'd be greatful for any kind of hints, tips or help. |
reload the i3 conf in a script Posted: 25 Apr 2022 04:20 AM PDT i am writing a script to quick change the mod key of i3 conf0="/home/myuser/.config/i3/config" case "${1}" in (alt) key=Mod1 ;; (win) key=Mod4 ;; (*) printf "Invalid key: %s\n" "${1}" ; exit 1 ;; esac sed -i 's/^\(set $mod\) .*/\1 '"${key}/" "${conf0}" || exit printf "Changed successfully to %s/%s\n" "${1}" "${key}" but i wont the i3 config to automatically reload at the end of my script. I found xdotool might work but if have to check the current $mod key to be able to reload i3. How can this? Is awk a goo choice for that? Please point me in the right direction |
How do I block updating a specific device with fwupd? Posted: 25 Apr 2022 04:09 AM PDT I want to be able to block updating my system's firmware with fwupd as later BIOS versions block the ability to undervolt the CPU (yes I'm aware this leaves my system susceptible to plundervolt and later security vulnerabilities). I am running KDE Plasma on Ubuntu 20.04 (where the fwupdmgr version is 1.7.5) and typically update via Discover. Previously I just disabled the LVFS remote in Discover but this has the unintended consequences of blocking all updates (including for other devices) from the LVFS. Looking at the output of fwupdmgr --help , I can see there is a block-firmware [CHECKSUM] subcommand but, as far as I can see, this only blocks specific firmware versions from being installed whereas I want to block any updates to the 'System Firmware' device. Is this possible? |
Login+Password cUrl test Posted: 25 Apr 2022 03:42 AM PDT I'm trying to get a cUrl command able to test a login+password and I want the command to tell me if the login+password passed or if it wasn't correct. I need that to test multiple pages with the same login+password. So far I identified the request ("AJAXREQUEST=[...]") using development tools but I don't know how to use it as it is. The page is HTTP (not https) so login+password are not hidden. Does anybody have an idea about how I could do that ? and what to look for as I want to use it in a condition script to summarize which website are ok and which are not using this login+password. |
Is there a way to timestamp the history in bash? [duplicate] Posted: 25 Apr 2022 03:24 AM PDT By default, history returns a list of commands and index numbers that can be used to rerun them. Is there a way to also add the timestamp to that list? |
How do i configure my PXE boot server to boot Windows PE? Posted: 25 Apr 2022 03:24 AM PDT I would like some advice. I run a PXE server to install multiple versions of Linux without a hitch. The way the PXE server is setup is as follows: - boot client PC from network
- client PC downloads GRUB2 to local machine
- GRUB2 displays a list of choices (debian10, 11, etc)
- select menu entry to start install
I made a windows image/install scripts and put it on a samba share. when i boot Windows PE from a USB device and mount the samba share then execute setup everything works fine. The only problem i can not figure out is how to configure the grub.cfg file to boot into windowsPE. I have no experience in GRUB so any help would be amazing! This is what i currently have: menuentry --hotkey=w 'Windows PE' { terminal_output console insmod chain chainloader tftp://servername/path/to/PE/winpe/EFI/Boot/bootx64.efi } Any help would be appreciated! |
Booting arm64 linux from PHRAM device on RAM failed on systemd processing Posted: 25 Apr 2022 03:12 AM PDT I'm trying to boot a busybox based ext4 Liunx image built by yocto, from the RAM, using PHRAM device(dev/mtdblock0) as rootfs. The machine is Intel FPGA board(Stratix 10). I have enabled PHRAM in linux kernel config. I loaded the kernel, device tree, rootfs into RAM, then booted manually.(Without uboot, just set reg x0-x3 and jumped to kernel at EL1.) The kernel mounted mtdblock0 as rootfs successfully but it failed during systemd. The image is originally designed to be boot from MMC card, so I wondered is there anything should be modified. Here is the log. (I only copied it after systemd started. I will post it from kernel boot if necessary) Welcome to EMLinux 2.4 (buster)! [ 11.970925] systemd[1]: Set hostname to <qemuarm64>. [ 11.978373] random: systemd: uninitialized urandom read (16 bytes read) [ 11.985036] systemd[1]: Initializing machine ID from random generator. [ 11.992641] systemd[1]: Failed to open netlink: Function not implemented [ 11.999413] systemd[1]: Failed to read AF_UNIX datagram queue length, ignoring: No such file or directory [ 12.009010] systemd[1]: Setting 'fs/file-max' to '9223372036854775807'. [ 12.015771] systemd[1]: Setting 'fs/nr_open' to '2147483640'. [ 12.021577] systemd[1]: Couldn't write fs.nr_open as 2147483640, halving it. [ 12.028697] systemd[1]: Setting 'fs/nr_open' to '1073741816'. [ 12.034502] systemd[1]: Successfully bumped fs.nr_open to 1073741816 [ 12.044488] systemd[1]: Found cgroup2 on /sys/fs/cgroup/unified, unified hierarchy for systemd controller [ 12.054084] systemd[1]: Unified cgroup hierarchy is located at /sys/fs/cgroup/unified. Controllers are on legacy hierarchies. [ 12.070744] systemd[1]: Can't allocate BPF LPM TRIE map, BPF firewalling is not supported: Function not implemented [ 12.081219] systemd[1]: Can't load kernel CGROUP DEVICE BPF program, BPF device control is not supported: Function not implemented [ 12.093014] systemd[1]: Controller 'cpu' supported: yes [ 12.098268] systemd[1]: Controller 'cpuacct' supported: yes [ 12.103867] systemd[1]: Controller 'io' supported: no [ 12.108929] systemd[1]: Controller 'blkio' supported: yes [ 12.114336] systemd[1]: Controller 'memory' supported: yes [ 12.119828] systemd[1]: Controller 'devices' supported: yes [ 12.125406] systemd[1]: Controller 'pids' supported: yes [ 12.130726] systemd[1]: Controller 'bpf-firewall' supported: no [ 12.136649] systemd[1]: Controller 'bpf-devices' supported: no [ 12.142524] systemd[1]: Set up TFD_TIMER_CANCEL_ON_SET timerfd. [ 12.148482] systemd[1]: Failed to stat /etc/localtime, ignoring: No such file or directory [ 12.156762] systemd[1]: /etc/localtime doesn't exist yet, watching /etc instead. [ 12.164790] systemd[1]: Enabling showing of status. [ 12.170660] systemd[1]: Successfully forked off '(sd-executor)' as PID 63. [ 12.179714] systemd[63]: Successfully forked off '(direxec)' as PID 64. [ 12.195509] systemd[63]: Successfully forked off '(direxec)' as PID 65. [ 12.215538] systemd[63]: Successfully forked off '(direxec)' as PID 66. [ 12.226667] systemd-fstab-generator[65]: Parsing /etc/fstab [ 12.239560] systemd[63]: Successfully forked off '(direxec)' as PID 67. [ 12.255251] systemd-fstab-generator[65]: Found entry what=/dev/root where=/ type=auto makefs=no nofail=no noauto=no [ 12.265799] systemd-getty-generator[66]: Automatically adding serial getty for /dev/ttyS0. [ 12.275474] systemd[63]: Successfully forked off '(direxec)' as PID 68. [ 12.286144] systemd-gpt-auto-generator[67]: Failed to chase block device '/', ignoring: No such file or directory [ 12.305730] systemd-fstab-generator[65]: Found entry what=proc where=/proc type=proc makefs=no nofail=no noauto=no [ 12.316858] systemd[63]: Successfully forked off '(direxec)' as PID 69. [ 12.326671] systemd-hibernate-resume-generator[68]: Not running in an initrd, quitting. [ 12.344951] systemd[63]: Successfully forked off '(direxec)' as PID 70. [ 12.354201] systemd-gpt-auto-generator[67]: mtd0: Parent isn't a raw disk, ignoring. [ 12.363862] systemd-rc-local-generator[69]: /etc/rc.local does not exist, skipping. [ 12.374949] systemd-fstab-generator[65]: Found entry what=devpts where=/dev/pts type=devpts makefs=no nofail=no noauto=no [ 12.391515] systemd[63]: Successfully forked off '(direxec)' as PID 71. [ 12.407198] systemd-rc-local-generator[69]: /usr/sbin/halt.local does not exist, skipping. [ 12.418934] systemd-fstab-generator[65]: Found entry what=tmpfs where=/run type=tmpfs makefs=no nofail=no noauto=no [ 12.430101] systemd[63]: Successfully forked off '(direxec)' as PID 72. [ 12.451088] systemd-fstab-generator[65]: Found entry what=tmpfs where=/var/volatile type=tmpfs makefs=no nofail=no noauto=no [ 12.465060] systemd[63]: /lib/systemd/system-generators/systemd-sysv-generator succeeded. [ 12.473353] systemd[63]: /lib/systemd/system-generators/systemd-gpt-auto-generator succeeded. [ 12.481943] systemd[63]: /lib/systemd/system-generators/systemd-getty-generator succeeded. [ 12.490351] systemd[63]: /lib/systemd/system-generators/systemd-run-generator succeeded. [ 12.498513] systemd[63]: /lib/systemd/system-generators/systemd-system-update-generator succeeded. [ 12.507537] systemd[63]: /lib/systemd/system-generators/systemd-debug-generator succeeded. [ 12.515864] systemd[63]: /lib/systemd/system-generators/systemd-fstab-generator succeeded. [ 12.524195] systemd[63]: /lib/systemd/system-generators/systemd-hibernate-resume-generator succeeded. [ 12.533480] systemd[63]: /lib/systemd/system-generators/systemd-rc-local-generator succeeded. [ 12.542744] systemd[1]: (sd-executor) succeeded. [ 12.547757] systemd[1]: Looking for unit files in (higher priority first): [ 12.554674] systemd[1]: /etc/systemd/system.control [ 12.559669] systemd[1]: /run/systemd/system.control [ 12.564650] systemd[1]: /run/systemd/transient [ 12.569190] systemd[1]: /etc/systemd/system [ 12.573469] systemd[1]: /run/systemd/system [ 12.577747] systemd[1]: /run/systemd/generator [ 12.582285] systemd[1]: /lib/systemd/system [ 12.593188] systemd[1]: sd-device-monitor: Failed to create socket: Function not implemented [ 12.601667] systemd[1]: Failed to allocate device monitor: Function not implemented [ 12.614284] systemd[1]: run-systemd-journal-stdout.mount: Failed to load configuration: No such file or directory [ 12.624610] systemd[1]: run.mount: Failed to load configuration: No such file or directory [ 12.632930] systemd[1]: run-systemd.mount: Failed to load configuration: No such file or directory [ 12.641934] systemd[1]: run-systemd-journal.mount: Failed to load configuration: No such file or directory [ 12.651616] systemd[1]: run-systemd-journal-socket.mount: Failed to load configuration: No such file or directory [ 12.662655] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling. [ 12.679663] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.) [ 12.692458] systemd[1]: /lib/systemd/system/systemd-journald.service:13: Support for option LockPersonality= has been disabled at compile time and it is ignored [ 12.706801] systemd[1]: /lib/systemd/system/systemd-journald.service:14: Support for option MemoryDenyWriteExecute= has been disabled at compile time and it is ignored [ 12.722013] systemd[1]: /lib/systemd/system/systemd-journald.service:18: Support for option RestrictAddressFamilies= has been disabled at compile time and it is ignored [ 12.737051] systemd[1]: /lib/systemd/system/systemd-journald.service:19: Support for option RestrictNamespaces= has been disabled at compile time and it is ignored [ 12.751652] systemd[1]: /lib/systemd/system/systemd-journald.service:20: Support for option RestrictRealtime= has been disabled at compile time and it is ignored [ 12.766254] systemd[1]: /lib/systemd/system/systemd-journald.service:23: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 12.781294] systemd[1]: /lib/systemd/system/systemd-journald.service:24: Support for option SystemCallErrorNumber= has been disabled at compile time and it is ignored [ 12.796158] systemd[1]: /lib/systemd/system/systemd-journald.service:25: Support for option SystemCallFilter= has been disabled at compile time and it is ignored [ 12.818042] systemd[1]: var.mount: Failed to load configuration: No such file or directory [ 12.826375] systemd[1]: var-log.mount: Failed to load configuration: No such file or directory [ 12.835071] systemd[1]: var-log-wtmp.mount: Failed to load configuration: No such file or directory [ 12.844145] systemd[1]: auditd.service: Failed to load configuration: No such file or directory [ 12.857237] systemd[1]: run-systemd-fsck.progress.mount: Failed to load configuration: No such file or directory [ 12.870092] systemd[1]: /lib/systemd/system/systemd-udevd.service:19: Support for option MemoryDenyWriteExecute= has been disabled at compile time and it is ignored [ 12.884838] systemd[1]: /lib/systemd/system/systemd-udevd.service:20: Support for option RestrictRealtime= has been disabled at compile time and it is ignored [ 12.899041] systemd[1]: /lib/systemd/system/systemd-udevd.service:21: Support for option RestrictAddressFamilies= has been disabled at compile time and it is ignored [ 12.913822] systemd[1]: /lib/systemd/system/systemd-udevd.service:22: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 12.928596] systemd[1]: /lib/systemd/system/systemd-udevd.service:23: Support for option LockPersonality= has been disabled at compile time and it is ignored [ 12.942684] systemd[1]: File /lib/systemd/system/systemd-udevd.service:24 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling. [ 12.959437] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.) [ 12.974996] systemd[1]: run-udev.mount: Failed to load configuration: No such file or directory [ 12.983750] systemd[1]: run-udev-control.mount: Failed to load configuration: No such file or directory [ 12.997890] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:15: Support for option LockPersonality= has been disabled at compile time and it is ignored [ 13.012348] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:16: Support for option MemoryDenyWriteExecute= has been disabled at compile time and it is ignored [ 13.027519] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:27: Support for option RestrictAddressFamilies= has been disabled at compile time and it is ignored [ 13.042645] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:28: Support for option RestrictNamespaces= has been disabled at compile time and it is ignored [ 13.057333] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:29: Support for option RestrictRealtime= has been disabled at compile time and it is ignored [ 13.071899] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:32: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 13.087021] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:33: Support for option SystemCallErrorNumber= has been disabled at compile time and it is ignored [ 13.101973] systemd[1]: /lib/systemd/system/systemd-timesyncd.service:34: Support for option SystemCallFilter= has been disabled at compile time and it is ignored [ 13.117397] systemd[1]: run-systemd-timesync.mount: Failed to load configuration: No such file or directory [ 13.127186] systemd[1]: var-tmp.mount: Failed to load configuration: No such file or directory [ 13.135847] systemd[1]: var-lib.mount: Failed to load configuration: No such file or directory [ 13.144494] systemd[1]: var-lib-systemd.mount: Failed to load configuration: No such file or directory [ 13.153827] systemd[1]: var-lib-systemd-timesync.mount: Failed to load configuration: No such file or directory [ 13.169479] systemd[1]: var-lib-systemd-random\x2dseed.mount: Failed to load configuration: No such file or directory [ 13.186126] systemd[1]: var-log-journal.mount: Failed to load configuration: No such file or directory [ 13.201157] systemd[1]: run-systemd-ask\x2dpassword.mount: Failed to load configuration: No such file or directory [ 13.212117] systemd[1]: /lib/systemd/system/systemd-ask-password-console.service:11: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 13.238236] systemd[1]: display-manager.service: Failed to load configuration: No such file or directory [ 13.251377] systemd[1]: /lib/systemd/system/systemd-resolved.service:16: Support for option LockPersonality= has been disabled at compile time and it is ignored [ 13.265785] systemd[1]: /lib/systemd/system/systemd-resolved.service:17: Support for option MemoryDenyWriteExecute= has been disabled at compile time and it is ignored [ 13.280849] systemd[1]: /lib/systemd/system/systemd-resolved.service:28: Support for option RestrictAddressFamilies= has been disabled at compile time and it is ignored [ 13.295883] systemd[1]: /lib/systemd/system/systemd-resolved.service:29: Support for option RestrictNamespaces= has been disabled at compile time and it is ignored [ 13.310483] systemd[1]: /lib/systemd/system/systemd-resolved.service:30: Support for option RestrictRealtime= has been disabled at compile time and it is ignored [ 13.324953] systemd[1]: /lib/systemd/system/systemd-resolved.service:33: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 13.339989] systemd[1]: /lib/systemd/system/systemd-resolved.service:34: Support for option SystemCallErrorNumber= has been disabled at compile time and it is ignored [ 13.354851] systemd[1]: /lib/systemd/system/systemd-resolved.service:35: Support for option SystemCallFilter= has been disabled at compile time and it is ignored [ 13.369961] systemd[1]: run-systemd-resolve.mount: Failed to load configuration: No such file or directory [ 13.382207] systemd[1]: /lib/systemd/system/systemd-networkd.service:14: Support for option LockPersonality= has been disabled at compile time and it is ignored [ 13.396602] systemd[1]: /lib/systemd/system/systemd-networkd.service:15: Support for option MemoryDenyWriteExecute= has been disabled at compile time and it is ignored [ 13.411662] systemd[1]: /lib/systemd/system/systemd-networkd.service:23: Support for option RestrictAddressFamilies= has been disabled at compile time and it is ignored [ 13.426714] systemd[1]: /lib/systemd/system/systemd-networkd.service:24: Support for option RestrictNamespaces= has been disabled at compile time and it is ignored [ 13.441315] systemd[1]: /lib/systemd/system/systemd-networkd.service:25: Support for option RestrictRealtime= has been disabled at compile time and it is ignored [ 13.455782] systemd[1]: /lib/systemd/system/systemd-networkd.service:28: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 13.470818] systemd[1]: /lib/systemd/system/systemd-networkd.service:29: Support for option SystemCallErrorNumber= has been disabled at compile time and it is ignored [ 13.485681] systemd[1]: /lib/systemd/system/systemd-networkd.service:30: Support for option SystemCallFilter= has been disabled at compile time and it is ignored [ 13.500755] systemd[1]: run-systemd-netif.mount: Failed to load configuration: No such file or directory [ 13.511027] systemd[1]: File /lib/systemd/system/systemd-logind.service:16 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling. [ 13.527864] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.) [ 13.540648] systemd[1]: /lib/systemd/system/systemd-logind.service:17: Support for option LockPersonality= has been disabled at compile time and it is ignored [ 13.554818] systemd[1]: /lib/systemd/system/systemd-logind.service:18: Support for option MemoryDenyWriteExecute= has been disabled at compile time and it is ignored [ 13.569626] systemd[1]: /lib/systemd/system/systemd-logind.service:22: Support for option RestrictAddressFamilies= has been disabled at compile time and it is ignored [ 13.584486] systemd[1]: /lib/systemd/system/systemd-logind.service:23: Support for option RestrictNamespaces= has been disabled at compile time and it is ignored [ 13.598912] systemd[1]: /lib/systemd/system/systemd-logind.service:24: Support for option RestrictRealtime= has been disabled at compile time and it is ignored [ 13.613167] systemd[1]: /lib/systemd/system/systemd-logind.service:25: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 13.628028] systemd[1]: /lib/systemd/system/systemd-logind.service:26: Support for option SystemCallErrorNumber= has been disabled at compile time and it is ignored [ 13.642726] systemd[1]: /lib/systemd/system/systemd-logind.service:27: Support for option SystemCallFilter= has been disabled at compile time and it is ignored [ 13.658226] systemd[1]: var-run.mount: Failed to load configuration: No such file or directory [ 13.666894] systemd[1]: var-run-dbus.mount: Failed to load configuration: No such file or directory [ 13.675988] systemd[1]: var-run-dbus-system_bus_socket.mount: Failed to load configuration: No such file or directory [ 13.690645] systemd[1]: /lib/systemd/system/systemd-ask-password-wall.service:8: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 13.707430] systemd[1]: systemd-user-sessions.service: Failed to load configuration: No such file or directory [ 13.719881] systemd[1]: var-lib-machines.raw.mount: Failed to load configuration: No such file or directory [ 13.736282] systemd[1]: plymouth-quit-wait.service: Failed to load configuration: No such file or directory [ 13.774959] systemd[1]: cryptsetup.target: Failed to load configuration: No such file or directory [ 13.784386] systemd[1]: plymouth-start.service: Failed to load configuration: No such file or directory [ 13.795138] systemd[1]: sys.mount: Failed to load configuration: No such file or directory [ 13.803459] systemd[1]: sys-kernel.mount: Failed to load configuration: No such file or directory [ 13.815153] systemd[1]: sys-fs.mount: Failed to load configuration: No such file or directory [ 13.823730] systemd[1]: sys-fs-fuse.mount: Failed to load configuration: No such file or directory [ 13.836347] systemd[1]: dev.mount: Failed to load configuration: No such file or directory [ 13.854246] systemd[1]: run-systemd-journal-syslog.mount: Failed to load configuration: No such file or directory [ 13.867748] systemd[1]: run-systemd-journal-dev\x2dlog.mount: Failed to load configuration: No such file or directory [ 13.881945] systemd[1]: run-initctl.mount: Failed to load configuration: No such file or directory [ 13.891307] systemd[1]: /lib/systemd/system/systemd-initctl.service:9: Support for option SystemCallArchitectures= has been disabled at compile time and it is ignored [ 13.908639] systemd[1]: dev-root.mount: Failed to load configuration: No such file or directory [ 13.918095] systemd[1]: Failed to allocate notification socket: Function not implemented [!!!!!!] Failed to start up manager. [ 13.950790] systemd[1]: Freezing execution. And the bootarg in device tree: bootargs = "earlycon panic=-1 printk.devkmsg=on root=/dev/mtdblock0 kgdboc=ttyS0,115200 rw rootwait mem=480M debug ignore_loglevel phram.phram=root,0x20000000,0x37C1C00,0x100 "; |
Linux cut and join string Posted: 25 Apr 2022 04:27 AM PDT INPUT: Line1: ABC,123 Germany is in Europe Line2: ABC,456 Bavaria is in Germany OUTPUT: ABC - Bavaria is in Germany |
How can I display file completion without escapes for spaces and special shell characters? Posted: 25 Apr 2022 03:46 AM PDT I have a bunch of filenames with spaces: [~/music]% ls Acid Eater - Black Fuzz On Wheels.ogg Angel'in Heavy Syrup 4.mp3 Akalé Wubé - Akalé Wubé.opus Astor Piazzolla & Gary Burton - The New Tango.mp3 Allen Toussaint - The Bright Mississippi.mp3 B.B. King - Live at the Regal.mp3 Angel'in Heavy Syrup 1.opus Bar Kokhba Sextet - Lucifer.opus Angel'in Heavy Syrup 2.opus Billy Bang - Vietnam the Aftermath.mp3 Angel'in Heavy Syrup 3.mp3 Completion inserts escape characters for the spaces (which also means there isn't enough space to display it in two columns): [~/music]% mpv <Tab> Acid\ Eater\ -\ Black\ Fuzz\ On\ Wheels.ogg Akalé\ Wubé\ -\ Akalé\ Wubé.opus Allen\ Toussaint\ -\ The\ Bright\ Mississippi.mp3 Angel\'in\ Heavy\ Syrup\ 1.opus Angel\'in\ Heavy\ Syrup\ 2.opus Angel\'in\ Heavy\ Syrup\ 3.mp3 Angel\'in\ Heavy\ Syrup\ 4.mp3 Astor\ Piazzolla\ \&\ Gary\ Burton\ -\ The\ New\ Tango.mp3 B.B.\ King\ -\ Live\ at\ the\ Regal.mp3 Bar\ Kokhba\ Sextet\ -\ Lucifer.opus Billy\ Bang\ -\ Vietnam\ the\ Aftermath.mp3 This makes sense, but also hard to read; I would like: [~/music]% mpv <Tab> Acid Eater - Black Fuzz On Wheels.ogg Angel'in Heavy Syrup 4.mp3 Akalé Wubé - Akalé Wubé.opus Astor Piazzolla & Gary Burton - The New Tango.mp3 Allen Toussaint - The Bright Mississippi.mp3 B.B. King - Live at the Regal.mp3 Angel'in Heavy Syrup 1.opus Bar Kokhba Sextet - Lucifer.opus Angel'in Heavy Syrup 2.opus Billy Bang - Vietnam the Aftermath.mp3 Angel'in Heavy Syrup 3.mp3 [~/music]% mpv Acid<Tab> # Completes to: [~/music]% mpv Acid\ Eater\ -\ Black\ Fuzz\ On\ Wheels.ogg # It's okay to type escapes on the cmdline; it's just the display. [~/music]% mpv Angel\'in\ H<Tab> Angel'in Heavy Syrup 1.opus Angel'in Heavy Syrup 3.mp3 Angel'in Heavy Syrup 2.opus Angel'in Heavy Syrup 4.mp3 I spent some time reading through zshcompsys(1), but I don't really see a way to do this. |
Inserting a file without altering the folder's modification timestamp? Posted: 25 Apr 2022 03:17 AM PDT I have hundreds of folders with modification timestamps I'd like to preserve. Now I need to copy a single file into them. Aside from this way... timestamp=$(stat -c %y /foldername) cp /tmp/file.jpg /foldername/file.jpg touch -d "$timestamp" /foldername ...is there a better way to suppress the folder modification timestamp? |
Recent LDAP user list missing in greeter using lightdm Posted: 25 Apr 2022 02:34 AM PDT I am switching our desktop manager from xfce to mate on centos 7.4. This means that we are switching from gdm to lightdm. For some reasons, it is impossible for our recent user authenticated via a freeipa to appear in the recent user lists, which means that our users needs to enter all their login infos each time they log out. I have looked long and hard, and it does not seem to be a setting issues. I have tried to activate and deactivate all the relevant settings regarding sessions, with no luck. For what i have been able to glean, a file need to be created in /var/lib/AccountsService for our users to appear in that list, but is not. Yet, this folder is still being read at lightdm startup. It reads org.freedesktop.Accounts which seem to be used to create this list. Under GDM, that file is correctly created when a ldap user logs out. User locally created do not experience this issue, and are directly present both in the user list and in /var/lib/AccountsService. If anyone could nudge me in the right direction. I am out of ideas. |
./libcogconfig_jni.so: error while loading shared libraries: ./libz.so.1: file too short Posted: 25 Apr 2022 02:12 AM PDT I am working on a CentOS 7 workstation.I installed Cognos. However, the following error is reported: [root@ecs-30 bin64]# ldd libcogconfig_jni.so ./libcogconfig_jni.so: error while loading shared libraries:./libz.so.1: file too short What do I have to do? |
move command unable to remove file Posted: 25 Apr 2022 02:55 AM PDT I'm trying to move files from one folder to another using mv -v /home/mnt1/Daily_IMSI_Report/* /mnt2/Archive_1/Daily_IMSI_Report/ But the command is not executing after copying only one file. I think it is not able to remove the file after copying. This is the output I'm getting in the terminal with the running state: copied '/home/mnt1/Daily_IMSI_Report/IMSI_exp_20220323.csv.gz' -> '/mnt2/Archive_1/Daily_IMSI_Report/IMSI_exp_20220323.csv.gz' Every time I stop and run the command, one more file gets copied after taking confirmation for overwriting. Both the folders have 777 rights. type mv mv is aliased to `mv -i' The filesystems are mounted using NFS4 on CentOS. Observing the similar situation with cp command, I think the * wildcard operator is not able to continue to the next file after completing the first copy operation. What would be causing the issue here? |
Save file changes if you forgot to use sudo Posted: 25 Apr 2022 02:17 AM PDT Sometimes I make changes to a file and then after attempting to save I realize that I need sudo permissions. Then I need to close the file, reopen it as sudo and make my changes again... Is there a way to save anyways? I remember a colleague closed the file without saving and then executed "sudo !!" or something and then it saved the changes. How does it work? |
How to provide condition to the parameter Posted: 25 Apr 2022 02:37 AM PDT While providing external parameter values should have before and after hyphen. If hyphen is not there it should reflect the error stating that the hyphen should be needed before and after the text. For example: the external parameter should be -report-country-sales-price- |
Centos 8 vs Almalinux, is it okay to upgrade? A help to understand how to change OS Posted: 25 Apr 2022 03:35 AM PDT I'm stuck on whether to move my VPS with cPanel from Centos 8 to Almalinux In several blog sites I have read that almalinux is a 1: 1 system with centos 8, so it should keep all the features without too much difficulty. The fact is that on my VPS I have two Magento 2.3.7 sites and I have implemented the VPS with Redis and Varnish, and I wanted to add elastichsearc as well. One of the doubts is precisely on the fact that with centos 8 I already have redis and varnish, if I had to change Centos with Almalinux, would these two extensions remain or should I reinstall them? Another question, as I have two sites on the VPS, and both have been live for some time, what if something goes wrong? My hosting allows me to take snapshots so somehow I could be preserved so I can go back. But even if I have this possibility, I would need suggestions from those who are more experienced than me and if anything have already dealt with cases similar to mine. Thanks |
Best method to space pad every line of command output to fixed width Posted: 25 Apr 2022 03:01 AM PDT I have a command that generates multi-line output. The output is guaranteed to be less than the width of the terminal. But, I want to add spaces to the end of every line so each line is effectively the width of the terminal. What is the best method to achieve this? Some lines can have no characters at all, they should also have spaces to cover to the end of the line (I,e width of the terminal). |
how to disable tcp_resets_received from netdata Posted: 25 Apr 2022 03:59 AM PDT I'm receiving TCP reset emails from netdata, how would I disable the resets from happening on my linux GCP Instance? Linux: 20.04 Provider: GCP I've tried doing this but it doesnt seem to be working. emails received below... |
Why are most Linux distributions not POSIX-compliant? Posted: 25 Apr 2022 04:34 AM PDT Why are most Linux distributions not POSIX-compliant? I've seen in lots of places that they're not (e.g. Mostly POSIX-compliant) but there's been no real explanation to back this up. Is there something the C library and/or tools could do to get around this (i.e. no modifications to the kernel itself)? What needs to be done? The supposed duplicate is asking which Linux distribution is POSIX-compliant; this is asking why most Linux distributions aren't POSIX-compliant. I'm asking for specific details (i.e. some function or command isn't compliant), not the reasons the specific distributions don't (try to) get certified. This comment from @PhilipCouling (thanks!) explains it well: Compliance and certification are different subjects. The answers point to cost of (re)certification which is irrelevant to the subject of (non)compliance. |
(Buildroot) "silentoldconfig" error on compile Posted: 25 Apr 2022 04:03 AM PDT I just moved an old buildroot folder from an old VM to a newer one to consolidate. I thought that simply moving the folder, along with any dependent folders, and making the appropriate path/name changes would be all that is required to get it up and running in the new VM. Unfortunately, this appears to not be the case as I am greeted with the following error upon attempting to build in this new VM: # # configuration written to /home/mirion/mirion/buildroot-2013.05/.config # /usr/bin/make -j5 HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" silentoldconfig make[1]: Entering directory '/home/mirion/mirion/buildroot-2013.05' BR2_DEFCONFIG='' KCONFIG_AUTOCONFIG=/home/mirion/mirion/buildroot-2013.05/output/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/mirion/mirion/buildroot-2013.05/output/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/mirion/mirion/buildroot-2013.05/output/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/mirion/mirion/buildroot-2013.05/.config /home/mirion/mirion/buildroot-2013.05/output/build/buildroot-config/conf --silentoldconfig Config.in *** Error during update of the configuration. Makefile:692: recipe for target 'silentoldconfig' failed make[1]: *** [silentoldconfig] Error 1 make[1]: Leaving directory '/home/mirion/mirion/buildroot-2013.05' Makefile:396: recipe for target '/home/mirion/mirion/buildroot-2013.05/output/build/buildroot-config/auto.conf' failed make: *** [/home/mirion/mirion/buildroot-2013.05/output/build/buildroot-config/auto.conf] Error 2 mv: cannot stat 'output/images/rootfs.ubi': No such file or directory Are there any ideas as to what I can do to resolve this? I did some poking around on google but could not find anything conclusive. EDIT: Original VM was running Lubuntu 12.04, the new VM is running Ubuntu 17.10. Thanks. |
What's the "right way" to effect changes in /etc/resolv.conf with /etc/resolv.conf.d in place? Posted: 25 Apr 2022 04:24 AM PDT I the old days, resolv.conf was static and you edited it yourself. Later on, the DHCP client would rewrite it, using some static entries and what it got from the DHCP lease. These days, some distributions - like mine (Linux Mint 18.1) have a /etc/resolv.conf.d mechanism with several subdirectories of scripts, and, well, I can't make heads and tails of it. What's the right way, then, to... - indicate that I want to use or not-use the DNS server(s) obtained in the DHCP lease?
- add fixed entries to resolv.conf, always or as a fallback when there's no DHCP-lease-obtained nameserver?
- make decisions about relative order in the file?
I don't mind writing some scripts of my own if I have to, I just don't want to "work against" the existing mechanism or do duplicate work. |
How to set PATH when running a ssh command? Posted: 25 Apr 2022 03:35 AM PDT Assuming user has /bin/bash as the shell in /etc/passwd . Then ssh user@host command runs the command using Bash. However, that shell is neither login nor interactive, which means neither ~/.bash_profile nor ~/.bashrc is sourced. In that case how to set the PATH environment variable so that executables can be found and executed? Is it recommended to prefix the actual command with source ~/.bashrc ? Edit. This question is trivial for Bash, because (as people pointed out) ~/.bashrc is sourced in such case. The definitive answer comes from this paragraph in man bash : Bash attempts to determine when it is being run with its standard input connected to a network connection, as when executed by the remote shell daemon, usually rshd, or the secure shell daemon sshd. If bash determines it is being run in this fashion, it reads and executes commands from ~/.bashrc , if that file exists and is readable. It will not do this if invoked as sh . The --norc option may be used to inhibit this behavior, and the --rcfile option may be used to force another file to be read, but neither rshd nor sshd generally invoke the shell with those options or allow them to be specified. |
How to list all object paths under a dbus service? Posted: 25 Apr 2022 03:16 AM PDT This is a follow-up question to A list of available DBus services. The following python code will list all available DBus services. import dbus for service in dbus.SystemBus().list_names(): print(service) How do we list out the object paths under the services in python? It is ok if the answer does not involve python although it is preferred. I am using Ubuntu 14.04 |
usbip: problem getting device attributes: No such file or directory Posted: 25 Apr 2022 03:07 AM PDT I try to use an ftdi rs232/usb adapter over ethernet. It's connected to my raspberry pi. pi@raspberrypi ~ $ usbip list -l Local USB devices ================= - busid 1-1 (0424:9512) 1-1:1.0 -> hub - busid 1-1.1 (0424:ec00) 1-1.1:1.0 -> smsc95xx - busid 1-1.2 (0403:6001) 1-1.2:1.0 -> unknown - busid 1-1.3 (7392:7811) 1-1.3:1.0 -> rtl8192cu pi@raspberrypi ~ $ sudo usbip -d bind -b 1-1.2:1.0 usbip: debug: /build/linux-tools-TqR1ks/linux-tools-3.2.17/drivers/staging/usbip/userspace/src/usbip.c:134:[run_command] running command: `bind' usbip: debug: /build/linux-tools-TqR1ks/linux-tools-3.2.17/drivers/staging/usbip/userspace/src/usbip_bind.c:143:[unbind_other] problem getting device attributes: No such file or directory usbip: error: could not unbind driver from device on busid 1-1.2:1.0 pi@raspberrypi ~ $ The state above is after rmmod ftdi_sio , same problem before. |
Write all tmux scrollback to a file Posted: 25 Apr 2022 04:43 AM PDT How can I write all the scrollback in a tmux session to a file? capture-panel can grab the current screen, but not the entire scrollback. |
bash: cd to the most recently modified child directory Posted: 25 Apr 2022 04:35 AM PDT Wondering if there's an easy and/or portable way to say "change to the most recently modified child directory". I can use ls and awk but there's probably a better way. cd $( ls -ltrd */ | tail -1 | awk '{ print $8 }' ) I have to run a command in an "output files" directory with hundreds of subdirectories and 99% of the time I want to go to the most recently changed directory. I don't know what the names of the directories will be in advance. |
No comments:
Post a Comment