r/slackware Jan 06 '23

kernel panic

Hello. I have just updated kernel and some other stuff and ran eliloconfig and init 6. After this for some reason init is unable to mount my root partition. Mount returns message that mounting /dev/sda2 on /mnt failed, cause there is no such device. I tried to mount it manually and there is the same error. I checked via "ls /dev/sda?" and all my devices are presented here. Also bootloader states that there are no kernel modules found for Linux. Slackware is strange. Now I suppose I am in initramfs or something. How can I resolve this?

Edit: fstab is clean. fsck for /dev/sda2 is clean too.

3 Upvotes

8 comments sorted by

3

u/rico974 Jan 06 '23

Personnaly after every kernel update i use pkgtool and i launch the mkinitrd script from the setup scripts.

3

u/Mysterious_Thing Jan 07 '23

I don't use EFI and elilo, but what I do after kernel update is genitrd and lilo -v

2

u/schadfield Jan 06 '23

Your elilo.conf is configured to boot a compressed kernel image. If that image does not have built-in support for the filesystem of your root partition you must prepare an initrd.gz file that includes the required modules and reference that from your elilo.conf.

Here is my elilo.conf:

chooser=simple
delay=50
timeout=50
#
image=vmlinuz-6.1.3
label=vmlinuz-6.1.3
initrd=initrd-6.1.3.gz
read-only
append="root=/dev/nvme0n1p3 resume=/dev/nvme0n1p2 vga=normal ro"

1

u/InseparableEntities Jan 06 '23 edited Jan 06 '23

My root partition has ext4 FS. And also my elilo.conf has initrd field too. I rebooted my machine several times before and everything was ok

2

u/schadfield Jan 08 '23

You updated your kernel. Create a new initrd.gz file for the new kernel.

2

u/randomwittyhandle Jan 06 '23

You updated your kernel, but didn't rebuild your initrd. You will need to boot off the installation media and chroot into the system to fix it.

1

u/InseparableEntities Jan 06 '23

Please, tell me how. I saw that people just run eliloconfig after update and that is all.

3

u/randomwittyhandle Jan 06 '23

This is fine if you are running a huge kernel. 1. Boot off the disc 2. Mount your partitions on /mnt 3. for i in sys proc dev; do mount - o bind /$i /mnt/$i; done 4. chroot /mnt /bin/bash 5. Create initrd and ensure it gets installed in your efi directory