LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel panic after having been unable to execute any command (https://www.linuxquestions.org/questions/slackware-14/kernel-panic-after-having-been-unable-to-execute-any-command-4175647160/)

Petri Kaukasoina 02-02-2019 06:16 AM

Did you try to boot it? You have not upgraded the kernel so you don't need a new initrd. (It didn't work because you tried to make an initrd for the running kernel, not the kernel to be booted from the disk.)

Wario. 02-02-2019 06:24 AM

1 Attachment(s)
Yes, I tried...
...the good news is that there is no more kernel panic :)
...the bad is a possible library conflict (?) (please see the attached picture)

EDIT: it seems that I can login to my system (no X11). Some basic commands work...so I was thinking about updating everything again with the right mirror. But:

Code:

# iwconfig
# ifconfig
"Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
# dhclient wlan0
Cannot find device 'wlan0'

(yes, iwconfig produces an empty output)

chrisVV 02-02-2019 06:48 AM

Quote:

Originally Posted by Wario. (Post 5956530)
My apologies for having been imprecise. All the listed commands are now intended under the Slackware64 boot disk (14.2, default kernel).
The partition to restore is located in /dev/sda3. I use grub2 (no efi, classical bios) but to run lilo would be good anyway.

What appears to be your main problem has been identified by Petri Kaukasoina, but if you boot up with grub2 on a computer with legacy BIOS/MBR boot, then running lilo would not "be good anyway" unless you intend to switch to lilo instead of grub as the boot loader. You use one or the other. If you have installed grub2 pre-loader into the MBR (actually an area between the MBR and the first partition), which is the default with grub with legacy BIOS/MBR boot, don't overwrite it with lilo unless you have configured lilo.conf and want it to supercede grub.

Think about what you are doing.

Drakeo 02-02-2019 07:08 AM

Quote:

Originally Posted by Wario. (Post 5954661)
Dear Slackware community, I was trying learning more about the system...and the opportunity came by itself :)

Slackware 14.2 64 bit here, just properly configured (docs instructions - https://docs.slackware.com/slackware:beginners_guide).

Some minutes ago I run an upgrade: it ended and asked me for a #lilo update considering the new kernel image; I accepted but obtained "command not found". Quite strange...but then I remembered I have grub (oh:)...but again "command not found". I opened another terminal, but it was unable to be called.

At that point, the system was unable to launch any command.
I did the mistake of (hard) rebooting...and have now a kernel panic (attached picture).

Does someone have a piece of advice about how can I fix the system?
Thanks and cheers, Wario

Ps: meanwhile I am searching for this "kernel panic" situation on the web, but a point was to highlight out how the system broke after the most recent upgrade. 99% my fault but...never say never.

dear sir just press the "e" when grub comes up. edit your grub to just say vmlinuz
Code:

linux        /boot/vmlinuz root=UUID=f52adeea-a45c-4dc5-b599-aecadc1709b5 ro
Code:

linux        /boot/vmlinuz disregard this drive block ID -->>root=UUID=f52adeea-a45c-4dc5-b599-aecadc1709b5 ro  <<-- you will use your own.
kernel will boot.
if you isntall lilo at boot time and never edit it you should be fine. !!! but you have grub LIKE ME. edit the grub to vmlinuz only do not worry about intrd.img .
just do it. then after your done learn grub. then run as root grub-mkconfig -o /boot/grub/grub.cfg
reboot and be happy. learn grub or learn lilo learn both. I prefer grub for multi systems and lilo for single system

Petri Kaukasoina 02-02-2019 07:17 AM

You could try to upgrade it to the latest -current. Without working network, you could use your Microsoft OS to download and burn http://bear.alienbase.nl/mirrors/sla...nstall-dvd.iso.

Then you could point slackpkg to the files on the DVD. See examples in the beginning of /etc/slackpkg/mirrors.

Petri Kaukasoina 02-02-2019 07:29 AM

The OP didn't install a new kernel and didn't really run either lilo or grub (tried but they didn't execute) and didn't make a new initrd either. And the system boots as well as ever before using the old kernel. The problem was that kernel could not exec init because /sbin/init was linked against a glibc which was not there.

The remaining problem now is probably due to the fact that the latest -current glibc.so is newer than the previous working glibc, and some executable binaries and/or libraries have problems with that. Upgrading to the latest current should help, but everyone knows that current is work with your own risk...

Wario. 02-02-2019 07:33 AM

@Petri, great! I am downloading the currentDVD right now.

Dealing with the grub / lilo issue, it's just that in the past I have never had any kind of problem in switching between them.
I have lilo now, but since the system booted correctly I think we can move to the next step (as suggested).

I will keep you update, thanks for the support.

EDIT:
Meanwhile, could I ask for a small clarification, please?
By installing the official 14.2, one must choose the 14.2 repository.
Otherwise, the right choice is (generally) the -current fork, like in the MateLIVE edition.
Did I understand correctly? :)

Petri Kaukasoina 02-02-2019 08:15 AM

Quote:

Originally Posted by Wario. (Post 5956806)
By installing the official 14.2, one must choose the 14.2 repository.
Otherwise, the right choice is (generally) the -current fork, like in the MateLIVE edition.
Did I understand correctly? :)

I didn't know what MateLIVE is, but Alien Bob seems to explain it like this (Slackware Live Edition, that is):

"It is a version of Slackware (14.2 and newer) that can be booted and run directly from a DVD or a USB stick. It is distributed as an ISO image and meant to be a showcase of what Slackware is about. You get the default install, no customizations, but with all the power. You do not have to install Slackware to your harddisk first to experience it first-hand."

I would understand it as a demo of what Slackware is so that you could install the real thing later on the hard drive. If that is correct, I wouldn't try to update MateLIVE using any repository as there is no MateLIVE repository. Instead, I would install the real Slackware to start with.

Maybe Eric will give a better answer, himself.

bassmadrigal 02-02-2019 11:21 AM

Quote:

Originally Posted by Wario. (Post 5956806)
Meanwhile, could I ask for a small clarification, please?
By installing the official 14.2, one must choose the 14.2 repository.
Otherwise, the right choice is (generally) the -current fork, like in the MateLIVE edition.
Did I understand correctly? :)

To generalize, 14.2 is the latest stable release. If you point slackpkg to the 14.2 mirror/repository, it will be able to get all the patches Pat has put out for 14.2. -current is the development version of Slackware that will eventually become the next stable release (which will be 15.0 in this case). There have been over 2 years worth of updates to core packages in -current, which will make most, if not all, of the packages from -current not function on 14.2, which is what broke your system. While -current tends to be relatively stable, it does occasionally have problems, and will likely cause you problems with 3rd-party packages as any dependencies they are built against could be upgraded to a newer version that no longer works without the main program being recompiled against the new dependency.

Wheelerof4te 02-02-2019 02:19 PM

Quote:

Originally Posted by enorbet (Post 5954919)
...and this is exactly why automated system updates are risky business. IMHO It's just easier to do them manually.

How would you exactly upgrade the entire system manually? By looking through every security advisory Pat has published until now?
Good luck with that?
By the way, I'm not using Slack, but I would like to get your explanation anyway, since I'm interested in it.

Richard Cranium 02-02-2019 11:15 PM

Quote:

Originally Posted by Wheelerof4te (Post 5956905)
How would you exactly upgrade the entire system manually? By looking through every security advisory Pat has published until now?
Good luck with that?
By the way, I'm not using Slack, but I would like to get your explanation anyway, since I'm interested in it.

*Shrugs* If and only if you are running a pure Slackware system with absolutely no external packages, then the automated systems should work fine. (Unless you've managed to fill a partition/logical volume to 100% that the automated system needs to write into. Oops.)

Otherwise, the only one that you know who has a system exactly like yours is yourself. Some things you'll catch from the upgrade comments, some you won't. The automated tools in Slackware generally won't leave the old kernel around unless you take steps for that to happen.

Most of the time, you can get away with it.

kjhambrick 02-03-2019 03:30 AM

Quote:

Originally Posted by Wheelerof4te (Post 5956905)
How would you exactly upgrade the entire system manually? By looking through every security advisory Pat has published until now?
Good luck with that?
By the way, I'm not using Slack, but I would like to get your explanation anyway, since I'm interested in it.

Wheelerof4te --

I don't use a package manager but I do keep my local mirror up-to-date via Alien Bob's rsync-current.sh

I wrote the script below my sig back when I ran Slackware 10.0, before I knew about any Package Managers for Slackware.

It is set up for MY local Slackware rsync mirror ( see # edit me Comments near the top of .find-missing-packages ) for MY Slackware 14.2 + Multilib System.

Example: Today's output for `./.find-missing-packages` is:
Code:

ap/soma-2.10.4-noarch-1.txz
kde/oxygen-gtk2-1.4.6-x86_64-2.txz
n/sendmail-cf-8.15.2-noarch-2.txz
n/sendmail-8.15.2-x86_64-2.txz
patches/packages/linux-4.4.172/kernel-source-4.4.172-noarch-1.txz
patches/packages/linux-4.4.172/kernel-headers-4.4.172-x86-1.txz
patches/packages/linux-4.4.172/kernel-huge-4.4.172-x86_64-1.txz
patches/packages/linux-4.4.172/kernel-generic-4.4.172-x86_64-1.txz
patches/packages/linux-4.4.172/kernel-modules-4.4.172-x86_64-1.txz
patches/packages/linux-4.4.172/kernel-firmware-20190118_a8b75ca-noarch-1.txz

I can't upgrade my kernel until I find a fix for VMWare Workstation 12.1 on 4.4.168+ ...

As for the other 'missing packages' ...

I know why each of these packages are not installed and I suppose I could modify .find-missing-packages with a blacklist

But it is 'comforting' to see the familiar list ( soma, oxygen-gtk2, sendmail-* ) which tells me that the script is working properly.

And my Blacklist is 'downstream' in my complementary update -and-or- install scripts.

Anyhow, this has been working for me since Slackware 10.0 ... YMMV ...

-- kjh

This is .find-missing-packages

It 'lives' in my update-log directory and it begins with a '.' so that I can safely `rm *` or `mv *` and not lose my scripts.

Code:

#!/bin/sh

PrgNam="`basename $0`"
DirNam="`dirname  $0`"

if ! which whichone >/dev/null 2>&1
then
  alias whichone="/usr/bin/which"
fi

if [ "$DirNam" = "." ]
then
  if [ -f "$PrgNam" ]
  then
      DirNam="`pwd`"
  else
      DirNam="`whichone $PrgNam`"
      DirNam="`dirname $DirNam`"
  fi
elif [ "$DirNam" = ".." ]
then
  DirNam="`pwd`"
  DirNam="`dirname $DirNam`"
elif [ "`dirname $DirNam`" = ".." ]
then
  FooNam="`basename $DirNam`"
  DirNam="`pwd -P`"
  DirNam="`dirname $DirNam`/$FooNam"
elif [ "$DirNam" = "" ]              # should not happen ...
then                                  # see: man 3 dirname
  DirNam="`whichone $PrgNam`"
  DirNam="`dirname $DirNam`"
fi

AllArg="$@"
CwdDir="`pwd -P`"

DoAlien=1                      # edit me - 1->have multilib else not
TopDir="/home/dld/slackware"  # edit me - where is your local rsync mirror
Version="14.2"                # edit me - what is your version
RunArch="64"                  # edit me - what is your arch
ArchTag="$RunArch"

Exclude="kdei/"
ArchTag="-x86_64"

SlackDir=""
PatchDir=""
FullPath=0
Verbose=0
PatchList=""
IsCurrent=1

SkipKernel=1
KernelList=""
KernelList="$KernelList kernel-huge"
KernelList="$KernelList kernel-generic"
KernelList="$KernelList kernel-modules"
KernelList="$KernelList kernel-source"
KernelList="$KernelList "              # note trailing space !

export TopDir DirLst Version RunArch Arch ArchTag Exclude SlackDir PatchList KernelList

WacExt ()
{
  echo "$@" |
  gawk '
  {
      if (( L = length( $0 )) < 1 )
      {
        print ""
        exit 0
      }
      for ( i = L ; i > 0 ; i -- )
      {
        if (( substr( $0, i,  1 ) == "." ) \
        &&  ( substr( $0, i-1, 1 ) != "/" ))
        {
            print substr( $0, 1, i-1 )
            exit 0
        }
      }
      print $0
      exit 0
  }'
  return $?
}
GetExt ()
{
  GetExtCase=""

  while [ "$1" = "-l" \
        -o "$1" = "-L" \
        -o "$1" = "-u" \
        -o "$1" = "-U" ]
  do
      if [ "$1" = "-l" -o "$1" = "-L" ]
      then
        GetExtCase="l"
        shift
      elif [ "$1" = "-u" -o "$1" = "-U" ]
      then
        GetExtCase="u"
        shift
      fi
  done

  echo "$@" |
  gawk '
  BEGIN {

      Case = "'"$GetExtCase"'" ""

  }
  function FixCase( DoCase, InStr )
  {
      if ( DoCase == "l" )
      {
        return( tolower( InStr ))
      }
      if ( DoCase == "u" )
      {
        return( toupper( InStr ))
      }
      return( InStr )
  }
  # main
  {
      if (( L = length( $0 )) < 1 )
      {
        print ""
        exit 0
      }
      for ( i = L ; i > 0 ; i -- )
      {
        if (( substr( $0, i,  1 ) == "." ) \
        &&  ( substr( $0, i-1, 1 ) != "/" ))
        {
            print FixCase( Case, substr( $0, i ))
            exit 0
        }
      }
      print ""
      exit 0
  }'
  return $?
}
MakeArchTag ()
{
  if [ $# -gt 0 ]
  then
      [ "$1" = "64" ] && echo "64" || echo ""
  else
      echo "$RunArch"
  fi
}
GetSlackRoot ()
{
  echo "$TopDir/slackware-$Version-$Arch"
}
GetSlackDir ()
{
  [ $# -gt 0 ] && myArch="$1" || $myArch="$RunArch"
 
  myArchTag="$(MakeArchTag "$myArch")"

  echo "$TopDir/slackware-$Version-$Arch/slackware${myArchTag}"
}
GetPatchDir ()
{
  [ $# -gt 0 ] && myArch="$1" || $myArch="$RunArch"
 
  myArchTag="$(MakeArchTag "$myArch")"

  echo "$TopDir/slackware-$Version-$Arch/patches"
}
MakeAlienFileName ()
{
  local File

  [ $# -lt 1 ] && echo "" && return 1

  for File in $@
  do
      echo "$File" |sed -e"s/_slack${Version}//" -e"s/${ArchTag}/_multilib${ArchTag}/" -e "s/$/alien/"
  done

  return 0
}
GetPkgName ()
{
  [ $# -lt 1 ] && echo "" && return 1

  basename "$1" |
  gawk '
  BEGIN{

      N = 0
      P = ""
  }
  {
      for ( i = length( $0 ) ; i > 0 ; i -- )
      {
        if ( substr( $0, i, 1 ) == "-" )
        {
            if (( ++N ) == 3 )
            {
              P = substr( $0, 1, i-1 )
              exit
            }
        }
      }
  }
  END {
 
      print P
      exit(( P != "" ) ? 0 : 1 )
  }'
  return $?
}
Usage ()
{
  ErrNum=$1
  shift

  [ $# -gt 0 ] && echo -e "\n$*" >&2

  echo -e "\nusage:  $PrgNam [ -foo ] " >&2
  cat  <<Usage_EOF >&2

        boo
        hoo
        hoo ...
 
Usage_EOF
 
  exit $ErrNum

}
while  getopts mvPha:d: junk 2>/dev/null
do
  case $junk in
      a)    RunArch="$OPTARG"
            ;;
      d)    SlackDir="$OPTARG"
            ;;
      m)    [ "$DoAlien" = "0" ] && DoAlien=1 || DoAlien=0
            ;;
      v)    Verbose=1
            ;;
      P)    FullPath=1
            ;;
      h)    Usage 0
            ;;
      *)    Usage 1
            ;;
  esac
done

shift `expr $OPTIND - 1`

RetCode=0
NumMiss=0
Arch="$RunArch"

if [ "$SlackDir" = "" ]
then
  SlackRoot="$(GetSlackRoot)"
  SlackDir="$(GetSlackDir  "$RunArch")"
fi

if [ "$Version" != "current" ]
then
  PatchDir="$(GetPatchDir "$RunArch")"
  PatchList="$PatchDir/FILE_LIST"
  IsCurrent=0
else
  IsCurrent=1
fi

[ ! -d "$SlackDir" ] && echo "No such Directory as '$SlackDir'" >&2 && exit 1

cd $SlackDir ; RetCode=$?
[ "$RetCode" != "0" ] && echo "cannot cd '$SlackDir'"          >&2 && exit 2

[ "$Verbose" != "0" ] && echo "# checking against $SlackDir"    >&2
#
# these are the original packages released on the Slackware DVD
#
for Pkg in $(find [a-z]* -type f -iname "*t?z" |grep -v "$Exclude")
do
  Base="`basename $Pkg`"
  Wacd="`WacExt $Base`"
  What="/var/log/packages/$Wacd"
  #
  # we've got to have a kernel, don't we <G> ?
  #

  if [ "$SkipKernel" = "1" ]
  then

      KPkg="$(GetPkgName $Base)"

      echo "$KPkg" |grep -q "^kernel-"

      [ $? -eq 0 ] && continue
  fi
  #
  # these Packages are installed and are up-to-date
  #
  [ -f "$What" ] && continue

  if [ "$DoAlien" = "1" ]
  then
 
      # multilib packages need a name modification:
      #
      # from: /var/log/packages/gcc-gfortran-5.3.0-x86_64-3
      # to .: /var/log/packages/gcc-gfortran-5.3.0_multilib-x86_64-3alien
 
      Alien="$(MakeAlienFileName "$What")"
 
      [ -f "$Alien" ] && continue

  fi
  #
  # if Verbose=1 then check for an Version issue
  #
  Mess=""

  if [ "$Version" != "current" ]
  then

    Name="$(GetPkgName "$Base")"
  # REx=" ./packages/$Name-.*t.z"
    REx=" ./packages/$Name\\-.*\-.*\-.*.t.z$"

    IsPatched=1  # reverse sense
    grep -q -- "$REx" "$PatchList" ; IsPatched=$?

    if [ "$IsPatched" = "0" ]      # IsPatched == true
    then
        Foo="$(ver "${Name}-" |gawk '{ print $NF }')"

      # [ "$Verbose" = "1" ] && echo "# update:  `basename $Foo`"

        if [ "$Verbose" = "1" ]
        then
            D=""
            L=""

            for Bar in $Foo
            do
                L="$L$D`basename $Bar`"
                D=" -> "
            done

            echo "# update:  $L"
        fi
        continue
    fi
  elif [ "$Verbose" = "1" ]
  then
      Name="$(GetPkgName "$Wacd")"

      Foo="$(ver "${Name}-" |gawk '{ print $NF }')"

      [ "$Foo" != "" ] && Mess="  # installed:  $Foo"
  fi

  [ "$FullPath" = "1" ] && echo "$SlackDir/$Pkg$Mess" || echo "$Pkg$Mess"

  NumMiss=$(expr $NumMiss + 1)

done
#
# current is all done ... no patches to process in current
#
if [ "$IsCurrent" = 1 ]
then
  [ "$NumMiss" = "0" ] && exit 0 || exit 3
fi
#
# otherwise do the patches for non-current
#
cd $SlackRoot ; RetCode=$?

[ "$RetCode" != "0" ] && echo "cannot cd '$SlackRoot'"        >&2 && exit 2

[ "$Verbose" != "0" ] && echo "# checking against $SlackRoot" >&2

HeadOut=0

for Pkg in $(find patches/packages -type f -iname "*t?z" |grep -v "$Exclude")
do
  Base="`basename $Pkg`"
  Wacd="`WacExt $Base`"
  What="/var/log/packages/$Wacd"
  #
  # these Packages are installed and are up-to-date
  #
  [ -f "$What" ] && continue

  if [ "$DoAlien" = "1" ]
  then
 
      # multilib packages need a name modification:
      #
      # from: /var/log/packages/glibc-2.23-x86_64-4_slack14.2
      # to .: /var/log/packages/glibc-2.23_multilib-x86_64-4alien
 
      Alien="$(MakeAlienFileName "$What")"
 
      [ -f "$Alien" ] && continue
  fi
  #
  # if Verbose=1 then check for an Version issue
  #
  Mess=""

  if [ "$Verbose" = "1" ]
  then
      Name="$(GetPkgName "$Wacd")"

      Foo="$(ver "${Name}-" |gawk '{ print $NF }')"

      [ "$Foo" != "" ] && Mess="  # installed:  $Foo"
  fi

  [ "$FullPath" = "1" ] && echo "$SlackRoot/$Pkg$Mess" || echo "$Pkg$Mess"

  NumMiss=$(expr $NumMiss + 1)

done

[ "$NumMiss" = "0" ] && exit 0

exit 3


Wario. 02-03-2019 04:30 AM

2 Attachment(s)
First of all, thanks for all the various information. I am reading them step by step, but currently still facing a local problem.

I downloaded the current slackware iso, extracted and copied the content into '/mnt/current'.
So, '/mnt/current' contains now the folders like "extra", "isolinux", etc..., (and, in particular, ChangeLog.txt).

I edited '/etc/slackpkg/mirror' in order to have only one line uncommented, specifically:
Code:

file://mnt/current/
But when I start the system upgrade with:
Code:

slackpkg update
I obtain a cascade of errors as in the attached picture. Could I ask, where did I make the mistake, please? :)

I do not understand why it is still trying to connect to an online mirror, while the only line that I specified referred to my local folder.

kjhambrick 02-03-2019 04:56 AM

Wario --

The errors in your screenshot seem to refer to slackpkgplus ...

Did you check the slackpkgplus README ?

Specifically, did you configure /etc/slackpkg/slackpkgplus.conf for your system ?

Disclaimer: I don't use slackpkg or slackpkgplus ... so HTH ...

-- kjh

Wario. 02-03-2019 05:19 AM

1 Attachment(s)
Thanks so much for the README link!
I was unaware about "slackpkgplus" - here enabled by default since I installed the slackwareMATE edition.
After having temporarily disabled it, the system upgrade from local directories is starting...

At this moment I have to decide how to manage some packages conflict...but I think it would be wiser to share this step with you.
Please, see again the attached picture :)

What exactly does this message mean, and which action do you suggest to perform?
Thanks again for your precious support.


All times are GMT -5. The time now is 04:42 AM.