Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Kernel compile and install on Debian systems
Thanks for the guide on the "Debian way". I was just manually compiling my kernels before, which worked, but this is better
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
- bluesdog
- Posts: 2077
- Joined: 2006-02-01 09:02
- Location: Similkameen, British Columbia, Canada
- Been thanked: 1 time
You can also automate initrd creation and modification of /boot/grub/menu.lst
Edit /etc/kernel-img.conf to read something like:
Example: creates packages for the kernel image, matching headers and compiled source, modules such as madwifi, and kernel docs, etc, and the InitialRamDisk -- initrd
dpkg -i the kernel package reads /etc/kernel-img.conf script, which auto-generates initrd, and automagically re-writes /boot/grub/menu.lst with the appropriate lines...
Debian is amazing!
Edit /etc/kernel-img.conf to read something like:
When you type your kernel build command, add a switch to build initrd.# Kernel Image management overrides
# See kernel-img.conf(5) for details
do_symlinks = Yes
warn_initrd = no
ramdisk = /usr/sbin/mkinitrd.yaird /usr/sbin/mkinitramfs /usr/sbin/mkinitrd
do_bootloader = no
do_bootfloppy = no
link_in_boot = no
postinst_hook = /usr/sbin/update-grub
postrm_hook = /usr/sbin/update-grub
Example:
Code: Select all
# make-kpkg clean
# make-kpkg binary --initrd --revision=tigger.1.a --append-to-version -k7 kernel_image modules_image
dpkg -i the kernel package reads /etc/kernel-img.conf script, which auto-generates initrd, and automagically re-writes /boot/grub/menu.lst with the appropriate lines...
Debian is amazing!
Last edited by bluesdog on 2007-07-21 06:59, edited 1 time in total.
Tips & Tricks
Something more to read while waiting
If you obviously have not read THIS, don't expect too much...
*winter bluesdog....*
Something more to read while waiting
If you obviously have not read THIS, don't expect too much...
*winter bluesdog....*
- Telemachus
- Posts: 4574
- Joined: 2006-12-25 15:53
- Been thanked: 2 times
@ Bluesdog, two quick questions. First, don't you need the target "kernel_headers" in order to get headers? Second, is building module packages with the target "modules_image" necessary if you are going to install on that machine or only if you want to install it on a different machine? I've never used that, but kernels seem to work fine without it. Just curious.
- bluesdog
- Posts: 2077
- Joined: 2006-02-01 09:02
- Location: Similkameen, British Columbia, Canada
- Been thanked: 1 time
make-kpkg binary creates the following packages:
linux-doc-xxxx.deb, linux-image-xxxx.deb, linux-headers-xxxx.deb, linux-manual-xxxx.deb and linux-source-xxxx.deb
The optional modules_image switch only seems to build certain modules, iirc. I never could get it to build the nvidia module, for example.
I really only used it to see how it worked.
Normally I build modules with module-assistant
linux-doc-xxxx.deb, linux-image-xxxx.deb, linux-headers-xxxx.deb, linux-manual-xxxx.deb and linux-source-xxxx.deb
The optional modules_image switch only seems to build certain modules, iirc. I never could get it to build the nvidia module, for example.
I really only used it to see how it worked.
Normally I build modules with module-assistant
Tips & Tricks
Something more to read while waiting
If you obviously have not read THIS, don't expect too much...
*winter bluesdog....*
Something more to read while waiting
If you obviously have not read THIS, don't expect too much...
*winter bluesdog....*
Can someone tell me why this is important:
Do not configure or build your kernel with superuser permissions enabled.
This is also interesting:
Do not do any kernel development under
the /usr/src/....
source:
http://www.kernel.org/pub/linux/kernel/ ... f/ch01.pdf (page 2)
Do not configure or build your kernel with superuser permissions enabled.
This is also interesting:
Do not do any kernel development under
the /usr/src/....
source:
http://www.kernel.org/pub/linux/kernel/ ... f/ch01.pdf (page 2)
It's been discussed several times. I don't remember exactly but I'm sure you can find it by searching the board.tjh wrote:Can someone tell me why this is important:
Do not configure or build your kernel with superuser permissions enabled.
This is also interesting:
Do not do any kernel development under
the /usr/src/....
source:
http://www.kernel.org/pub/linux/kernel/ ... f/ch01.pdf (page 2)
But basically it does not matter on Debian, and the common way to do it in Debian is to use /usr/src/. You will notice that if you get the kernel source via APT it will be placed in /usr/src/. Also, 'make-kpkg' require root privileges (it will fail if run with fake-root').
Tina
Lavene wrote:It's been discussed several times. I don't remember exactly but I'm sure you can find it by searching the board.tjh wrote:Can someone tell me why this is important:
Do not configure or build your kernel with superuser permissions enabled.
This is also interesting:
Do not do any kernel development under
the /usr/src/....
source:
http://www.kernel.org/pub/linux/kernel/ ... f/ch01.pdf (page 2)
But basically it does not matter on Debian, and the common way to do it in Debian is to use /usr/src/. You will notice that if you get the kernel source via APT it will be placed in /usr/src/. Also, 'make-kpkg' require root privileges (it will fail if run with fake-root').
Tina
OK, thanks!
Hey. I am new to Debian, so it might be something really stupid that I am doing, but for some reason it seems that every time I try to make a custom kernel the .config file in my linux source directory is ignored, or at least most of it is. My sound card isn't recongnized, nor is my ethernet device despite the fact that I have both device drivers checked to compile with the kernel in menuconfig. I am pretty sure I have been following the steps exactly.
make menuconfig
(save)
make-kpkg -rev=custom.1.0 kernel-image
cd ..
dpkg -i image.deb
(where image represents the name of the deb file generated by make-kpkg.)
reboot
After I reboot I am able to get into my gui, but I am missing (as I said) my sound card driver and my ethernet driver. If I boot into the stock kernel both are detected so I am pretty sure it is a problem with my installation of a custom kernel. I just have no clue what I am doing wrong. Any ideas?
Thanks,
-Zael-
make menuconfig
(save)
make-kpkg -rev=custom.1.0 kernel-image
cd ..
dpkg -i image.deb
(where image represents the name of the deb file generated by make-kpkg.)
reboot
After I reboot I am able to get into my gui, but I am missing (as I said) my sound card driver and my ethernet driver. If I boot into the stock kernel both are detected so I am pretty sure it is a problem with my installation of a custom kernel. I just have no clue what I am doing wrong. Any ideas?
Thanks,
-Zael-
You can easily make a copy of your current known working config. When you do it this way you'll be asked about any NEW options in the config. Might I also suggest making a kernel headers package. You're going to need it. So instead of make menuconfig:Zael wrote:Hey. I am new to Debian, so it might be something really stupid that I am doing, but for some reason it seems that every time I try to make a custom kernel the .config file in my linux source directory is ignored, or at least most of it is. My sound card isn't recongnized, nor is my ethernet device despite the fact that I have both device drivers checked to compile with the kernel in menuconfig. I am pretty sure I have been following the steps exactly.
make menuconfig
(save)
make-kpkg -rev=custom.1.0 kernel-image
cd ..
dpkg -i image.deb
(where image represents the name of the deb file generated by make-kpkg.)
reboot
After I reboot I am able to get into my gui, but I am missing (as I said) my sound card driver and my ethernet driver. If I boot into the stock kernel both are detected so I am pretty sure it is a problem with my installation of a custom kernel. I just have no clue what I am doing wrong. Any ideas?
Thanks,
-Zael-
Code: Select all
make oldconfig
make-kpkg -rev=custom.1.0 kernel_image kernel_headers
Code: Select all
lsmod
Code: Select all
alsaconf
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
Nah. I was using a 2.6 kernel since install... I pretty much just took out the stuff I didn't need from the stock kernel config. I've made this exact kernel before in gentoo on this machine where I did the config from scratch so I am pretty sure I have included everything I need, but maybe I missed something. Another question that may ore may not be related. I wound up saying yes to my sound card and eth card in the config options instead of compiling them as modules; however, I noticed that a lot of stuff is compiled as a module by default with the stock kernel. Could this perhaps be the problem in some way, or is there a significant difference?
My cards by the way are:
Ensoniq ES1371 [AudioPCI-97] (rev 02)
Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
Perhaps I will try either restarting with the stock config or creating a new one from scratch.
My cards by the way are:
Ensoniq ES1371 [AudioPCI-97] (rev 02)
Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
Perhaps I will try either restarting with the stock config or creating a new one from scratch.
If you build them as modules you can make sure they get loaded on boot by listeing them in /etc/modules.Zael wrote: I wound up saying yes to my sound card and eth card in the config options instead of compiling them as modules; however, I noticed that a lot of stuff is compiled as a module by default with the stock kernel. Could this perhaps be the problem in some way, or is there a significant difference?
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
-
- Posts: 3
- Joined: 2007-08-19 05:36
Kernel
Hi,
I was able to successfully compile and build kernel 2.6.22 on my Debian Etch installation.
However when I try to log into the new kernel, I get the kernel panic message -
The relevant portion of my menu.lst reads as under
I was able to successfully compile and build kernel 2.6.22 on my Debian Etch installation.
However when I try to log into the new kernel, I get the kernel panic message -
Can anyone help me out of this one?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!
The relevant portion of my menu.lst reads as under
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
Aditya Pratap V.,
Goshamahal, Hyderabad - A. P.,
I N D I A
Goshamahal, Hyderabad - A. P.,
I N D I A
I was going to compile a custom kernel for my Debian amd64/sid box, currently I have linux 2.6.22-2-amd64 from Debian distro. However, I ran into this problem when I tried to run make menuconfig:
Have I forget something?
Code: Select all
/usr/src/linux # make menuconfig
scripts/Makefile.build:17: /usr/src/linux-headers-2.6.22-2-amd64/scripts/basic/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-headers-2.6.22-2-amd64/scripts/basic/Makefile'. Stop.
make: *** [scripts_basic] Error 2
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
- Telemachus
- Posts: 4574
- Joined: 2006-12-25 15:53
- Been thanked: 2 times
I think that to make the kernel from Debian sources, you need to download the kernel source rather than kernel headers. So first you want to get the "linux-source-2.6.22 " package and then work with that. After you install, go to /usr/src and you should see /usr/src/linux-source-2.6.22.tar.bz2. Decompress that tarball and cd and then start with make menuconfig. Edit - maybe you already have the file. In that case, you just moved into the wrong directory. Based on what you wrote, you were in a headers folder when you typed the command.
I usually use xconfig because I like the graphical interface better.Telemachus wrote:I think that to make the kernel from Debian sources, you need to download the kernel source rather than kernel headers. So first you want to get the "linux-source-2.6.22 " package and then work with that. After you install, go to /usr/src and you should see /usr/src/linux-source-2.6.22.tar.bz2. Decompress that tarball and cd and then start with make menuconfig. Edit - maybe you already have the file. In that case, you just moved into the wrong directory. Based on what you wrote, you were in a headers folder when you typed the command.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
*Doh!!!*Telemachus wrote:I think that to make the kernel from Debian sources, you need to download the kernel source rather than kernel headers. So first you want to get the "linux-source-2.6.22 " package and then work with that. After you install, go to /usr/src and you should see /usr/src/linux-source-2.6.22.tar.bz2. Decompress that tarball and cd and then start with make menuconfig. Edit - maybe you already have the file. In that case, you just moved into the wrong directory. Based on what you wrote, you were in a headers folder when you typed the command.
Thanks for pointing it out. I was in the wrong directory indeed.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
me feels better now, I'm not alone*Doh!!!*
Thanks for pointing it out. I was in the wrong directory indeed
I did that the other week as well, then when I realized what was going on I felt a little bit hommerish, but was very happy when I successfully compiled my Kernel
qandd
Debian Sid
64Studio 2.0
Debian Sid
64Studio 2.0