LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 08-20-2009, 08:51 AM   #1
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Rep: Reputation: 38
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.
 
Old 08-20-2009, 08:53 AM   #2
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Rep: Reputation: 137Reputation: 137
Quote:
mkinitrd -c -k 2.6.27.31-smp -F
try -m jfs instead of -F, this worked for me.

samac
 
Old 08-20-2009, 08:58 AM   #3
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Original Poster
Rep: Reputation: 38
OK, thanks, will try that.
The stuff in /etc/lilo.conf is correct do you think?
 
Old 08-20-2009, 09:02 AM   #4
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
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.

Last edited by bgeddy; 08-20-2009 at 09:11 AM.
 
Old 08-20-2009, 09:03 AM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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.
 
Old 08-20-2009, 10:29 AM   #6
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Original Poster
Rep: Reputation: 38
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.

Last edited by adriv; 08-20-2009 at 11:00 AM. Reason: typo
 
Old 08-20-2009, 10:31 AM   #7
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by bgeddy View Post
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?
 
Old 08-20-2009, 11:05 AM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
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 ?
 
Old 08-20-2009, 11:19 AM   #9
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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?
 
Old 08-20-2009, 11:44 AM   #10
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Original Poster
Rep: Reputation: 38
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.
 
Old 08-20-2009, 11:48 AM   #11
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Please post the output of "ls -l /boot/".
 
Old 08-20-2009, 12:03 PM   #12
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by Bruce Hill View Post
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
 
Old 08-20-2009, 12:03 PM   #13
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
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.
 
Old 08-20-2009, 12:09 PM   #14
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by bgeddy View Post
@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...
 
Old 08-20-2009, 12:19 PM   #15
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Original Poster
Rep: Reputation: 38
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.
 
  


Reply

Tags
egrep


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] Slackpkg kernel upgrade has borked Tap-to-Click on Touchpad BobNutfield Slackware 9 07-18-2009 08:46 AM
upgrade > kernel panic solly Arch 5 12-24-2008 01:00 PM
Slackpkg + Kernel panic tntcoder Slackware 2 06-21-2006 03:13 AM
pacman -Su, kernel upgrade, kernel panic, change distro? jkh Arch 35 03-10-2006 02:14 AM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration