View previous topic :: View next topic |
Author |
Message |
cipherus Apprentice

Joined: 07 May 2004 Posts: 174
|
Posted: Mon Feb 11, 2008 8:17 am Post subject: Kernel updating |
|
|
When switching to a new kernel, generally you have to rebuild audio, video, acpi, virtualbox, and or whatever external module packages all the way down. Does this seem like too much of a hassle for maybe even the smallest differences in kernel sources?
What about just copying module libs to the new /lib/modules/kernel_dir/ ?
Or maybe source dir hotpatching or something? |
|
Back to top |
|
 |
mjf55 Guru


Joined: 25 Aug 2007 Posts: 372
|
Posted: Mon Feb 11, 2008 10:25 am Post subject: |
|
|
If you follow the guide http://www.gentoo.org/doc/en/kernel-upgrade.xml, there is very little work involved, just takes cpu cycles.
Code: |
make menuconfig
make && make modules_install
cp arch/<whatever>/boot/bzImage /boot/<kernel_name_here>
module-rebuild -X
vi /boot/grub/grub.conf as required
|
Thats it. _________________ Mark
No longer a n00b, but still a 'Kool Kid' wannabe |
|
Back to top |
|
 |
baeksu l33t


Joined: 26 Sep 2004 Posts: 609 Location: Seoul, Korea
|
Posted: Mon Feb 11, 2008 12:48 pm Post subject: |
|
|
You can't copy modules across different kernels.
The above advice will handle will get you going.
Don't forget to symlink /usr/src/linux to the new kernel sources! _________________ Gnome:
1. A legendary being.
2. A never ending quest to make unix friendly to people who don't want unix and excruciating for those that do. |
|
Back to top |
|
 |
cipherus Apprentice

Joined: 07 May 2004 Posts: 174
|
Posted: Mon Feb 11, 2008 1:37 pm Post subject: |
|
|
Yea, the download and compile time is just a monster though... It used to feel productive watching things compile all day. |
|
Back to top |
|
 |
AllenJB Veteran


Joined: 02 Sep 2005 Posts: 1285
|
Posted: Mon Feb 11, 2008 3:07 pm Post subject: |
|
|
Linux is a multi-tasking OS. DO SOMETHING ELSE WHILE THINGS COMPILE! |
|
Back to top |
|
 |
sundialsvc4 Guru

Joined: 10 Nov 2005 Posts: 436
|
Posted: Mon Feb 11, 2008 3:48 pm Post subject: |
|
|
One thing that's "nice" to do while compiling big things is ... nice.
Now, that won't completely eliminate the impact of a background compile, because most garden-variety PC's have the cheapest on-board disk controllers imaginable (or maybe it's just that I'm cheap ... ...), but nice does give the scheduler a clue that, even though this activity might be the busiest, it's not the one that you want to give front-and-center attention to. And I find that nice make usually runs no slower than ordinary make.
{n.b. as you probably know, nice command... causes Linux to run command... at a reduced dispatching-priority, that is, "in the background." When you do something "in the foreground" that requires CPU cycles, the dispatcher will pre-empt the background-level activities (within reason...) to make way for your request, instead of treating the two activities equally.} |
|
Back to top |
|
 |
Nick C Guru

Joined: 18 Mar 2005 Posts: 526 Location: Portsmouth, England
|
Posted: Mon Feb 11, 2008 8:18 pm Post subject: |
|
|
not forgetting if you have dual/quad core cpus you can use make -j x && make -j x modules_install (where x is the desired value for -j, normally number of cpu's +1) to have the kernel use all your processors, cut my kernel compile time down to just under 1 minute  _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved.
www.monkeydust.net |
|
Back to top |
|
 |
ok Guru


Joined: 11 Jul 2006 Posts: 390 Location: germany
|
Posted: Mon Feb 11, 2008 8:38 pm Post subject: |
|
|
Nick C wrote: | ... cut my kernel compile time down to just under 1 minute |
A new Kernel, compiling the *first time* with all modules, without ccache?! |
|
Back to top |
|
 |
Etal Veteran


Joined: 15 Jul 2005 Posts: 1932
|
Posted: Mon Feb 11, 2008 10:07 pm Post subject: |
|
|
Nick C wrote: | not forgetting if you have dual/quad core cpus you can use make -j x && make -j x modules_install (where x is the desired value for -j, normally number of cpu's +1) to have the kernel use all your processors, cut my kernel compile time down to just under 1 minute  |
Thanks! I never thought of doing that...  _________________ “And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010 |
|
Back to top |
|
 |
cipherus Apprentice

Joined: 07 May 2004 Posts: 174
|
Posted: Mon Feb 11, 2008 10:34 pm Post subject: |
|
|
Nick C wrote: | not forgetting if you have dual/quad core cpus you can use make -j x && make -j x modules_install (where x is the desired value for -j, normally number of cpu's +1) to have the kernel use all your processors, cut my kernel compile time down to just under 1 minute  |
I actually never thought of this either. Right on. |
|
Back to top |
|
 |
NathanZachary Moderator


Joined: 30 Jan 2007 Posts: 2609
|
Posted: Tue Feb 12, 2008 3:57 am Post subject: |
|
|
WOW, I never thought of that either. For some reason, I thought it would just pull that information from make.conf, but that doesn't make sense, now does it?  _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
 |
arnvidr l33t


Joined: 19 Aug 2004 Posts: 629 Location: Oslo, Norway
|
Posted: Tue Feb 12, 2008 12:35 pm Post subject: |
|
|
I never thought of that either!
Although a kernel compile doesn't take long either way for me, -j8 does wonders for my emerges! I'll try to remember this for sure!  _________________
|
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Feb 12, 2008 1:11 pm Post subject: |
|
|
kalos wrote: | WOW, I never thought of that either. For some reason, I thought it would just pull that information from make.conf, but that doesn't make sense, now does it?  |
In fact, the kernel compilation doesn't use the /etc/make.conf
What is the gain of performance with the -j option with the make ? |
|
Back to top |
|
 |
jonnevers Veteran


Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Tue Feb 12, 2008 3:30 pm Post subject: |
|
|
d2_racing wrote: | In fact, the kernel compilation doesn't use the /etc/make.conf  |
afaict, The only thing that uses /etc/make.conf is portage itself (and child processes, obviously). paludis doesn't even use it (it uses /etc/paludis/bashrc).
d2_racing wrote: | What is the gain of performance with the -j option with the make ? |
depends greatly on your hardware, the more parallel compiles you can do the better. |
|
Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3224
|
Posted: Tue Feb 12, 2008 4:56 pm Post subject: |
|
|
Emerge the app module-rebuild... it will list all packages that needs to be recompiled after a kernel update.
Code: | module-rebuild list |
Personally I can't satand external kernel modules... they make things a real hassle when updating a kernel (I'm currently going through the process as we speak). |
|
Back to top |
|
 |
Monkeh Veteran


Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Tue Feb 12, 2008 6:10 pm Post subject: |
|
|
Nick C wrote: | not forgetting if you have dual/quad core cpus you can use make -j x && make -j x modules_install (where x is the desired value for -j, normally number of cpu's +1) to have the kernel use all your processors, cut my kernel compile time down to just under 1 minute  |
What, exactly, is the point of using parallel make on a non-parallel installation only command? |
|
Back to top |
|
 |
tanderson Retired Dev


Joined: 11 Apr 2007 Posts: 193
|
Posted: Wed Feb 13, 2008 1:28 am Post subject: |
|
|
jonnevers wrote: | d2_racing wrote: | In fact, the kernel compilation doesn't use the /etc/make.conf  |
afaict, The only thing that uses /etc/make.conf is portage itself (and child processes, obviously). paludis doesn't even use it (it uses /etc/paludis/bashrc).
d2_racing wrote: | What is the gain of performance with the -j option with the make ? |
depends greatly on your hardware, the more parallel compiles you can do the better. |
For the record, paludis can handle /etc/make.conf with the experimental portage environment which allows paludis to use a native portage configuration environment.  _________________ No Man is Just a Number!
--The Prisoner |
|
Back to top |
|
 |
cipherus Apprentice

Joined: 07 May 2004 Posts: 174
|
Posted: Wed Feb 13, 2008 2:46 am Post subject: |
|
|
I was raised on linux with gentoo so many things done in this community I took for the standard. Recently I installed Fedora 8 to help with practicing for my Linux+ and I found this to be very much not the case! For instance, the enormous wealth of online documentation for gentoo just isn't available for any other distro. Between the online manuals, gentoo-wiki and these forums almost anything you've ever dreamed of doing is covered in detail. Even the Red Hat sponsored documentation is not as well organized and descriptively weak (at best) compared the the gentoo manuals. This maybe comes from their design perspective to not even need documentation, just use it and it goes.
When it comes to kernels though, with gentoo being so modular I just was thinking that upgrading a kernel from r1 to r2 shouldn't require recompiling half the packages on my system. But looking at it now I think I can see why it would be necessary. If for nothing else, the stability in garunteeing that no kernel hooks have changed. For another, who would maintain all these tiny patches from one kernel to another? I sure wouldn't want that job. |
|
Back to top |
|
 |
Rad Guru

Joined: 11 Feb 2004 Posts: 401 Location: Bern, Switzerland
|
Posted: Wed Feb 13, 2008 3:06 am Post subject: |
|
|
Well, actually upgrading the kernel almost never does require you to recompile many other packages.
You only have to do that for kernel external modules, and (very rarely), to update userspace tools that were broken by such an update. |
|
Back to top |
|
 |
McLink Apprentice


Joined: 02 Feb 2008 Posts: 183 Location: /dev/chair
|
Posted: Wed Feb 13, 2008 7:36 am Post subject: |
|
|
jonnevers wrote: | d2_racing wrote: | In fact, the kernel compilation doesn't use the /etc/make.conf  |
afaict, The only thing that uses /etc/make.conf is portage itself (and child processes, obviously). paludis doesn't even use it (it uses /etc/paludis/bashrc).
| A tip for anyone frequently compiling things outside of Portage: you can always add . /etc/make.conf to root's and/or your user's .bashrc. I don't believe make looks at $MAKEOPTS by default, but you could also add a line alias make='make $MAKEOPTS ' right after sourcing make.conf. That way, you'll keep your non-Portage build environment in sync with the Portage one. |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Feb 13, 2008 12:46 pm Post subject: |
|
|
mikegpitt wrote: | Emerge the app module-rebuild... it will list all packages that needs to be recompiled after a kernel update.
Code: | module-rebuild list |
|
Thanks for the app, I'm using Gentoo since the kernel 2.6.9-Gentoo-r8, and I didn't know this little application at all  |
|
Back to top |
|
 |
jonnevers Veteran


Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Wed Feb 13, 2008 1:53 pm Post subject: |
|
|
gentoofan23 wrote: | For the record, paludis can handle /etc/make.conf with the experimental portage environment which allows paludis to use a native portage configuration environment.  |
For the record, this is highly discouraged
i symlinked /etc/make.conf to /etc/paludis/bashrc because I'm so used to editing the former... old habits and all that. |
|
Back to top |
|
 |
tanderson Retired Dev


Joined: 11 Apr 2007 Posts: 193
|
Posted: Wed Feb 13, 2008 5:46 pm Post subject: |
|
|
jonnevers wrote: | gentoofan23 wrote: | For the record, paludis can handle /etc/make.conf with the experimental portage environment which allows paludis to use a native portage configuration environment.  |
For the record, this is highly discouraged
i symlinked /etc/make.conf to /etc/paludis/bashrc because I'm so used to editing the former... old habits and all that. |
That's why I put 'experimental' there. Maybe I should have put it stronger....  _________________ No Man is Just a Number!
--The Prisoner |
|
Back to top |
|
 |
jonnevers Veteran


Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Wed Feb 13, 2008 6:05 pm Post subject: |
|
|
gentoofan23 wrote: | jonnevers wrote: | gentoofan23 wrote: | For the record, paludis can handle /etc/make.conf with the experimental portage environment which allows paludis to use a native portage configuration environment.  |
For the record, this is highly discouraged
i symlinked /etc/make.conf to /etc/paludis/bashrc because I'm so used to editing the former... old habits and all that. |
That's why I put 'experimental' there. Maybe I should have put it stronger....  |
maybe it shouldn't have even been mentioned  |
|
Back to top |
|
 |
steveL Watchman

Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Wed Feb 13, 2008 6:56 pm Post subject: |
|
|
Yeah, module-rebuild ftw ;P |
|
Back to top |
|
 |
|