LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   deb kernel trouble and initrd (https://www.linuxquestions.org/questions/debian-26/deb-kernel-trouble-and-initrd-281590/)

ssfrstlstnm 01-24-2005 08:27 AM

deb kernel trouble and initrd
 
I am trying to upgrade from the stock kernel 2.4.27 supplied with sarge to 2.6.10. I have seen some posts suggesting that you need to use only debian kernel source. Isn't that only if I am using a precompiled kernel. If I am compiling myself, can't I use the source from kernel.org?

So I have downloaded the 2.6.10 kernel from kernel.org
Updated all packages needed for compilation
and compiled using

make menuconfig
make bzImage
make modules
make modules install

then moved the kernel to /boot and renamed to vmlinuz-2.6.10
also moved System.map to /boot
added the new kernel to /boot/grub/menu.lst

I am not sure if I need to make initrd
my filesystem is ext2 and is compiled into the kernel
other fs are modules

I could not boot without initrd, so I tried makeinitrd
then added initrd path to the new kernel entry in grub

Still will not boot
I get an error something like it "cannot read hdb1, please enter correct root path" or something like that

any ideas, sorry I cannot give the exact error because I am at work right now and no access to the machine. I can give more specific later if needed.:(

m_yates 01-24-2005 10:32 AM

I've always used the Debian sources and the "Debian way" of kernel compiling, so I may not answer this completely correct. However, the Debian sources have patches that are needed to get the initrd to work. As I understand it, the Debian initrd uses the cramfs filesystem and support for that filesystem must be patched into the kernel. I'm not sure what other patches are made to the kernel. The Debian source for kernel 2.6.10 is in unstable, so you can easily install it with:
Code:

apt-get -t unstable install kernel-source-2.6.10
if you have unstable sources in your /etc/apt/sources.list file. Apt-get will install the compressed kernel source in /usr/src. You will just need to unpack it and symbolically link it to /usr/src/linux:
Code:

cd /usr/src
tar -jxf kernel-source-2.6.10.tar.bz2
rm linux
ln -s kernel-source-2.6.10 linux
cd linux
make menuconfig

Then you can configure the kernel and compile as you did before. I find it easier to compile the "Debian way" though. After configuring, if you run:
Code:

make-kpkg --initrd --append-to-version=-debian kernel_image
It will automatically compile the kernel, modules, and create the initrd. It will create a deb file located in /usr/src. If you install it with dpkg, the kernel, modules, and initrd will be installed and thr grub bootloader will automatically be updated with an entry for the new kernel.

Pcghost 01-24-2005 01:21 PM

I also used the "debian way" for my kernel (2.6.8). It didn't create the initrd I expected either, so I recompiled making sure to include not just my filesystems, but the driver for my IDE controller. Now it boots great without the need for initrd.

ssfrstlstnm 01-25-2005 07:47 AM

It works! Thanks.

I am now back to where I was with Mandrake.

Debian seems very good. I really like apt-get.

Now if I can just get my sound card working...

Pcghost 01-25-2005 10:19 AM

type alsaconf at the command-line, to recofigure the alsa package after a kernel upgrade. Just for good measure I did a apt-get upgrade alsa as well before configuring it.

imagineaxion 02-04-2005 03:11 AM

hi

i'm also trying to install the 2.6.10 kernel

i typed the command to get the kernel source from unstable but i just get a responce saying: couldn't find package.

do i need to dl the unstable packeage list first or... ?

thanks

imagineaxion 02-04-2005 03:41 AM

ok so it seems for some reason i needed a reboot or something i'm not sure.

anyway i typed in (as root)
Code:

apt-get -t unstable install kernel-source-2.6.10
and again it comes back with cannot find package

if u just use
Code:

apt-get -t unstable install kernel-source
then i get option between the 2.2x, 2.4x and 2.6.8 kernels

how do i get the 2.6.10 kernel?

m_yates 02-04-2005 08:30 AM

First, make sure you have a source for unstable packages in /etc/apt/sources.list Mine is:
Code:

deb ftp://ftp.debian.org/debian unstable main contrib non-free
Then update:
Code:

apt-get update
then install:
Code:

apt-get -t unstable install kernel-source-2.6.10
You can also check what kernel sources are available with:
Code:

apt-cache search kernel-source-2.6
When I run that, I get:
Code:

kernel-patch-debian-2.6.10 - Debian patches to Linux 2.6.10
kernel-patch-debian-2.6.8 - Debian patches to Linux 2.6.8
kernel-patch-debian-2.6.9 - Debian patches to Linux 2.6.9
kernel-source-2.6.10 - Linux kernel source for version 2.6.10 with Debian patches
kernel-source-2.6.8 - Linux kernel source for version 2.6.8 with Debian patches
kernel-source-2.6.9 - Linux kernel source for version 2.6.9 with Debian patches
kernel-source-2.6.7 - Linux kernel source for version 2.6.7 with Debian patches

You can also download the source directly from the package page: http://packages.debian.org/unstable/...-source-2.6.10

imagineaxion 02-05-2005 08:57 AM

thanks m_yates

much appreciated


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