LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   kernel panic while trying to boot into my freshly brewed 2.6.22 kernel (https://www.linuxquestions.org/questions/debian-26/kernel-panic-while-trying-to-boot-into-my-freshly-brewed-2-6-22-kernel-578592/)

adityavpratap 08-20-2007 11:40 PM

kernel panic while trying to boot into my freshly brewed 2.6.22 kernel
 
Hi!
I downloaded and compiled kernel 2.6.22 on my Debian 4.0 install as follows -
(a) downloaded the linux-2.6.22 kernel from kernel.org
(b) untarred it in /usr/src/
(c) then as super user, compiled it - I used the config file from the existing 2.6.18 (default kernel for Debian 4.0)
(d) saved and exited xconfig
(e) then I followed the following steps
Quote:

# make-kpkg clean
# make-kpkg --revision=custom.0.1 kernel_image
# dpkg -i kernel-image-2.6.22_custom.0.1-i386.deb
# cd /boot/
# mkinitrd -o /boot/initrd.img-2.6.22 2.6.22
after doing this I added the following line to menu.lst under the new kernel paragraph -
Quote:

initrd /boot/initrd.img-2.6.22
so that the relevant part of my menu.lst reads as under -
Quote:

title Debian GNU/Linux, kernel 2.6.22
root (hd0,9)
kernel /boot/vmlinuz-2.6.22 root=/dev/sda10 ro
initrd /boot/initrd.img-2.6.22
savedefault
Now when I try to boot into the new kernel, I get the following kernel panic error -
Quote:

initrd-tools : 0.1.84.2
mount : unknown filesystem type 'devfs'
SCSI subsystem initialized
unmount : devfs : not mounted
mount : unknown filesystem type 'devfs'
umount : devfs : not mounted
pivot_root : no such file or directory
/sbin/init : 432 : cannot open /dev/console : no such file
kernel panic - not syncing : Attempted to kill init!
I hope some one in these learned fora can help me out!

Junior Hacker 08-21-2007 01:57 AM

Quote:

Originally Posted by adityavpratap (Post 2865373)
I used the config file from the existing 2.6.18 (default kernel for Debian 4.0)

Seeing as your not looking for any special features by using the original config, you should just remove your custom kernel and source and add these lines to your /etc/apt/sources.list like so:
Code:

deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
deb http://kernel-archive.buildserver.net/debian-kernel/ trunk main

Then do an apt-get update, do not install any updates, then using synaptic or apt-get install the linux-image-2.6.22-1, and if you need to compile kernel modules, install the linux-headers-2.6.22-1-your_architecture which should also install linux-kbuild and linux-headers as dependencies, and it will need to update libc6 and linux-libc-dev etc. Then comment out those two lines and do another apt-get update so you don't upgrade your system to a mixed up unstable. Re-boot to your new kernel and using synaptic or apt-get, remove the original linux-image and header packages and kbuild when your satisfied with the new DEBIAN 2.6.22 kernel.
Sure beats going through the headache you're experiencing, unless of course, you need to learn something.

adityavpratap 08-21-2007 03:18 AM

Ok!
One question, my Debian install is on an Acer Laptop that has AMD Turion 64 processor. Is there any kernel meant specifically for this architecture?

Moreover, after adding the above two repos to my sources.list, I am getting the following error message trying to update -

W: GPG error: http://kernel-archive.buildserver.net trunk Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DCB0AE4729F335B3
W: You may want to run apt-get update to correct these problems

Junior Hacker 08-21-2007 12:13 PM

I always forget to post the key for that repo, issue the two commands below to import it while on-line as root:
Code:

gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 29F335B3
gpg --armor --export 29F335B3 | apt-key add -

In the future, when you add more repositories and get the missing key error, use these same commands and replace the eight digits, ex. (29F335B3), apt will always show you which key is missing, those eight digits are the last eight digits of the key error you got.

If you type uname -ra in a terminal, you'll get a line similar to the one posted below from my unit, towards the end of the line is (i686), that's the architecture of the distribution I have installed. Because my Pentium 4 650 processor is dual architecture, meaning I can install either amd64 or i686 architechture, I installed the i686 because it is installed inside of Windows 32bit in VMware. The i686 is 32bit, the amd64 is 64bit. So in this same line you can see I have the 2.6.21-2-686 kernel installed.
Quote:

Linux foxfire 2.6.21-2-686 #1 SMP Wed Jul 11 03:53:02 UTC 2007 i686 GNU/Linux

adityavpratap 08-21-2007 08:44 PM

Wow, thanks!
I am now running my brand new 2.6.22-1-amd64 kernel.
However there is one hitch - my wireless card (Broadcom bcm4318) is not working.
Actually to get it connected in my previous kernel, I used to issue the following commands -
sudo ifconfig eth0 down
sleep 1
sudo modprobe -r bcm43xx
sleep 1
sudo modprobe -r ndiswrapper
sleep 1
sudo modprobe ndiswrapper
sleep 1
sudo ifconfig eth1 up
sleep 1
#sudo dhclient eth1
sleep 1
ping in.rediff.com -c 1

Now when I run the above script, I get the following error message -
eth1: ERROR while getting interface flags: No such device

Is it because right options have not been compiled into the new kernel?

Dutch Master 08-21-2007 08:53 PM

No, eth1 doesn't exist. Try Eth0 (as in: zero) for a change ;) When you've found the correct device, put your commands in a script, then add the script to the boot-sequence to start the card automagicaly.

adityavpratap 08-21-2007 10:35 PM

eth0 is my lan card which supports wired connection to my router.
ifconfig shows only eth0 and lo.
There is no option for wirless connection in network-admin

scheidel21 08-31-2007 01:45 PM

you may need to recompile your ndiswrapper, or using the 2.6.22 kernel series you should be able to use the bcm43xx driver for the 4318 card, although you will need the bcm43xx-fwcutter tool to get the firmware for the card.

adityavpratap 08-31-2007 09:53 PM

You are right sheidel, I tried as you suggested and got it working. Thanks friend!


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