LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackpkg upgrade-all: kernel panic (http://www.linuxquestions.org/questions/slackware-14/slackpkg-upgrade-all-kernel-panic-749003/)

adriv 08-20-2009 08:51 AM

Slackpkg upgrade-all: kernel panic
 
Hi,
I've upgraded SW with the latest security packages yesterday and now I get a kernel panic (installed the kernel sources too, otherwise couldn't reinstall the nvidia driver). I guess it has to do with the initrd.gz, right?
I'm using jfs on / (sda3) and /home (sda5).

So I thought I would have to create an initrd.gz, chrooted into /boot, but now what?
Code:

mkinitrd -c -k 2.6.27.31-smp -F
Is that correct?
And then change /etc/lilo.conf and add the line
Code:

initrd = /boot/initrd.gz
So that it looks like
Code:

image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/sda3
label = Slackware
read-only

and run lilo

Am I missing something?
Never done this before, so I wanna be sure. ;)

samac 08-20-2009 08:53 AM

Quote:

mkinitrd -c -k 2.6.27.31-smp -F
try -m jfs instead of -F, this worked for me.

samac

adriv 08-20-2009 08:58 AM

OK, thanks, will try that.
The stuff in /etc/lilo.conf is correct do you think?

bgeddy 08-20-2009 09:02 AM

I usually give parameters for the kernel modules to load, root filesystem, root partition and clear the existing file tree. So the command would be :
Quote:

mkinitrd -c -r /dev/sda2 -f ext3 -m mbcache,jbd,ext3
for my system. Alien Bob proides a useful command generator available here to help. This is included with current.

I also note that you have
Quote:

image = /boot/vmlinuz
- it's as well to keep the huge kernel in case anything goes astray and point /boot/vmlinuz there (the default). So you would have a lilo stanza for the huge and one for the generic kernel with the initrd added.

Bruce Hill 08-20-2009 09:03 AM

Alien Bob put a nice script (/usr/share/mkinitrd/mkinitrd_command_generator.sh)
in Slackware to help facilitate the making of an initrd image. While it doesn't
guarantee to remove all possible errors from the process, it does a good job.

Just issue "sh /usr/share/mkinitrd/mkinitrd_command_generator.sh" and the script
will output a suggested command. If it looks good to you, run that and then
afterwards, run "lilo" to write the new bootloader.

adriv 08-20-2009 10:29 AM

OK, thanks, I downloaded the script and put it on a USB stick, mounted it and ran the script. Followed the advice and then ran lilo. Rebooted and get this error:
Code:

no kernel modules found for Linux 2.6.27.31
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
mount: mounting /dev/sda3 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.

What is wrong?
The script adviced 2.6.27.7, shouldn't that be 2.6.27.31?
But I tried that too and it didn't work either.

adriv 08-20-2009 10:31 AM

Quote:

Originally Posted by bgeddy (Post 3650812)
I also note that you have - it's as well to keep the huge kernel in case anything goes astray and point /boot/vmlinuz there (the default). So you would have a lilo stanza for the huge and one for the generic kernel with the initrd added.

Can you elaborate on that?
You mean there has to be a new set of lines in lilo.conf, instead of using the old ones?

bgeddy 08-20-2009 11:05 AM

Quote:

Can you elaborate on that?
You mean there has to be a new set of lines in lilo.conf, instead of using the old ones?
Yes - so you have two stanzas in lilo.conf. One for the standard huge kernel and one for the new generic and initial ram disk. Like this from my setup:
Code:

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.21.5-smp
initrd=/boot/initrd.gz
root = /dev/sda6
label = Linux_RamDisk
read-only
#
image = /boot/vmlinuz-huge-smp-2.6.21.5-smp
root = /dev/sda6
label = Linux_Huge
read-only

This (amongst other stanzas) gives me an initial ram disk option and a huge kernel option at boot up. This way if there's a problem with my initrd.gz creation ,(as stupidly happens for me sometimes), then I can boot to the default huge kernel and investigate.
As to your problem now. Boot back to the system and make sure you're running kernel 2.6.27.31 with "uname -r". It looks like something has gone strangely wrong with your initrd creation. Did you supply the "-k" and "-m" parameters correctly to mkinitrd ?

Bruce Hill 08-20-2009 11:19 AM

You don't need to download the script, it's on your system:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
You can run it with the "-i" switch, which stands for interactive:
Code:

sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -i
so that you can tell it which kernel to select, and other things.

If you're not fixed up, perhaps post the output of "ls -l /boot/".

As for the "no kernel modules found for Linux 2.6.27.31" message,
it sounds as if the CD/DVD/USB whatever you installed with was not
using the latest kernel. Maybe you had a media that you made from
a local mirror or something before the last updates to -current?

adriv 08-20-2009 11:44 AM

Uname isn't going to help be because I boot from the SW DVD.
I'm pretty sure it was 2.6.27.7-smp.
But upgrading with these security patches, that should be 2.6.27.31, right?
I've booted Knoppix now (also got erors on /proc) and now I see that /proc is empty! That's not normal, is it.

Bruce Hill 08-20-2009 11:48 AM

Please post the output of "ls -l /boot/".

adriv 08-20-2009 12:03 PM

Quote:

Originally Posted by Bruce Hill (Post 3650989)
You don't need to download the script, it's on your system:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
You can run it with the "-i" switch, which stands for interactive:
Code:

sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -i
so that you can tell it which kernel to select, and other things.

If you're not fixed up, perhaps post the output of "ls -l /boot/".

As for the "no kernel modules found for Linux 2.6.27.31" message,
it sounds as if the CD/DVD/USB whatever you installed with was not
using the latest kernel. Maybe you had a media that you made from
a local mirror or something before the last updates to -current?

I'm not running current, but 12.2, so that script isn't available by deafult. But I copied it to /boot the first time.

I'l start over from scratch.
boot SW 12.2 DVD
mkdir /mnt/slack
fsck.jfs /dev/sda3 (filesystem is clean)
mount /dev/sda3 /mnt/slack
chroot /mnt/slack
cd /boot
ls -l (ehmmm, that's an awful lot to type, but i'll give it a try)
Code:

README.initrd -> /usr/doc/mkinitrd-?.3.3/README.initrd
System.map -> System.map-generic-2.6.7.31
System.map -> System.map-generic-2.6.7.31
System.map -> System.map-generic-smp-2.6.7.31
System.map-huge-2.6.27.31
System.map-huge-smp-2.6.27.31
boot.0800
boot_message.txt
config -> config-generic-2.6.27.31
config-generic-2.6.27.31
config-generic-smp-2.6.27.31
config-huge-2.6.27.31
config-huge-smp-2.6.27.31
diag1.img
initrd-tree
initrd.gz
map
mkinitrd_command_generator.sh
slack.bmp
vmlinuz -> vmlinuz-generic-2.6.27.31
vmlinuz-generic-2.6.27.31
vmlinuz-generic-smp-2.6.27.31
vmlinuz-huge-2.6.27.31
vmlinuz-huge-smp-2.6.27.31


bgeddy 08-20-2009 12:03 PM

Quote:

You don't need to download the script, it's on your system:
@Bruce Hill : -the script was only included in current - it's not in 12.2 that's why I gave the reference.
Quote:

Uname isn't going to help be because I boot from the SW DVD.
@adriv :that's why I said "Boot back to the system" meaning I thought possibly you were booting to the installed Slackware.

adriv 08-20-2009 12:09 PM

Quote:

Originally Posted by bgeddy (Post 3651047)
@adriv :that's why I said "Boot back to the system" meaning I thought possibly you were booting to the installed Slackware.

Wish I could... :)

adriv 08-20-2009 12:19 PM

To add a few things, I'm in /boot now as you could see and run the script:
sh mkinitrd_command_generator.sh

Code:

?ind: /sys/block: no such file or directory
cat: /proc/bus/input/devices: no such file or directory
cat: /proc/mdstat: no such file or directory

mkinitrd_command_generator.sh revision 1.40

This script will now etc, etc.

mkinitrd -c -k 2.6.27.7-smp -f jfs -r /dev/sda3 -o /boot/initrd.gz

Changing the 7 into 31 doesn't solve the problem.


All times are GMT -5. The time now is 02:01 AM.