Friday, January 21, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


How to make timesyncd ignore current clock and any recorded timestamp, and just get the correct current time from the server on the internet?

Posted: 21 Jan 2022 10:36 AM PST

Some day my clock was set to year 2111. Since then, timesyncd refuses to use any other data. Even setting it manually to the current or a future or past date doesn't make any difference for the service. As soon as it is (re)started, it falls back to 2111.

> systemctl status systemd-timesyncd  ● systemd-timesyncd.service - Network Time Synchronization      Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: enabled)      Active: active (running) since Fri 2111-12-11 00:29:19 -03; 5s ago      Docs: man:systemd-timesyncd.service(8)  Main PID: 18400 (systemd-timesyn)      Status: "Connecting to time server 91.189.91.157:123 (ntp.ubuntu.com)."      Tasks: 2 (limit: 18908)      Memory: 1.6M      CGroup: /system.slice/systemd-timesyncd.service              └─18400 /lib/systemd/systemd-timesyncd    Jan 22 10:22:05 a systemd[1]: Starting Network Time Synchronization...  Jan 22 10:22:05 a systemd-timesyncd[18400]: System clock time unset or jumped backwards, restoring from recorded timestamp: Fri 2111-12-11 00:29:19 -03  Dec 11 00:29:19 a systemd[1]: Started Network Time Synchronization.  

Entering systemctl restart systemd-networkd also doesn't help.

How to setup lightdm to automatically log in specific user only once

Posted: 21 Jan 2022 10:30 AM PST

When you add following config into one of the lightdm config file, you can get user to be automatically logged in:

autologin-user=user224348  autologin-user-timeout=20  user-session=ubuntu  

This is useful for example if you have encrypted drive and don't want to type password twice (once to unlock drive, second time to log-in). Problem with this is that if you are on lock-screen, you can just choose to switch account and login back without providing password. One possible fix would be to set allow-user-switching=False, but that has it's own disadvantages.

Is there a way to set-up light-dm in a way that specific user would get logged in when the system boots, but after that, password would be required?

Closest thing I could find is that maybe it's possible to create own PAM module or use existing one, but I have no idea how that works.

I'm using Linux Mint 20.3.

Why am i able to access a folder which technically shouldn't allow me in?

Posted: 21 Jan 2022 10:11 AM PST

I found a folder whose ls -ld output goes like this

drwxr-x--- 14 root somegroup  12K Jan 13 20:10 somefolder  

I dont belong to the group somegroup as found from the groups command. Rules say that i shouldn't be able to access any of the subfolders of this group, if i am not root and if i am not in somegroup. But somehow i can freely cd into that folder, and access all the subfolders inside the directory.

Is there a parallel mechanism through which access is managed in Unix ? Is there a way to check it ? Some comments in the link seems to suggest services like LDAP can do that. I have heard LDAP somewhere in my work context. But i am unable to figure out head from tail, searching online about this.

Can browse internet, but ping doesn't work

Posted: 21 Jan 2022 09:55 AM PST

I have an old laptop with Arch Linux installed on it, which I just started up for the first time in a few years. I have NetworkManager installed on it, which can seemingly connect fine to wired and wireless internet. In both cases, while I can browse the internet fine, ping does not get a response:

$ ping www.google.com  PING www.google.com (172.217.12.228) 56 (84) bytes of data.  

So the IP address is successfully resolved, but I never get a response. I don't believe there's anything funny with the firewall going on here, as I have several other devices connected to the same internet that can ping just fine.

In case it is relevant to diagnosing the problem, the reason I'm concerned about this is that I am unable to update my packages due to some issue with updating pacman keys:

$ sudo pacman -S archlinux-keyring  resolving dependencies...  looking for conflicting packages...     Packages (1) archlinux-keyring-20211028-1.0     Total Installed Size:  1.36 MiB  Net Upgrade Size:      0.13 MiB     :: Proceed with installation? [Y/n] Y  (1/1) checking keys in keyring                                                                [############################################################] 100%  downloading required keys...  :: Import PGP key 2C146C01A952AC0F, "Erich Eckner <arch32 at eckner dot net>"? [Y/n] y  error: key "2C146C01A952AC0F" could not be looked up remotely  error: required key missing from keyring  error: failed to commit transaction (unexpected error)  Errors occurred, no packages were upgraded.  $ sudo pacman-key --refresh-keys  gpg: refreshing 116 keys from hkp://pool.sks-keyservers.net  gpg: keyserver refresh failed: No name  ==> ERROR: A specified local key could not be updated from a keyserver.  

My guess is that this is related to the ping issue, but it could be unrelated.

How to grep from file names with number in range

Posted: 21 Jan 2022 09:58 AM PST

Assume I have a directory with 5,000 files. each with a name such as:

1.json  2.json  3.json  ..  4000.json  4001.json  

what command-line utility can I use to grep for a string from only the files 1.json through 2000.json?

How to pause a bash while loop until command finishes

Posted: 21 Jan 2022 10:06 AM PST

I am writing a simple script to attempt to access a variety of machines via ssh.
(I am attempting on multiple machines because they are shared computers with students and can only be accessed if they are not being used physically)
I have a text file with the name of each machine on it's own line such as:
machine-01
machine-02
machine-03

I am looping over each line and attempting to ssh to that machine. My issue is that when one of the ssh connections succeeds and I am prompted to enter my credentials, the loop is still attempting to ssh to the remaining machines and then disconnects me because of invalid commands.
my code so far:

function autossh() {      file=~/dotfiles/machines.txt      while read -r line; do          command ssh -T username@$line;          if [ $? -eq 0 ]; then              break;          fi      done < "$file"  };  

How would I wait for each command to succeed/fail and continue/break accordinly? Thanks for the help!

Connect Linux Server to VPN

Posted: 21 Jan 2022 09:30 AM PST

I've got an server on AWS using Lightsail that uses Linux 4.19/Django OS/app combination. I need to use the Django framework to create a function that will take requests coming into the server, and forward them on to another API. This API is only accessible through a VPN.

I'm a bit inexperienced with the world of VPNs and Linux, so I guess my first question is, am I on the right track for this? I've tried setting up the connection to a PPTP VPN using nmcli, checking the output of the connection stored gives me https://pastebin.com/pRh7U4Ec (I've replaced the server address with servername.com) However when trying to connect to my server I get the error "Error: Connection activation failed: Could not find source connection."

Does anyone know what the cause of that issue could be? I'm unsure where to start looking to diagnose, the only thing I can think of is that I haven't specified the VPN address properly, or that I've missed it and need to include it elsewhere. It is a server name I've been provided (eg remote.company.com), rather than an IP address, so I'm not sure if that is configured differently.

List of single words being generated/parsed as multiple single-word lines in shell script

Posted: 21 Jan 2022 09:16 AM PST

A colleague has asked me to help with a shell script which, among other things, generates a list of single words (usernames) from a data file and then loops through this list (as a for-loop) to run further commands for each of these usernames.

The script is not generating the expected output, and after putting in some debugging echo statements (to output the list, and the current value being processed by the for-loop, respectively), it looks (I suppose not unexpectedly, given the use of grep) that the list is being generated as a string of single words each separated into individual lines, rather than the one-line multi-word string that for needs(?).

(Oddly, some of the later output from within the for-loop does seem to use the 'current' username value as expected each time, but other parts seem to always use the first value from the list each time (presumably getting confused by the fact that the list is actually made up of multiple lines, rather than a single line with multiple values).)

The list is generated by:

OQLIST=`grep "*" ${QCHECK_FILE} | gawk -F " " '{print $1}'`  

The for-loop syntax is:

for OQUSER in ${OQLIST}; do      # various stuff  done  

The script is running as /bin/sh (which is actually bash on this system). I don't think it has any bashisms in it, and it would probably be fine if it actually did run as bash if need be.

Is there a way to get the list values into the for-loop in the way that it wants, or is there a more appropriate way to loop through these values instead?

Difference between poweroff and reboot

Posted: 21 Jan 2022 09:00 AM PST

I have an embedded device that is built on a Raspberry Pi. I am not the designer of the device, but support from the manufacturer is non-existent so I am on my own to debug. Some of the services that are running mysteriously stall after an indeterminant amount of time. It's been very hard to debug, but a general trend I have found is that a sudo reboot will not repair the stalled process, but for some reason a sudo poweroff does solve the problem. (It might be useful to note that forcefully pulling the power also does not solve the issue, so I have concluded that some part of the poweroff procedure is fixing it). I am trying to debug this so I can reset the device in the future without having to cycle the power (as a poweroff requires a physical power interrupt to start again). Ideally, I will also uncover the source of the problem, but at this point treating the symptoms instead of the cause is a satisfactory course of action.

So, my question is: what does sudo poweroff do, exactly, that sudo reboot does not, so I can begin my search?

Are systemd directive names case sensitive?

Posted: 21 Jan 2022 08:44 AM PST

systemd directives used in the unit files are in the documentation listed using mixed case like UMask or AccuracySec. Is it actually necessary to follow this exact wording, or is it just good practice, but the parsing is actually case insensitive? I could not find anything neither in the documentation nor in the source code.

To be more specific. This is an example Drop-In overriding the UMask value:

[Service]  UMask=0027  

Would the UMask directive be correctly read if written with different case?

[Service]  umask=0027  

Using UMask as an example, because as far as I know the systemd directive name is the only place where the term is capitalized like this. The UNIX command name is umask in all lowercase, which is not surprising. Even the systemd documentation spells the term when it's not a command name in all lowercase.

… The per-user umask may also be set via …

Tang fails with SEGV

Posted: 21 Jan 2022 09:07 AM PST

I have a tang server (clevis/tang) in a linux container (LXD).

The tangd server is started on receiving a connection throught TCP port 80, according to the tangd.socket configuration:

root@tang2:~# systemctl cat tangd.socket  # /lib/systemd/system/tangd.socket  [Unit]  Description=Tang Server socket  Requires=tangd-update.service  Requires=tangd-update.path  After=tangd-update.service    [Socket]  ListenStream=80  Accept=true    [Install]  WantedBy=multi-user.target  

On conecting, the server is started, but it is killed right away because of a segmentation fault:

Jan 21 16:10:19 tang2 systemd[1]: Started Tang Server (10.0.0.122:50186).  Jan 21 16:10:19 tang2 systemd[1]: tangd@6-10.236.142.136:80-10.0.0.122:50186.service: Main process exited, code=killed, status=11/SEGV  Jan 21 16:10:19 tang2 systemd[1]: tangd@6-10.236.142.136:80-10.0.0.122:50186.service: Failed with result 'signal'.  

It seems to me the container has enough memory available:

root@tang2:~# free -h                total        used        free      shared  buff/cache   available  Mem:          7.8Gi        32Mi       7.6Gi       6.0Mi       184Mi       7.8Gi  Swap:            0B          0B          0B  

More info:

root@tang2:~# ulimit -a  core file size          (blocks, -c) 0  data seg size           (kbytes, -d) unlimited  scheduling priority             (-e) 0  file size               (blocks, -f) unlimited  pending signals                 (-i) 31790  max locked memory       (kbytes, -l) 64  max memory size         (kbytes, -m) unlimited  open files                      (-n) 1048576  pipe size            (512 bytes, -p) 8  POSIX message queues     (bytes, -q) 819200  real-time priority              (-r) 0  stack size              (kbytes, -s) 8192  cpu time               (seconds, -t) unlimited  max user processes              (-u) unlimited  virtual memory          (kbytes, -v) unlimited  file locks                      (-x) unlimited  

The SO is Debian Linux 10 (Buster)

root@tang2:~# cat /etc/os-release  PRETTY_NAME="Debian GNU/Linux 10 (buster)"  NAME="Debian GNU/Linux"  VERSION_ID="10"  VERSION="10 (buster)"  VERSION_CODENAME=buster  ID=debian  HOME_URL="https://www.debian.org/"  SUPPORT_URL="https://www.debian.org/support"  BUG_REPORT_URL="https://bugs.debian.org/"  

Tang packet info:

Package: tang  Version: 7-1+deb10u1  State: installed  Automatically installed: no  Priority: optional  Section: net  Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>  Architecture: amd64  Uncompressed Size: 66.6 k  Depends: libc6 (>= 2.8), libhttp-parser2.8 (>= 2.1), libjansson4 (>= 2.10~), libjose0 (>= 10), jose  Description: network-based cryptographic binding server   Tang is a service for binding cryptographic keys to network presence. It offers a secure, stateless, anonymous   alternative to key escrow services.  Homepage: https://github.com/latchset/tang  
root@tang2:~# ldd /usr/lib/x86_64-linux-gnu/tangd          linux-vdso.so.1 (0x00007fffb88f6000)          libjose.so.0 => /usr/lib/x86_64-linux-gnu/libjose.so.0 (0x00007f1df6639000)          libjansson.so.4 => /usr/lib/x86_64-linux-gnu/libjansson.so.4 (0x00007f1df662a000)          libhttp_parser.so.2.8 => /usr/lib/x86_64-linux-gnu/libhttp_parser.so.2.8 (0x00007f1df661f000)          libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1df645e000)          libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f1df6175000)          libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1df5f57000)          libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1df5f34000)          /lib64/ld-linux-x86-64.so.2 (0x00007f1df6864000)          libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1df5f2f000)  

I tried to connect to the tang server using telnet and strace the server:

root@tang2:~# telnet localhost 80  Trying ::1...  Connected to localhost.  Escape character is '^]'.  GET /adv HTTP/1.0  Connection closed by foreign host.  

This is the strace output:

root@tang2:~# ps ax|grep tang    995 ?        Ss     0:00 /usr/lib/x86_64-linux-gnu/tangd /var/cache/tang    997 pts/2    S+     0:00 grep tang  root@tang2:~# strace -f -p 995  strace: Process 995 attached  read(0, "GET /adv HTTP/1.0\r\n", 4095)  = 19  --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} ---  +++ killed by SIGSEGV +++  

Do you know why is the tangd server killed?

Here it is a trace from a working tang server:

read(0, "GET /adv HTTP/1.0\r\n", 4095)  = 19  read(0, "\r\n", 4095)                   = 2  write(2, "::1 GET /adv", 12)            = 12  open("/var/cache/tang/default.jws", O_RDONLY) = 3  fstat(3, {st_mode=S_IFREG|0644, st_size=956, ...}) = 0  fstat(3, {st_mode=S_IFREG|0644, st_size=956, ...}) = 0  read(3, "{\"payload\":\"eyJrZXlzIjpbeyJhbGci"..., 4096) = 956  write(2, " => 200 (src/tangd.c:85)\n", 25) = 25  fstat(1, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0  lseek(1, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)  write(1, "HTTP/1.1 200 OK\r\n", 17)     = 17  fstat(1, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0  lseek(1, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)  write(1, "Content-Type: application/jose+j"..., 1016) = 1016  close(3)                                = 0  read(0, "\r\n", 4095)                   = 2  read(0, "", 4095)                       = 0  exit_group(0)                           = ?  +++ exited with 0 +++  

Regards,

Can one do the equivalent of "rm -rf targetdir && mv sourcedir targetdir" with one command?

Posted: 21 Jan 2022 09:34 AM PST

There are a few ways to interpret the operation of "replacing one file with another", but the one I want to focus on here is the one that can be achieved with the command

mv /that/there/someotherfile /this/here/somefile  

In this example /that/there/someotherfile and /this/here/somefile are supposed to be regular files currently existing in the filesystem.

If all goes well, after running the command above, the file "formerly known as" /that/there/someotherfile will have disappeared, but its content will now be the new content of the file /this/here/somefile. The latter's former content will have been "overwritten."

Now consider the analogous operation of "replacing one directory with another." E.g. overwriting some directory /path/to/targetdir with the directory /some/other/path/to/sourcedir. I can do this with

rm -rf /path/to/targetdir && mv /some/other/path/to/sourcedir /path/to/targetdir  

Can I do this with a single "more-or-less standard"1 command that works irrespective of the contents of the two directories in question?

I know that, if /path/to/targetdir happeans to be an empty directory, then

mv -T /some/other/path/to/sourcedir /path/to/targetdir  

...will do the job.

Also, I know that if /path/to/targetdir does not contain any relative paths that is not also present under /some/other/path/to/sourcedir, and all relative paths present under both directories point to file system items of the same type (i.e. they are both directories, or both regular files, etc.), then the following gets close to the operation described above

rsync -a --remove-source-files /some/other/path/to/sourcedir/ /path/to/targetdir  

Of course, it would not be difficult to implement2 a script or a function to encapsulate the rm -rf + mv sequence given above, but I would like to avoid implementing something that is already available through more-or-less standard Unix commands.


1 I realize that the answer to this question depends critically on what one considers the set of permissible commands, and, unfortunately, here I can offer nothing better than vigorous hand-waving... For example, I regard cp and mv as "more-or-less standard", but even in this case, some of the options these commands take may not be. In fact, if one makes this condition sufficiently precise (e.g. limiting the permissible commands to the "mandatory POSIX untilies"), there may be no general way to "replace one directory with another", in the sense described above, using a single command. If so, feel free to define the set of permissible commands in a way that you find would render your sufficiently useful and/or interesting. In other words, on the choice of the set of permissible commands, I am ready to defer to your good taste.

2 Famous last words.

find -exec command options with basename

Posted: 21 Jan 2022 09:58 AM PST

I have the following JPEG files :

$ ls -l  -rw-r--r-- 1 user group 384065 janv. 21 12:10 CamScanner 01-10-2022 14.54.jpg  -rw-r--r-- 1 user group 200892 janv. 10 14:55 CamScanner 01-10-2022 14.55.jpg  -rw-r--r-- 1 user group 283821 janv. 21 12:10 CamScanner 01-10-2022 14.56.jpg  

I use $ img2pdf to transform each image into a PDF file. To do that :

$ find . -type f -name "*.jpg" -exec img2pdf "{}" --output $(basename {} .jpg).pdf \;  

Result :

$ ls -l *.pdf  -rw-r--r-- 1 user group 385060 janv. 21 13:06 CamScanner 01-10-2022 14.54.jpg.pdf  -rw-r--r-- 1 user group 201887 janv. 21 13:06 CamScanner 01-10-2022 14.55.jpg.pdf  -rw-r--r-- 1 user group 284816 janv. 21 13:06 CamScanner 01-10-2022 14.56.jpg.pdf  

How can I remove the .jpg part of the PDF filenames ? I.e., I want CamScanner 01-10-2022 14.54.pdf and not CamScanner 01-10-2022 14.54.jpg.pdf.

Used alone, $ basename filename .extension prints the filename without the extension, e.g. :

$ basename CamScanner\ 01-10-2022\ 14.54.jpg .jpg  CamScanner 01-10-2022 14.54  

But it seems that syntax doesn't work in my $ find command. Any idea why ?

Note : if you replace $ img2pdf by $ echo it's the same, $ basename doesn't get rid of the .jpg part :

$ find . -type f -name "*.jpg" -exec echo $(basename {} .jpg).pdf \;  ./CamScanner 01-10-2022 14.56.jpg.pdf  ./CamScanner 01-10-2022 14.55.jpg.pdf  ./CamScanner 01-10-2022 14.54.jpg.pdf  

NVidia driver won't install correctly

Posted: 21 Jan 2022 08:40 AM PST

I have a problem installing NVidia drivers. I try to install the recommended 470 driver. It gives me an output that i'm possibly missing firmware in i915. And when I try it through software sources it gives me pk-client-error-quark: error while installing package: subproces from package intramfs-tools script post-intallation returned errorvalue 1 (313).
So I downloaded firmware from enter link description here. And I unpacked the tarball. But don't know how to reinstall the i915 package. Please tell me how to install this.

It also won't fully install the Xorg driver ( same errorvalue 1 (313)).

I think I need to reinstall the i915 package in order to install the nvidia drivers correctly. But I'm not sure.

Because the driver won't install properly, NVidia X-settings doesn't work either.

Does anybody have a solution for me how to solve this.

I run
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.7
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.11.0-41-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 15,3 GiB
NVidia GeForce 250 MX (GP108M)/Intel Integrated GPU on HP Envy 17 ce1000 (laptop)

Change file creation date and time based off of file name

Posted: 21 Jan 2022 08:49 AM PST

I was copying Asterisk call recordings from our main server to a samba share and the creation date and times were changed to the current date and time.

The file format is: in-xxxxxxxxxx-xxxxxxxxxx-20211020-162749-1634761669.7921917.wav

The bold part is in EPOCH time. I have hundreds of these files and I need to change the creation date of the file based on that EPOCH time stamp in the file's name. Can anyone help me?

Using grep/awk to find/print certain value in a text file

Posted: 21 Jan 2022 10:13 AM PST

Assume that i have a text file containing the following 5 lines:

Tue 18 2022 car model: Toyota , car motor: 2001 , car color: blue , year of production: 2018  Thu 19 2022 car model: Mercedes , car color: black , year of production: 2012 , car motor: 4000  Thu 20 2022 used: yes , car motor: 1999 , car model: Mercedes , car color: black , year of production: 2012  Thu 20 2022 car model: Kia , car motor: 1500 , car color: red , used: no , year of production: 2010  Thu 20 2022 price: 150, car model: GMC  , car color: purple , car motor: 3500 , year of production: 2010  

i'm looking for grep/awk (or other utility that's available on freebsd 11) that will find/print every line where the following condition evaluated TRUE:

Phrase "car motor:" followed by a space and then a numerical value greater than 2000  

Such grep/awk is expected to find/print the following lines from the text file:

Tue 18 2022 car model: Toyota , car motor: 2001 , car color: blue , year of production: 2018  Thu 19 2022 car model: Mercedes , car color: black , year of production: 2012 , car motor: 4000  Thu 20 2022 price: 150, car model: GMC  , car color: purple , car motor: 3500 , year of production: 2010  

Grub disappeared from boot menu

Posted: 21 Jan 2022 08:47 AM PST

My grub suddenly disappeared from boot menu. Using win11 and arch linux dual boot. Did not update BIOS or made any changes.

I tried the answer from this similiar problem but it didn't help: GRUB disappeared from Boot Menu after UEFI (BIOS) upgrade on Thinkpad X1 Carbon gen5

What to do to get it back?

Is cgroup a type of namespace?

Posted: 21 Jan 2022 10:23 AM PST

Is cgroup a type of namespace?

I am asking this because I have seen blogs talking as if cgroup and namespaces are different. However, in different linux commands , cgroup is considered as a type of namespace. For example,

% unshare --help | grep cgroup   -C, --cgroup[=<file>]     unshare cgroup namespace  % lsns --help | grep cgroup   -t, --type <name>      namespace type (mnt, net, ipc, user, pid, uts, cgroup)  

What is actually going on here?

How to add text before the Nth occurrence of a text using sed only?

Posted: 21 Jan 2022 10:00 AM PST

I searched on previous questions but they were only with appending so adding after the occurrence. i need it to be before:

 world world   world world   world world  

So sed must add "hello" for example at the start of the Nth occurrence of a specific text. in this case im adding it to the fourth world:

world world  world hello world  world world  

How to disable Activities on Ubuntu

Posted: 21 Jan 2022 10:21 AM PST

I've created a Virtual Machine on my iMac(running Catalina 10.15.7). The VM is running Ubuntu 20.04.3 AMD64 with 4GB of RAM. when using the VM, Ubuntu randomly enters me into the Activities panel without me touching the Activities button.

Is there a gesture/shortcut or something that does this? If so, how can I disable it?

Linux Mint 20.2 Live usb booting results in black screen

Posted: 21 Jan 2022 09:04 AM PST

I downloaded linux mint 20.2 official iso file and wrote it in to usb flash drive. I disabled secure boot in bios and booted from USB device.

Than I get GRUB 2.04 menu with these options:

  • Start Linux Mint 20.2 Cinnamon 64-bit
  • Start Linux Mint 20.2 Cinnamon 64-bit (compatibility mode)
  • OEM install (for manufactures)
  • Check the integrity of the medium

No matter what I choose it will result in to irresponsive black screen.

What should I do to make it boot and make functional install ?
Thank you for help

PS: Notebook islenovo S740 with Nvidia graphics card

EDIT:

  • I tried to force integrated graphics in BIOS. This did not change anything.
  • The compatible mode has nomodeset as parameter. When I choose it I get same result.
  • Yes I did checksum and image is matching published hash
  • replacing nomodeset with nouveau.noaccel=1 in compatibility mode does not change anything
  • I downloaded and tried to install Linux mint 20.2 edge with kernel 5.11 issue still remains

Moving RAID5 to RAID1 -- Out of Disk Slots

Posted: 21 Jan 2022 10:16 AM PST

Years and years ago, I set up a 4 TB RAID5 array using 3x 2 TB disks. Those are positioned in sda/b/c. I have a very old tiny disk in sdd, and I'm booting from a 1 TB SSD in sde. Yea, it's a mess.

Disks have gotten cheaper, so I'm trying to simplify my setup. I have two identical 4 TB disks, that I'd like to set up a new RAID1 to replace the existing array (I've had all sorts of issues with drives dropping, etc in the existing).

The problem is that I can replace sdd, but do not have two available slots to create the array. I could do something like the following link, but it seems that OP had additional complications because it was their boot disk. These disks/array are only for storage. Not sure if that simplifies the situation at all. Can I create a software RAID 1 with one device

Other choice would be to try and run the RAID5 with only two disks during the initial copy. Any chance this would screw things up?

Thanks a bunch!

How can I install GRUB

Posted: 21 Jan 2022 09:36 AM PST

This will be kind of long.

So, I had a Manjaro KDE installation dual booting with Windows 11. I decided I want to install Ubuntu (specifically Ubuntu Budgie) instead of Manjaro. I booted from the live USB, and the install options were:

  1. Install alongside other operating systems (not what I wanted)
  2. Use entire disk (still not what I wanted)
  3. Something else (I selected this)

I deleted the Manjaro partition and used the free space to install Ubuntu. It installed successfully and told me to remove flash drive and press enter. As soon as it boots it says, "unknown partition" and goes to GRUB rescue. I tried a few methods to boot into Ubuntu from GRUB rescue, none were successful. I understand the problem, I deleted the partition that stores files for GRUB. I managed to get to BIOS set up during the split second between pressing the power button and loading GRUB (which automatically goes to GRUB rescue). I changed the settings to use Windows Boot Manager instead of Manjaro. It worked and booted into Windows. Now my question is, how do I install GRUB? If I boot with the live USB again is there a way to install GRUB?

How can I kill a specific process running inside a screen session, without killing that screen session?

Posted: 21 Jan 2022 09:59 AM PST

I have run multiple ANN training processes under multiple screen sessions. When I enter a screen, I see a training process running.

Now, I want to kill a specific process inside the screen without killing the screen.

I can press CTRL + C. But, that produces some unwanted garbage text on the screen.

How can I do it cleanly?

If I try to kill the process using the process-ID, I become confused. For me, it is impossible to recognize individual processes. Coz, they are running files with the same file names.

How to do that?

N.B. I am using TensorFlow and Keras.

N.B.#2, I am using SSH.

Failed to open a session for the virtual machine Kali-Linux-2021.1-vbox-amd64. Callee RC: RPC_E_SERVERFAULT (0x80010105)

Posted: 21 Jan 2022 09:01 AM PST

I have installed Kali Linux on VirtualBox but I had not been open for the last 1 month. Now I am trying to start Kali on VB but it gives me an error.

Error:

enter image description here

After closing this dialog box, it is opening another one to creating a process.

enter image description here Any help is highly Apreciated.

Does CentOS 8 have a package for entr?

Posted: 21 Jan 2022 09:26 AM PST

When I was using CentOS 7, there was a package available for entr. There doesn't seem to be a package available for CentOS 8.

Was this just not packaged for CentOS 8?

How to pass to ssh the key stored in a shell environment variable?

Posted: 21 Jan 2022 08:53 AM PST

Presumably ssh tries to access the fd several times, but the fd is destroyed after it has been read the very first time:

# ssh -i <(echo $KEY) user@example.com  Warning: Identity file /dev/fd/11 not accessible: Bad file descriptor.  user@example.com: Permission denied (publickey).  

Is there any other way without writing/removing temporary file?

When uname reports aarch64 instead of arm64v8. Willl docker-ce still pull arm64v8 images

Posted: 21 Jan 2022 09:03 AM PST

docker-ce now supports multiple architecture base images but looks for the tag arm64v8 instead of aarch64 (which is labelled as deprecated).

Unfortunately my new ubuntu 18.04 host os uname reports aarch64.
Linux nas 4.4.154-1122-rockchip-ayufan-g7859b9b904a9 #1 SMP Mon Oct 1 07:32:42 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

So

  1. Can one manually add/change the architecture tag in a already operational host? or
  2. Will docker-ce pull the arm64v8 image even if the host os reports aarch64?

CentOS 7 reboot error getting authority?

Posted: 21 Jan 2022 10:06 AM PST

I'm trying to reboot the CentOS 7 after yum update, and getting the following error when I run sudo reboot.

Error getting authority: Error initializing authority: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An SELinux policy prevents this sender from sending this message to this recipient, 0 matched rules; type="method_call", sender="(null)" (inactive) interface="org.freedesktop.DBus" member="Hello" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus) (g-dbus-error-quark, 9)

I also get the same error when I run sudo service dbus start.

Can anyone help?

How to hide shell process information when starting background process?

Posted: 21 Jan 2022 08:43 AM PST

[USER@SERVER ~] sleep 3 &  [1] 5232  [USER@SERVER ~]   [1]+  Done                    sleep 3  [USER@SERVER ~]   

How do I /dev/null these two messages?:

[1] 5232  [1]+  Done                    sleep 3  

p.s.: so I need the output of the process, but not the mentioned two lines!

No comments:

Post a Comment