LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Kernel update - Debian Style? (https://www.linuxquestions.org/questions/debian-26/kernel-update-debian-style-431286/)

chief_officer 04-03-2006 06:33 AM

Kernel update - Debian Style?
 
Hello,

I tried to update my kernel to 2.6.16.1 yesterday. I have downloaded the kernel to /usr/src and untar'ed it and then finished the menuconfig. When I typed

Code:

/usr/src/linux.2.6.16.1#make-kpkg clean
I get the following error message:

Code:

make:*** No rule to make target `kpkg-clean'. Stop.
Meantime, when I type

Code:
/usr/src/linux.2.6.16.1# fakeroot make-kpkg --initrd --revision=custom.1.0 kernel-image-2.6.16.1-custom_1.0.deb

I get the following error message:

Code:

Error: Unknown target kernel-image-2.6.16.1-custom_1.0.deb use --targets to display help on valid targets

I am following tutorials from the following website to update my kernel:
http://www.howtoforge.com/forums/showthread.php?t=21

and also from official Debian site:
http://www.debian.org/releases/sarge...h08s05.html.en

I did a fresh install of Debian Sarge on my Toshiba Satellite Pro 6100 [didn't do dist-upgrade]. And yes, I have never compiled a kernel before.

Regards,
Chief

Edit: I have typed the "Meantime when I type" sentence twice. Deleted one.

smokybobo 04-03-2006 09:13 AM

Here's the bare minimum of what I do to install a kernel the debian way:

1. Unpack the kernel tarball to a directory under my home directory -- there is absolutely no reason to be root just to compile a program.

Code:

cp linux-2.6.16.tar.bz2 $HOME/projects/kernel
cd $HOME/projects/kernel
tar xfj linux-2.6.16.tar.bz2

2. Configure kernel options.

Code:

cd linux-2.6.16
make menuconfig

3. Issue make-kpkg command.

Code:

time fakeroot make-kpkg --append-to-version='-1' --bzimage kernel_image
4. Install new debian package, install initrd with yaird, and update grub assuming you have sudo permissions to run the necessary commands.

Code:

KERN=2.6.16-1
sudo dpkg -i ../linux-image-$KERN*.deb
sudo yaird -v --output=/boot/initrd.img-$KERN
sudo update-grub

5. Reboot



Now, what I actually do every time I want to install a kernel the debian way is after unpacking the kernel source and configuring it, I run a script I wrote that calls make-kpkg to also create packages for additional modules e.g. unionfs, cloop, nvidia-kernel. I then install all the resulting packages into a local apt repository with reprepro, and then install using aptitude. That may be too advanced yet, but if you're interested about either my extremely simple make-kpkg wrapper script (which I wrote so I wouldn't have to remember make-kpkg syntax all the time, and do a lot of extra manual work wrt extra kernel modules), or anything else I mentioned, feel free to ask.


All times are GMT -5. The time now is 05:15 AM.