Wednesday, May 11, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


What is entomb service?

Posted: 11 May 2022 12:45 PM PDT

On many GNU/Linux systems I see the following entry in /etc/services file:

entomb            775/tcp  

What is entomb?

I searched the internet for information about it but there's very little information.

Is it possible to have terminal make a sound when a compilation fails?

Posted: 11 May 2022 12:19 PM PDT

I compile programs in my terminal and for a lengthy compilation, I usually let it sit in the background. I would like to be notified, somehow (maybe by sound), when the compilation fails. Is there a way to enable this feature?

cryptsetup mistake and fixing a start job is running for no time limit

Posted: 11 May 2022 12:08 PM PDT

I was messing with cryptsetup to mount a LUKS encrypted volume automatically without prompting for a passphrase (which I was successful in doing) however I naively deleted everything in /etc/ccryptab and did a reboot. Now linux, after prompting for the LUKS passphrase of the booting operating system disk, which it takes successfully, it progresses then hangs at

a start job is running for /dev/mapper/luks-*** (no time limit)

It is trying to mount a second disk in the system that is LUKS encrypted, that I mount as /scratch

Is there a way to fix this or am I looking at reinstalling linux from dvd?

Or is there a way to mount this disk in another system, which I know I could do, and then what on it can I edit to undo what's causing the hangup?

I am running RHEL 7.9 x86-64.

wlan0 not showing on ifconfig/iwconfig, even with TP-link wireless adapter connected

Posted: 11 May 2022 12:07 PM PDT

I just got a TP-Link wifi adapter, and followed a YouTube tutorial on how to set it up. It worked fine at first, and showed Mode: Montitor when I finished. However after messing around for a bit, I restarted my Kali Linux (on VM) and now I can not get it to work again. wlan0 does not show on ifconfig nor iwconfig.

Does anyone know how to fix this?

What is a command?

Posted: 11 May 2022 11:58 AM PDT

Clear thinking and clear communication are facilitated when different terms are used to represent different concepts.

This is particularly useful when the 2 concepts are very similar but different.

We tend to use the term "command" to represent 2 very similar but different concepts.

concept 1: A single program entered on a command-line interface.

Options might be passed to the program, but there is still only 1 program being used.

example(s):

$ ls  $ ls -alF  

This concept is referred to as a "command".

concept 2: Anything entered on a command-line interface before hitting the Enter key to instruct the shell to process it.

example(s):

$ ls -alF | head > output.txt; cat output.txt  

This concept is also referred to as a "command".
This is true even though it contains 3 different "commands" according to the previous definition.

For people who desire to use different terms to represent different concepts in order to think and communicate ideas more precisely, what are the best terms to use to represent these 2 different concepts?

canonical/non-canonical vs raw/cooked?

Posted: 11 May 2022 11:22 AM PDT

In the context of terminals, what is the difference between the two opposites canonical/non-canonical and cooked/raw?

This thread says that they are synonym. But that's weird because one of the "local settings" in stty is icanon, while cooked or raw are "combination settings", in which icanon is one of the settings in the combinations.

How to burn a distro iso on Windows?

Posted: 11 May 2022 11:16 AM PDT

I use Windows 10 home and I consider to migrate to Ubuntu.

I took an empty disk-on-key (DoK) and putted inside it a Ubuntu 22.04 iso file.

My Dell Latitude 5580 laptop is "modern" in the sense that I can't choose how to boot in bios, i.e. booting should be done automatically if a DoK contains an iso which is burnt.

How to burn a distro iso on Windows?

Perhaps this question is a better fit for a website about software recommendations or SuperUser because I might need some third party software to do that or some Windows non-WSL software.

error while getting text from font tag using selenium

Posted: 11 May 2022 11:11 AM PDT

I am using Java to automate a process on a wepage with selenium. I have the following line of code to get a text inside a font tage:

var elem = driver.findElement(By.xpath("/html/body/uni-app/uni-page/uni-page-wrapper/uni-page-body/uni-view/uni-view[3]/uni-view[1]/uni-view[2]/font/font")).getText();  

The text is there, but it is not returned for some reason and I am getting:

Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/uni-app/uni-page/uni-page-wrapper/uni-page-body/uni-view/uni-view[3]/uni-view[1]/uni-view[2]/font"}  

(Session info: chrome=101.0.4951.64)

For documentation on this error, please visit: https://selenium.dev/exceptions/#no_such_element

The text is there and that is the correct xpath, but I do not know why I am getting this error. Can someone please take a look.

Check info in each line on a specific set of columns in one variable against all lines in three specific columns in another variable using awk

Posted: 11 May 2022 01:28 PM PDT

I've asked a very similar question today before, however I have since realised that I need to increase parameters for the command. I edited the command for a another parameter okay, but the next parameter I had less success with and I don't know why. Here is what I'm trying (and failing) to solve.

I need to check info in each line on a specific set of columns in one variable against all lines in two specific columns in another variable using awk, keeping lines in the first variable that meet parameters.

Attempts I have made so far to do this in one powerful awk command have failed. I can obviously do this in an external loop, but it would be very slow as I have 100's of thousands of lines to check. I appreciate any and all help with solving this, and I am always looking to improve my use of awk, so if you have a solution it would be great to have an explanation so I can learn and improve myself.

Here is an example:

  • Lets say I want to print only the lines from ${ListToCheckFrom}, if column 2 is >= and column 3 is <= to the corresponding columns of any one line from ${ListToCheckAgainst}. Additionally column 1 from ${ListToCheckFrom} must be identical to column 1 in ${ListToCheckAgainst}

  • Input example:

ListToCheckFrom="r,2,3  C,22,24  C,12,13  C,51,59  C,15,20  C,13,18"            ListToCheckAgainst="C,25,50  C,22,30  C,12,18  C,15,17  C,1,12  C,60,200"    
  • Expected output:
C,22,24    C,12,13  C,15,20  C,13,18  
  • What I have tried based from an answer (thanks to @AdminBee) to a simpler previous question I asked today:
awk -F',' 'list=="constraints"{n++; low[n]=$2;high[n]=$3;c[n]=$1;next}             {for (i=1;i<=n;i++) {if (($1==c[i])&&($2>=low[i]&&$2<=high[i])||($3>=low[i]&&$3<=high[i])) {print;next};}}' list=constraints <(echo "$ListToCheckAgainst") list=check <(echo "$ListToCheckFrom")  

I am using Ubuntu.

Using UIM to insert Unicode input from keyboard

Posted: 11 May 2022 12:04 PM PDT

According to "Transparent" Unicode input from keyboard UIM supports entering Unicode characters with Ctrl+Shift+u like IBus, but without showing an interactive prompt. I haven't been able to get this to work after spending hours on it. Could somebody with better luck please walk me through the process?

I'm running Manjaro. I installed UIM with yay -S uim. I added

export GTK_IM_MODULE=uim  export QT_IM_MODULE=uim  uim-xim &  export XMODIFIERS=@im=uim  

to my .xprofile config file (as indicated here). I explored the options in uim-pref-gtk but could not find anything relevant. Pressing Ctrl+Shift+u acts as if nothing has been pressed.

boot from usb stick without the grub prompt

Posted: 11 May 2022 10:41 AM PDT

For some reason today when I went to boot from the usb stick the grub prompt opened up. The process is the following: I turn on the pc, open the boot menu, select to boot from the usb stick and then the grub menu always opens up at this point. I tried with a usb flashed with pop os 21.10, then 22.04 and then with linux mint, the grub prompt always opened up. The normal boot with my internal hard drive seems to be ok, this only happens when I select to boot from the usb stick.

I managed to still boot from the usb stick thanks to this guide https://linuxhint.com/boot-usb-using-grub/

Question: is there a way to directly boot from the usb stick when I select it from the boot menu instead of passing through the grub prompt which is bothersome? In the past it has always booted directly from it, without the grub prompt, I don't know what has changed now.

Extract field and number of occurrences per line

Posted: 11 May 2022 10:22 AM PDT

I have this file:

John Green', 'Age: 32', 'State: New York', 'Total cars: 2', 'Manufacter: General Motor', 'Model: Pontiac', 'Year: 2000', 'Manufacter: Ford Motor', 'Model: Endeavour', 'Year: 2010  Peter Jones', 'Age: 20', 'State: Florida', 'Total cars: 0  Richard Smith', 'Age: 44', 'State: Illinois ', 'Total cars: 1', 'Manufacter: Toyota', 'Model: Yaris', 'Year: 2005  Brian Brown', 'Age: 42', 'State: Texas', 'Total cars: 0  Vincent Osmnod', 'Age: 39', 'State: Maryland', 'Total cars: 1', 'Manufacter: Fiat', 'Model: 500X', 'Year: 2015  

I can use awk to extract the 4th field
and if I want to get the number of occurences of ', ' per line I use the script:

grep -o -n "', '" file | cut -d : -f 1 | uniq -c  

this command also gives me the number of line

  9 1    3 2    6 3    3 4    6 5  

so I can get the results separately

My desired output is:

Total cars: 2 |9 1  Total cars: 0 |3 2  Total cars: 1 |6 3  Total cars: 0 |3 4  Total cars: 1 |6 5  

I tried with this script:

#!/bin/bash  FILENAME=$1  count=0  while read LINE  do          OUTP1=$(awk -F"', '" '{print $4" |"}' $LINE)          OUTP2=$(grep -o -n "', '" $LINE1 | cut -d : -f 1 | uniq -c)          echo "$OUTP1 $OUTP2"  done < $FILENAME  

and it gives me this output:

awk: cannot open John (No such file or directory)         3 1        6 2        3 3        6 4  

Substitution in html file using awk

Posted: 11 May 2022 12:13 PM PDT

My awk script reads records from file1, finds the same records in file2 and substitutes alternate positions (of the record) with a defined symbol in that. But few of the values are not getting substituted as desired. Please help me fix it.

awk ' FNR==NR  {  if ($0 in word)  next  word[$0]=$0  for (i=1;i<=NF;i++)   {     old=$i     new=""     while (old) {           len=length(old)           new-new substr(old,1,1) substr("##",1,len-1)           old=substr(old,4)         }        id=index(word[$0],$i)        word[$0]=substr(word[$0],1,id-1) new substr(word[$0],id+length($i))    }   next  }    {   for (i in word)   {    id=index($0,i)    while(id>0) {    $0=substr($0,1,id-1) word[i] substr($0,id+length(word[i]))     id=index($0,i)   }  }  print   }' records test.html > output.html  
$ cat records    LEFT NAME  LEFT NAME 2  LEFT   LEFT 123  TYTYTYGGHG  TYTYTY  /FUJI  CHASE BANK, N.A  Mark Ruffalo          AB 8263  AB SCENARIO DEBUG  AB 8263 SCENARIO DEBUG  

$ cat test.html

<html>  <body>  <hr><br><>span class="table">TabA</span><table>  <tr class="column">   <td>LEFT NAME</td>   <td>LEFT</td>   <td></td>   <td>LEFT NAME 2</td>   <td>LEFT 123</td>   <td>TYTYTYGGHG</td>   <td></td>   <td>TYTYTY</td>  </tr>  <tr class="data">  <td></td>  <td>Mark Ruffalo    </td>  <td>CHASE BANK, N.A</td>  <td>AB 8263</td>  <td></td>  <td>/FUJI</td>  <td>AB SCENARIO DEBUG</td>  <td>AB 8263 SCENARIO DEBUG</td>  </tr>  </table>  </body>  </html>    

desired op -

<html>  <body>  <hr><br><>span class="table">TabA</span><table>  <tr class="column">   <td>L##T N##E</td>   <td>L##T</td>   <td></td>   <td>L##T N##E 2</td>   <td>L##T 1##</td>   <td>T##Y##G##G</td>   <td></td>   <td>T##Y##</td>  </tr>  <tr class="data">  <td></td>  <td>M##k R##f##o    </td>  <td>C##S# B##K, N.#</td>  <td>A# 8##3</td>  <td></td>  <td>/F##I</td>  <td>A# S##N##I# D##U#</td>  <td>A# 8##3 S##N##I# D##U#</td>  </tr>  </table>  </body>  </html>    

Current output -

<html>  <body>  <hr><br><>span class="table">TabA</span><table>  <tr class="column">   <td>L##T NAME</td>   <td>L##T</td>   <td></td>   <td>L##T NAME 2</td>   <td>L##T 123</td>   <td>T##Y##GGHG</td>   <td></td>   <td>T##Y##</td>  </tr>  <tr class="data">  <td></td>  <td>Mark Ruffalo    </td>  <td>CHASE BANK, N.A</td>  <td>A# 8##3</td>  <td></td>  <td>/FUJI</td>  <td>A# S##N##I# D##U#</td>  <td>A# 8##3 SCENARIO DEBUG</td>  </tr>  </table>  </body>  </html>    

How to map data based on substring?

Posted: 11 May 2022 01:19 PM PDT

I have data in the following manner:

staging_uw_pc_account_contact_role_hive_tb  staging_uw_pc_account_hive_tb  staging_uw_pc_account_location_hive_tb  uw_pc_account_contact_hive_tb  uw_pc_account_contact_hive_tb_backup  uw_pc_account_contact_role_hive_tb  uw_pc_account_contact_role_hive_tb_backup  

How do I create a map based on the following rules?

  1. remove _backup from the end
  2. remove staging_ from the start
  3. and now check the mapping.

The result should be something like this. Not every table should have staging and backup in that case those fields should be empty.

uw_pc_account_contact_role_hive_tb, uw_pc_account_contact_role_hive_tb_backup, staging_uw_pc_account_contact_role_hive_tb  

Having trouble with syntax in declaring variables

Posted: 11 May 2022 09:16 AM PDT

enter image description hereI need help in fixing this script, getting too many syntax errors?

- hosts: mononode     gather_facts: false     tasks:     - name: wait for pods to come up       shell: >-            get_total_count =  (kubectl --kubeconfig  kubeconfig            -n default get pods --no-headers -o wide |            awk '{split($2,a,"/");if( (a[1]<a[2]||$3="Initialization"))print}' |            wc -l)              Total_not_running_count = (kubectl --kubeconfig  kubeconfig            -n default get pods --no-headers -o wide |            awk '{split($2,a,"/");if( (a[1]<a[2]||$3!="Running") && $3!="MatchNodeSelector" )print}' |            wc -l)              echo "Total count is $get_total_count"            echo "Running count is $Total_not_running_count"              total_not_running = $(($Total_not_running_count / $get_total_count))            not_running_percentage= $(($total_not_running * 100))            echo "Not Running pods percentage is $not_running_percentage"              if (( $(not_running_percentage) >= 95 )); then            echo "Not Running pods percentage is greater than 95"            else            echo "Not Running pods percentage is greater than 95"            echo "Re-running....."            fi  

docker: Error response from daemon: failed to create shim: OCI runtime create failed

Posted: 11 May 2022 09:20 AM PDT

I'm running into this error while running even an official docker image such as OpenJDK or even hello-world:

# docker run hello-world  docker: Error response from daemon: failed to create shim: OCI runtime create failed:  container_linux.go:380: starting container process caused: process_linux.go:402:  getting the final child's pid from pipe caused: EOF: unknown.  

My OS is:

# rpm --query centos-release  centos-release-7-5.1804.4.el7.centos.x86_64  

and my Docker version:

# docker -v  Docker version 20.10.14, build a224086  

The error appears for no change or update. How can I investigate the reason of this problem?

Memory Management with Segmentation

Posted: 11 May 2022 09:18 AM PDT

I've read the part of "Modern Operating Systems" by Tanenbaum about segmentation and got left with some questions:

  1. How does the operating system manage the free memory space? For example my program needs another segment, so the OS trys to allocate memory, but how does it know the free or not free segmented parts? Does it look up every GDT and LDT entry to create some sort of memory map?

  2. How does my program know which segment selector to choose? Are there only a few, like code segment, data segment, stack segment etc, so that it "quite obvious" which one to choose?

  3. Can I have multiple code/data/etc segments, if my segment runs "out of space", or does it increases in runtime, when needed?

Thanks for some clarification!

Why it is allowed to enter very special characters to `passwd` in Ubuntu?

Posted: 11 May 2022 08:58 AM PDT

passwd in Ubuntu allows very special characters to became password like , while you can only set very special characters to OpenSUSE with their Yast.

Do the very special characters work properly in all the popular Linux systems? And are they harder to crack than the password formed by english letters?

How to download all repositories of a GitHub account to my personal computer without using github cli? [duplicate]

Posted: 11 May 2022 10:03 AM PDT

I use WSL Ubuntu 18.04 unchanged.

I have one GitHub user with 6 GitHub repositories of that user.

Basically I just need to download all my GitHub repositories as I wish to make a local backup of all my GitHub repositories in my personal computer.

I can download a zip of each one of all 6 repositories from GitHub GUI but I seek some automatic way to download all of them from CLI, not necessarily in zip form (it can also be just 6 directories with all files in them).

How will I achieve this?

Automatically mounting LUKS encrypted volume during boot

Posted: 11 May 2022 11:11 AM PDT

Running RHEL 7.9, my root partition is LUKS encrypted so during system boot I am prompted at the console for the passphrase to continue booting; that part is fine.

Once system is booted, in /etc/fstab I have a mount /dev/sdc1 /data where that block device is LUKS encrypted.

I can use the GNOME DISKS utility to unlock it and mount it but that becomes a second process, and a manual one I have to remember every time the system reboots... I also have to log in at the console and run the gnome-disks utility to mount my /data folder... which is terabytes and my OS disk root partition is only 600gb so the problem that quickly arises is the root partition filling up if /data doesn't get mounted.

How, under RHEL 7.9, can the automatic unlocking and mounting of a LUKS encrypted disk be made to happen during boot time? So it then mounts like any other [unencrypted] disk specified in /etc/fstab?

Why does OpenSSH debug2 handshake logging only on some logins, not on every login?

Posted: 11 May 2022 10:20 AM PDT

Running Ubuntu 18.04.1 LTS with package openssh-server 7.6p1-4ubuntu0.5

In /etc/ssh/sshd_config is set LogLevel DEBUG2.

I get the debug2 log message of the client MACs offering part of handshake:

May 3 18:51:05 10.10.10.10 sshd[14300]: debug2: MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5 [preauth]

and afterwards in the same second the login log entry for user "abc" login from IP 1.2.3.4 with the same sshd PID, so I guess this login message belongs to the first debug2 log entry:

May 3 18:51:05 10.10.10.10 sshd[14300]: Accepted password for abc from 1.2.3.4 port 51294 ssh2

But I get the according (same PID, roughly same second) debug2 handshake log entry not for every Accepted password log entry, only for a small fraction of logins.

E.g. I observe a user logging in 2525 times on a day, but I can see the according debug2: MACs ctos: log entry (same PID, roughly same time) only for 155 of those logins.

This happens accross all user logins, so it is not user specific.

Is this a bug or a feature? Is there some handshake info cache, so full handshake is not done (or logged) on every login? How can I achieve that for every login the debug2 handshake log entry is made?

AWK one liner to merge three fields in a single file

Posted: 11 May 2022 10:17 AM PDT

I have a file with records (lines) having two types of field delimiters | and ! as given below:

Name|Age|Physics|Chemistry|Maths|English|Batch!Year!AdmisnNo!Grade!Score  Student1|81|65|70|80|88|EWS!2021!1001!A!75  Student2|72|63|60|50|75|EWS!2021!1002!A!85  Student3|72|63|60|50|75|EWS!2021!1002!A!85  

How to merge Batch, Year and AdmisnNo fields as given below?

Note, for brevity I have shown a small list of useful fields, where as my real files have many such related fields. This field where I want to remove two or three ! marks is not the last one and can be any field (6 or 7 ) from a total number of fields around 49.

Name|Age|Physics|Chemistry|Maths|English|BatchYearAdmisnNo!Grade!Score      Student1|81|65|70|80|88|EWS20211001!A!75      Student2|72|63|60|50|75|EWS20211002!A!85      Student3|72|63|60|50|75|EWS20211002!A!85  

I requested awk, however any reasonably standard command is welcome.

Linux user Creation in a group

Posted: 11 May 2022 09:19 AM PDT

What is the best way to create a user account (in my case Dev User) in a Group using bash scrip, with the followings :

1.adduser $1  2.usermod -a -G devs $1  3.mkdir /home/$1/.ssh  4.chmod 700 /home/$1/.ssh  5.touch /home/$1/.ssh/authorized_keys  6.chmod 600 /home/$1/.ssh/authorized_keys  7.mkdir /var/www/html/$1-dev.abc.com/  8.mkdir /var/log/httpd/$1-dev.abc.com/  9.chown $1.devs /var/www/html/$1-dev.abc.com/  10.chown $1.devs /var/log/httpd/$1-dev.abc.com/  

we have 10 developer accounts to create for. If any of the '$1' directories exist it would throw a notice to the executor.

I tried some solutions but none of them seemed to work. can anyone guide me on it !

#!/bin/bash    for user in $1 $2 $3 $4 $5  do      if useradd $user    then      password=`mkpasswd`      echo $password | passwd --stdin $user    fi    done    # Invocation ./myscript.sh dev1 dev2 dev3 ...  

Is this will work :

CREATE_USER_NAME="abc"    # Create account  echo "============= now create an account ============="  sudo useradd -s /usr/bin/fish -m $CREATE_USER_NAME  sudo usermod -aG sudo $CREATE_USER_NAME  sudo passwd $CREATE_USER_NAME    test_command() {    command -v "$1" 2&>1 >/dev/null ;  }  

Output I Received:

useradd: invalid user name '0'  mkdir: cannot create directory '/home//.ssh': File exists  chmod: changing permissions of '/home//.ssh': Operation not permitted  touch: cannot touch '/home//.ssh/authorized_keys': Permission denied  chmod: cannot access '/home//.ssh/authorized_keys': Permission denied  mkdir: cannot create directory '/var/www/html/-dev.abc.com/': File exists  mkdir: cannot create directory '/var/log/httpd/-dev.abc.com/': Permission denied  chown: changing group of '/var/www/html/-dev.abc.com/': Operation not permitted  chown: cannot access '/var/log/httpd/-dev.abc.com/': Permission denied  

what is the best advise here ?

Find files containing multiple words where the order of the words does not matter

Posted: 11 May 2022 09:14 AM PDT

I have a huge folder with a lot of subfolders where I would like to search for a folder that contains three words. Note that the folder name needs to have all three words, but the order of the words does not matter.

Example: I want to find folders containing the words APE, Banana and Tree.

find folder -name '*APE*Banana*Tree*'  

However, this command will consider the order of the words, while this is not of interest and I want to find any folder with those words in any order.

how to transfer files from Kali?

Posted: 11 May 2022 09:01 AM PDT

I am using Kali Linux on virtual machine and i want to transfer a file from it to my phone. maybe blue-tooth or USB anything but i don't know how to do that or maybe i have to move it to my host operation system (windows) first.

edit grub to have multi boot option to have more than 2 OS boot option

Posted: 11 May 2022 12:00 PM PDT

How do we edit grub in a UEFI HDD to have multi boot option having more than just one linux one Windows OS, readily being selected and run at PC startup

How to add a default route to a DHCP-enabled interface?

Posted: 11 May 2022 01:04 PM PDT

All my servers' networking is configured via DHCP which sends, among others, a static route (needed for a VPN) and a gateway. This works fine.

I have one exception: a server which should not get the static route (but get everything else, ideally the gateway as well).

In order to deny the provided route(s), I added to its network config

[DHCP]  UseRoutes=false  

This got rid of the static route (good) and also the default gateway (not good).

Ideally, I would like to receive the gateway from the DHCP server but I am OK to hardcode it in the configuration.

To this I tried several solutions, all of them failed (= the default route was not added)

  1. Add a Gateway= entry in the [Network] section:

[Match]  Name=br0    [Network]  DHCP=yes  Gateway=192.168.10.1    [DHCP]  UseRoutes=false  
  1. Add an extra route, with something which looks like a "default":

[Match]  Name=br0    [Network]  DHCP=yes    [DHCP]  UseRoutes=false    [Route]  Gateway=192.168.10.1  Destination=default  # or, alternatively  # Destination=0.0.0.0/0  

How can I add a default route to a DHCP configuration which denies the provided routes?

In other words, how to make systemd-networkd run something equivalent to ip r add default via 192.168.10.1?

Unzip to a folder with the same name as the file (without the .zip extension)

Posted: 11 May 2022 11:59 AM PDT

How to unzip a file (ex: foo.zip) to a folder with the same name (foo/)?

Basically, I want to create an alias of unzip that unzips files into a folder with the same name (instead of the current folder). That's how Mac's unzip utility works and I want to do the same in CLI.

Unable to install VirtualBox. `complaining that the kernel module is not loaded`

Posted: 11 May 2022 10:04 AM PDT

VirtualBox was working on my computer until a few of days ago when I modified GRUB while attempting to customize it's Theme. Something I did started causing GRUB to load to a blank dark purple screen. Unless I choose Advanced Options from the GRUB menu and selected 4.10.0-37-generic Kernel. In which case it would load normally.

Optionally I have 4.10.0-16-generic as an option as well. But selecting that boots to a blank screen.

I thought everything was fine, but discovered that I could no longer execute vagrant up, which automatically starts a VirtualBox instance I have on my machine. It complained with the error below:

The provider 'virtualbox' that was requested to back the machine default is reporting that it isn't usable on this system. The reason is shown below:    VirtualBox is complaining that the kernel module is not loaded. Please run VBoxManage --version or open the VirtualBox GUI to see the error message which should contain instructions on how to fix this error.  

Upon executing VBoxManage --version in Terminal I get:

 WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.10.0-37-generic) or it failed to load. Please recompile the kernel module and install it by     sudo /sbin/vboxconfig     You will not be able to start VMs until this problem is fixed. 5.1.30r1183891  

Upon executing sudo /sbin/vboxconfig I get:

 Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.   Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.   Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.   Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.   vboxdrv.sh: Stopping VirtualBox services.   vboxdrv.sh: Building VirtualBox kernel modules.   This system is not currently set up to build kernel modules (system extensions).     Running the following commands should set the system up correctly:     apt-get install linux-headers-4.10.0-37-generic   (The last command may fail if your system is not fully updated.)   apt-get install linux-headers-generic   vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.   This system is not currently set up to build kernel modules (system extensions).   There were problems setting up VirtualBox.  To re-start the set-up process, run /sbin/vboxconfig as root.  

So then I execute sudo apt-get install linux-headers-4.10.0-37-generic and I get:

Reading package lists... Done  Building dependency tree         Reading state information... Done  Package linux-headers-4.10.0-37-generic is not available, but is referred to by another package.  This may mean that the package is missing, has been obsoleted, or is only available from another source    E: Package 'linux-headers-4.10.0-37-generic' has no installation candidate  

So I searched Google for that package and basically nothing comes back. So re-reading the error above I thought that I should update. So I executed `` and I get this error, which believe to be the root of the previous error:

Hit:12 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu artful InRelease            Ign:13 http://download.virtualbox.org/virtualbox/debian artful InRelease   Hit:14 http://download.virtualbox.org/virtualbox/debian zesty InRelease  Err:15 http://download.virtualbox.org/virtualbox/debian artful Release  404  Not Found [IP: 23.215.104.186 80]  Reading package lists... Done  E: The repository 'http://download.virtualbox.org/virtualbox/debian artful Release' does not have a Release file.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.  

Then I executed sudo apt-get install virtualbox-ext-pack and below is the output, but what stood out to me was this Module build for kernel 4.10.0-37-generic was skipped since the kernel headers for this kernel does not seem to be installed.

https://gist.github.com/s3w47m88/0e02e95cdfc2adab89951682d9c6a897

I have two issues

  1. I need to overcome that initial error.
  2. I don't understand how the official VirtualBox server / URL is failing like that. It's what is specified in their official docs. I don't know where to go from here.

Not able to run Cisco Packet Tracer 7.0 even if installation is successful

Posted: 11 May 2022 11:05 AM PDT

I use Kali Linux and I am having a problem in running the Cisco Packet Tracer v7.0.

I have downloaded the PacketTracer70_64bit_linux.tar.gz file from www.netacad.com/group/offerings/packet-tracer/. And then I extracted the tar.gz file by writing the command

tar -zxvf PacketTracer70_64bit_linux.tar.gz  

Then I got into the folder PacketTracer70 which got created automatically after extraction.

The folder contents were as follows:

folder screenshot Then I ran the ./install command in the terminal and I got the following:

root@hacker:~/PacketTracer70# ./install    Welcome to Cisco Packet Tracer 7.0 Installation    Read the following End User License Agreement "EULA" carefully. You must  accept the terms of this EULA to install and use Cisco Packet Tracer.  Press the Enter key to read the EULA.......  

Then I accepted the terms and conditions as usual...

Then I was asked to install the package in opt/pt folder and I agreed as follows: installation successful message

then I got to the folder /opt/pt and tried

root@hacker:~# cd /opt/pt root@hacker:/opt/pt# packettracer  

But nothing happened after that. It just gave me the message "Starting Packet Tracer 7.0" and nothing happened.

root@hacker:~# cd /opt/pt  root@hacker:/opt/pt# packettracer  Starting Packet Tracer 7.0  root@hacker:/opt/pt#  

I am trying this second time and getting the same problem. How can I fix this problem?

No comments:

Post a Comment