LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

View Poll Results: How many times did you compile your kernel?
Never, I always use the distro's initial kernel 31 16.76%
1-20 65 35.14%
20-100 47 25.41%
I don't remember how many times! 42 22.70%
Voters: 185. You may not vote on this poll

Reply
 
Search this Thread
Old 05-04-2006, 02:10 PM   #76
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52

lspci? sry!
 
Old 05-04-2006, 02:33 PM   #77
mimithebrain
Member
 
Registered: Nov 2003
Location: ~
Distribution: Ubuntu 10.04
Posts: 843
Blog Entries: 1

Original Poster
Rep: Reputation: 30
that and lshw

I think it's configuring the kernel the hardest part.
 
Old 05-04-2006, 02:34 PM   #78
gloomy
Member
 
Registered: Jan 2006
Location: Finland
Distribution: Mainly Gentoo
Posts: 119

Rep: Reputation: 15
Sure, always.

But that does not solve all issues. Actually it solves just a minority of issues. Nice tool, however, like lsusb and related tools.
 
Old 05-04-2006, 03:10 PM   #79
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by lin_user2004
I have compiled a kernel about 5-6 times for gentoo. And I did it once for slackware 3 days back but wasn't so successful then.
Will be compiling a lot kernels in the days to come.
If the kernel is for the same machine, when you compile for another distro you need not start from scratch all over again. At the worst, just save your .config file, untar new kernel source, throw that old .config file in the newly created ./linux-2.6.x.y/ directory, then issue:
make silentoldconfig
make
cp System.map /boot/System.map-2.6.x.y ; ln -sf /boot/System.map-2.6.x.y /boot/System.map
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.x.y
edit /etc/lilo.conf and create a new section for your new kernel (leave the old one in place as a fallback option)
lilo
reboot
and enjoy your shiny new Linux kernel
 
Old 05-04-2006, 05:26 PM   #80
hsimah
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Slackware 12.1
Posts: 173

Rep: Reputation: 30
Between my desktop and laptop, I've dont well over 50. My laptop runs 2.6.16.13 (just upgraded from 2.6.13 yesterday) with a slightly modified kernel.

My desktop's kernel is heavily modified by me. It's really really small now, which I am happy about. I'm not that great with Linux yet, but I have a LOT of spare time so I thought why not make an uber kernel?
 
Old 05-05-2006, 11:05 AM   #81
milanc
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
During the last 5 months, I've compiled my kernel way over 20 times - mainly because I have always had a new bit of hardware to focus on, and I prefer having most things build-in - in fact the only modules i have are:
- A buggy and obsolte webcam driver
- stir4200 IrDA module, necessary for irattach and co.
- broadcom bluetooth chip
- slmodem, to get my winmodem (yes, a winmodem) working
- snd_intel8x0m, necessary for slmodemd (daemon for slmodem)
- ipw2200 wireless network
First time i compiled my own kernel? 2.6.14, to be able to use my 802.11G wifi...
Now running 2.6.16-mm1... way behind, now it's 2.6.16.14 :-)
I'll upgrade to 2.6.17 when it'll be stable, to get SDHCI (secure digital & mmc card host) in the main kernel tree...
 
Old 05-05-2006, 11:26 PM   #82
venkatesh111
Member
 
Registered: Mar 2006
Posts: 34

Rep: Reputation: 15
hi i have been compiling my kernel i think i have done it some 50 to 60 times i think but still im not sure of the steps so can any one provide me exact steps plz..........
 
Old 05-06-2006, 02:13 AM   #83
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
I've previously posted a couple of really simple guides in LQ threads...
Build your kernel under /home
Build your kernel under /usr/src/
But one of the best guides on the net is Kwan Lowe's Kernel Rebuild Guide
and of course there's Linus Torvalds instructions in ./linux-2.x.y.z/README
 
Old 05-06-2006, 11:25 AM   #84
burntfuse
Member
 
Registered: Sep 2005
Location: Laurel, MD, USA
Distribution: Slackware 10.1, FC5
Posts: 164

Rep: Reputation: 30
If you've done it 50 or 60 times, how can you be not sure of the steps?
 
Old 05-06-2006, 12:52 PM   #85
mimithebrain
Member
 
Registered: Nov 2003
Location: ~
Distribution: Ubuntu 10.04
Posts: 843
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Perhaps a mistake in between
don't forget to copy the System.map file to /boot/System.map[version], a easy mistake to do.
that and update and run lilo (if nessessary) after copying the bzImage.
 
Old 05-06-2006, 11:25 PM   #86
debasish_5849
Member
 
Registered: Jan 2006
Location: India
Distribution: fedora core 5
Posts: 42

Rep: Reputation: 15
Are you guys too fond of making things complicated?
Just type "make install" after completing compilation. Everything would be copied to the right place and it will even edit your grub.conf correctly.
 
Old 05-07-2006, 12:22 AM   #87
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by debasish_5849
Are you guys too fond of making things complicated?
Just type "make install" after completing compilation. Everything would be copied to the right place and it will even edit your grub.conf correctly.
Wrong. You have a commercial distribution listed as your Linux distro, and someone may have hacked "make_install" to do so, but normally it does not. And most distros don't even use grub -- they use LiLO.
 
Old 05-07-2006, 06:26 AM   #88
milanc
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
make install?

There is an "install" target in the official linux kernel makefiles (at least since 2.6.14, that's when i started compiling), and it seems to work at least in debian-based distributions and in fedora core 4... < > don't tell me you think debian is a commercial distro </ > ... and then you just have to edit your bootloader's config file, using a special program or just any plain old text editor.

If it doesn't work with your distribution, you might need to compile some packages or download it using your package manager: when I type "make help" in my kernel's sources' path, I see that ~/bin/installkernel or /sbin/installkernel is necessary.

Edit: and it's in the i386-arch-specific target list

Last edited by milanc; 05-07-2006 at 06:27 AM.
 
Old 05-07-2006, 07:47 AM   #89
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
A "debian-based distributions" is not the same as Debian, nor did anyone but you in this thread mention Debian and commercial distro in the same post.

In the source of linux-2.6.16.14 I see absolutely nothing about GrUB. What I do see in README is this:
Code:
 - Do a "make" to create a compressed kernel image. It is also
   possible to do "make install" if you have lilo installed to suit the
   kernel makefiles, but you may want to check your particular lilo setup first.
And in that Makefile I see nothing to adjust any bootloader on it's own.

IMO you have to edit files to make that happen, no matter which bootloader you have. It is not possible with Kernel.org sources to
Quote:
Just type "make install" after completing compilation. Everything would be copied to the right place and it will even edit your grub.conf correctly.
-- unless someone has edited the bootloader to suit the Makefile.

The reason I'm even carrying on this silly argument is because newbies who don't know any better will read this thread, follow erroneous advice, and then wonder what happened.

Slackware doesn't have any hacked scripts included in the distro -- everything is pristine. Therefore, if you follow what was posted by debasish_5849 you will reboot with the same kernel(s) you had before. Just trying to keep a little sanity in the process we're discussing here.

Last edited by Bruce Hill; 05-07-2006 at 08:20 AM.
 
Old 05-07-2006, 04:45 PM   #90
mimithebrain
Member
 
Registered: Nov 2003
Location: ~
Distribution: Ubuntu 10.04
Posts: 843
Blog Entries: 1

Original Poster
Rep: Reputation: 30
From what I learned of my short and fun time with Gentoo, doing the following is simple, quick, and safe:
(from the kernel source folder)

cp arch/i386/bzImage /boot/kernel-2.6.16.14
cp System.map /boot/System.map-2.6.16.14

nano/pico/emacs/vi /etc/lilo.conf
[edit the stuff]
lilo
<<OR>>
nano/pico/emacs/vi /boot/grub/menu.lst (or /boot/grub/grub.conf)
[edit the stuff]

reboot.

Always have a backup kernel, never overwrite your only functional kernel. Have knoppix in hand, have a kernel build handbook if new to compilling kernels, and nothing else is nessessary that I know of...

make install overwrites the current kernel, and only works with lilo as far as I know.
 
  


Reply

Tags
build, compilation, kernel, poll, reference


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
Kernel Panic after trying to update Kernel to 2.6 several times LearningToLive Slackware 10 01-19-2006 08:57 AM
System hangs; Atheros Madwifi-ping times out every 15/16 times james 456 Linux - Networking 0 01-12-2006 06:55 PM
I've compiled my 2.6.12.3 kernel 3 times!!! CPUFreak91 Linux - General 11 08-04-2005 03:33 PM
New kernel = font problem at times! Slovak Slackware 2 12-20-2004 03:55 PM
kernel compile times danchan Linux - General 2 04-11-2004 06:33 PM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
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