LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-17-2020, 12:04 PM   #1
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Rep: Reputation: Disabled
Kernel panic after slackware-current update


Hello everyone, it's still me with a problem with my kernel!

This morning I did the last upgrade, including the upgrade from 5.4.40 to 5.4.41 kernel.

The last 2 upgrades were carried out without problems, after upgrading normally I did:

Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
for my initrd.gz file. But strangely, it didn't work, error bash, command not found.

I created a bootable usb key with the latest Slackware64-current version, I found documentation: https://docs.slackware.com/howtos:sl...uefi_and_elilo

but I am not sure that this is necessary, because when I mount my SSD to access my partition which allows me to boot, I see that my initrd.gz file is not up to date while vmlinuz * them the are (5.4.41). (To understand what I mean with regard to the initrd.gz file, it is that the last modification date is May 12th, while vmlinuz * have been modified today)

In my opinion, the problem comes from initrd.gz, but I can't see how I can fix it.

Last edited by SlackQc; 05-17-2020 at 12:07 PM.
 
Old 05-17-2020, 03:28 PM   #2
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
I was finally able to boot on vmlinuz, and this is what I get

Click image for larger version

Name:	98056525_300145214337243_2066286178872590336_n.jpg
Views:	54
Size:	226.5 KB
ID:	33225

Honestly, I don't know what to do, I have another pc with Slackware 14.2 since November 2019, I never had a problem, or I was always able to solve them
 
Old 05-17-2020, 03:45 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,992

Rep: Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701Reputation: 6701
Quote:
Originally Posted by SlackQc View Post
error bash, command not found.
Please tell us more about this error. When did it occur?
 
Old 05-17-2020, 03:48 PM   #4
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 167

Rep: Reputation: 122Reputation: 122
You will need to chroot into the system and re-run the mkinitrd generator and then lilo, or eliloconfig, or grub-mkconfig, depending on how you've set up booting.

Here's a recent post going over the basic chroot setup if you haven't done that before: https://www.linuxquestions.org/quest...ml#post6108585
Theres also a few pages at docs.slackware.com that go over chrooting into the system.

Also I generally run the mkinitrd generator as:
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 5.4.41 | bash
Hasn't given me a problem yet.
 
Old 05-17-2020, 03:50 PM   #5
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thank you Alien Bob
The error occurred after the upgrade, normally when I type commands, I use the tab key for automatic completion, but it did not work so I entered the command by myself and I received this error.
 
Old 05-17-2020, 04:18 PM   #6
quickbreakfast
Member
 
Registered: Oct 2015
Posts: 78

Rep: Reputation: Disabled
Quote:
Originally Posted by SlackQc View Post
The last 2 upgrades were carried out without problems, after upgrading normally I did:

Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
for my initrd.gz file. But strangely, it didn't work, error bash, command not found.
I'm only new to Slackware, but it seems that the brackets, which surround the code should not be there. Nor should the -r at the end of your line of code

The command should, according to the beginners guide be run as root. Not as your code quote indicates as a normal user.

http://docs.slackware.com/slackware:beginners_guide

Quote:
In my opinion, the problem comes from initrd.gz, but I can't see how I can fix it.
Once you get the above code corrected so it runs, the resultant code needs to be run as root to create a "new" intrd.gz, which is then added to lilo .
 
Old 05-17-2020, 04:35 PM   #7
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thank you 0XBF

I managed to execute the commands, I mounted my partitions and I chroot /mnt, strangely eliloconfig does not work,
Code:
mount: failed to read mtab: No such file or directory
ERROR: System is not running under UEFI
However, my laptop boot in EFI.
mkinitrd_command_generator.sh works, I tried to restart it shutdown -r -t sec 1, but I get an error, I also tried /etc/rc.d/rc.6 but I get the same error, but I'm not allowed to enter other commands afterwards

Code:
WARNING: could not determine runlevel - doing soft reboot
  (it's better to use shutdown insteed of reboot from the command line)
shutdown: /dev/initctl: No such file or directory
init: /dev/initctl: No such file or directory
 
Old 05-17-2020, 04:37 PM   #8
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by quickbreakfast View Post
I'm only new to Slackware, but it seems that the brackets, which surround the code should not be there. Nor should the -r at the end of your line of code

The command should, according to the beginners guide be run as root. Not as your code quote indicates as a normal user.

http://docs.slackware.com/slackware:beginners_guide



Once you get the above code corrected so it runs, the resultant code needs to be run as root to create a "new" intrd.gz, which is then added to lilo .
You can find this command in the Slackware docs, it's much faster

https://docs.slackware.com/howtos:sl...ge_for_generic
 
Old 05-17-2020, 04:47 PM   #9
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
Sorry, I forgot to type exit before reboot, now I always have the same screen when I boot except that I have no error concerning the kernel
 
Old 05-17-2020, 05:21 PM   #10
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
I modified elilo.conf, I deleted root = / dev / initramfs and I added a line root = / dev / nvme0n1p3 because my root partition is this and I had already configured my file like this before that I have this problem, but I have the same error message, it is only the partition which changes

Code:
mount: mounting /dev/nvme0n1p3 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
       You can try to fix it. Type 'exit' when things are done

/bin/sh: can't acces tty; job control turned off
/#
 
Old 05-17-2020, 08:33 PM   #11
ReFracture
Member
 
Registered: Oct 2007
Location: Utah
Distribution: Slackware-current
Posts: 94

Rep: Reputation: 131Reputation: 131
I'm not saying this is best practice or anything, but when there's a kernel update all I do is copy the vmlinuz-huge-5.x.x from /boot to /boot/efi/EFI/Slackware/ named as just vmlinuz.

My elilo.conf
Code:
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
        label=vmlinuz
#       initrd=initrd.gz
        read-only
        append="root=/dev/sda1 vga=normal ro"
I commented out the initrd since I'm using kernel-huge.

Is this best practice? I really doubt it. Running liloconfig on an MBR system after kernel upgrade works. Running eliloconfig on an EFI system after kernel upgrade does not. It results in exactly the error you're showing right now. I've also never had success using mkinitrd with kernel-generic so I decided to just shelf it in favor of huge.. hasn't give me any issues yet.

I've found so many conflicting answers on how to properly update the kernel in slackware on an EFI system that I've just settled on what I know works.

Last edited by ReFracture; 05-17-2020 at 08:35 PM.
 
Old 05-18-2020, 03:46 AM   #12
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,665

Rep: Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009
Quote:
Originally Posted by quickbreakfast View Post
I'm only new to Slackware, but it seems that the brackets, which surround the code should not be there. Nor should the -r at the end of your line of code
In bash, the $( something ) construct means to run the output of something as a command. The -r option to the mkinitrd_command_generator.sh command means to output something that can be executed.

As an example, I run the following shell script named mkinit.sh after an upgrade (I use grub versus lilo/elilo)...

Code:
#!/bin/bash
# expects that mkinitrd.conf is set to build firmware as well
kv=$(readlink /boot/vmlinuz-generic | cut -d- -f3-)
~/bin/make-amd-ucode-cpio.sh
# make sure any RAID arrays are defined prior to creating initrd 
/sbin/mdadm -E -s > /etc/mdadm.conf
$( /usr/share/mkinitrd/mkinitrd_command_generator.sh -k ${kv} -a "-F -o /boot/initrd-${kv}.gz" -r )
~/bin/mkgrub.sh
make-amd-ucode-cpio.sh contains...

Code:
#! /bin/sh
set -x
set -e

LIB=/lib/firmware/amd-ucode/
TDIR=kernel/x86/microcode
CPIO=/boot/amd-ucode.cpio

echo "Create the $CPIO file from the $LIB directory of files"
rm -rf   /tmp/amd-ucode-cpio
mkdir -p /tmp/amd-ucode-cpio
cd       /tmp/amd-ucode-cpio
mkdir -p  $TDIR
find $LIB -type f -name \*bin | sort | xargs cat > $TDIR/AuthenticAMD.bin
find . | cpio --no-absolute-filenames -H newc -o -F $CPIO

exit
and mkgrub.sh contains...
Code:
#!/bin/bash
/usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg
All of my commands above belong to root and are run as that user.

Quote:
The command should, according to the beginners guide be run as root. Not as your code quote indicates as a normal user.
The OP's quote gave no indication of the shell prompt.

I honestly do thank you for trying to help a fellow Slackware user. Please don't give up trying to help others, despite my negative comments.

Last edited by Richard Cranium; 05-18-2020 at 03:48 AM. Reason: Initial version wasn't correct.
 
1 members found this post helpful.
Old 05-18-2020, 06:04 AM   #13
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hi ReFracture

Is that I did, it allowed me to boot but I still have the problem as mentioned in my other post. On my other laptop, I am still using my generic kernel and have never had a problem with this.
 
Old 05-18-2020, 08:35 AM   #14
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 167

Rep: Reputation: 122Reputation: 122
However you run that script (although it will only let you if you are root) there should be an output something like follows:
Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/xhci-pci.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/ohci-hcd.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/ohci-pci.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/ehci-pci.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/uhci-hcd.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/usbhid/usbhid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/i2c/i2c-core.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/i2c-hid/i2c-hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-generic.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hwmon/hwmon.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/acpi/video.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/platform/x86/wmi.ko added.
OK: /lib/modules/5.4.41/kernel/net/rfkill/rfkill.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/input/sparse-keymap.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/acpi/battery.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/platform/x86/asus-wmi.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-asus.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-cherry.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-logitech.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/usbhid/usbhid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-logitech-dj.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-logitech-hidpp.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-lenovo.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-microsoft.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.4.41/kernel/drivers/hid/hid-multitouch.ko added.
OK: /lib/modules/5.4.41/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/5.4.41/kernel/fs/mbcache.ko added.
OK: /lib/modules/5.4.41/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/5.4.41/kernel/fs/mbcache.ko added.
OK: /lib/modules/5.4.41/kernel/fs/ext4/ext4.ko added.
70966 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
Note that if you run ...
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -options | bash
... as a regular user it will tell you you need to be root to run it.
If you run ...
Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -options )
... as a regular user then you will miss the "must be root error" which ends up inside the $( ... ) and leads to an error message "command not found".

And yes, just fix the system in chroot and then exit the chroot to get back to the console.

Quote:
I deleted root = / dev / initramfs and I added a line root = / dev / nvme0n1p3
Please make sure that /dev/nvme0n1p3 is the partition with the install on it, and put a line with the location of initrd.gz in your boot entry as well. You can use ReFracture's entry as an example (although he isn't using an initrd), or here's one from a machine I have running with EFI:
Code:
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
        label=vmlinuz
        initrd=initrd.gz
        read-only
        append="root=/dev/sda2 vga=normal ro"
Hopefully you get this sorted.

Last edited by 0XBF; 05-18-2020 at 08:53 AM. Reason: Removed rescue shell line, since the module for the rootfs is probably not loaded
 
Old 05-18-2020, 06:14 PM   #15
SlackQc
Member
 
Registered: Mar 2020
Location: Quebec
Distribution: Slackware
Posts: 31

Original Poster
Rep: Reputation: Disabled
@0XBF
My file is identical, only the root path is different and nvme0n1p3 is my root partition. I configured my elilo.conf file in 2 ways, the first, only by changing the path for root, and the second by indicating the path for vmlinuz as well as initrd.gz.

However, before the problem started, my generic kernel was well configured because I was booting on it.

I'm continuing the research, I don't want to reinstall from scratch again, I would update my thread
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware 14.2 glibc-2.23 vs Slackware Current glibc-2.24 and the Current 4.4.17 Kernel kjhambrick Slackware 10 08-13-2016 01:00 AM
[SOLVED] Kernel Panic after Kernel update - what am I doing wrong? Equinn Linux - Newbie 3 05-10-2011 03:10 PM
kernel panic after update to -current Intel_ Slackware 14 05-02-2010 11:32 PM
Kernel panic after upgrading slackware64-current to 2.6.32.x kernel Lenard Spencer Slackware 4 01-22-2010 10:54 AM
Kernel Panic after trying to update Kernel to 2.6 several times LearningToLive Slackware 10 01-19-2006 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration