LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel panic after slackware-current update (https://www.linuxquestions.org/questions/slackware-14/kernel-panic-after-slackware-current-update-4175675421/)

SlackQc 05-17-2020 12:04 PM

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.

SlackQc 05-17-2020 03:28 PM

1 Attachment(s)
I was finally able to boot on vmlinuz, and this is what I get

Attachment 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

Alien Bob 05-17-2020 03:45 PM

Quote:

Originally Posted by SlackQc (Post 6124275)
error bash, command not found.

Please tell us more about this error. When did it occur?

0XBF 05-17-2020 03:48 PM

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.

SlackQc 05-17-2020 03:50 PM

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.

quickbreakfast 05-17-2020 04:18 PM

Quote:

Originally Posted by SlackQc (Post 6124275)
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 .

SlackQc 05-17-2020 04:35 PM

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


SlackQc 05-17-2020 04:37 PM

Quote:

Originally Posted by quickbreakfast (Post 6124359)
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

SlackQc 05-17-2020 04:47 PM

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

SlackQc 05-17-2020 05:21 PM

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
/#


ReFracture 05-17-2020 08:33 PM

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.

Richard Cranium 05-18-2020 03:46 AM

Quote:

Originally Posted by quickbreakfast (Post 6124359)
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.

SlackQc 05-18-2020 06:04 AM

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.

0XBF 05-18-2020 08:35 AM

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.

SlackQc 05-18-2020 06:14 PM

@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


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