Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel updating
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
cipherus
Apprentice
Apprentice


Joined: 07 May 2004
Posts: 174

PostPosted: Mon Feb 11, 2008 8:17 am    Post subject: Kernel updating Reply with quote

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
View user's profile Send private message
mjf55
Guru
Guru


Joined: 25 Aug 2007
Posts: 372

PostPosted: Mon Feb 11, 2008 10:25 am    Post subject: Reply with quote

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
View user's profile Send private message
baeksu
l33t
l33t


Joined: 26 Sep 2004
Posts: 609
Location: Seoul, Korea

PostPosted: Mon Feb 11, 2008 12:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
cipherus
Apprentice
Apprentice


Joined: 07 May 2004
Posts: 174

PostPosted: Mon Feb 11, 2008 1:37 pm    Post subject: Reply with quote

Yea, the download and compile time is just a monster though... It used to feel productive watching things compile all day.
Back to top
View user's profile Send private message
AllenJB
Veteran
Veteran


Joined: 02 Sep 2005
Posts: 1285

PostPosted: Mon Feb 11, 2008 3:07 pm    Post subject: Reply with quote

Linux is a multi-tasking OS. DO SOMETHING ELSE WHILE THINGS COMPILE!
Back to top
View user's profile Send private message
sundialsvc4
Guru
Guru


Joined: 10 Nov 2005
Posts: 436

PostPosted: Mon Feb 11, 2008 3:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Nick C
Guru
Guru


Joined: 18 Mar 2005
Posts: 526
Location: Portsmouth, England

PostPosted: Mon Feb 11, 2008 8:18 pm    Post subject: Reply with quote

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 :D :D :D
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
www.monkeydust.net
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Mon Feb 11, 2008 8:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Mon Feb 11, 2008 10:07 pm    Post subject: Reply with quote

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 :D :D :D


Thanks! I never thought of doing that... :oops:
_________________
“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
View user's profile Send private message
cipherus
Apprentice
Apprentice


Joined: 07 May 2004
Posts: 174

PostPosted: Mon Feb 11, 2008 10:34 pm    Post subject: Reply with quote

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 :D :D :D


I actually never thought of this either. Right on.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Tue Feb 12, 2008 3:57 am    Post subject: Reply with quote

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
View user's profile Send private message
arnvidr
l33t
l33t


Joined: 19 Aug 2004
Posts: 629
Location: Oslo, Norway

PostPosted: Tue Feb 12, 2008 12:35 pm    Post subject: Reply with quote

I never thought of that either! :o

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! :)
_________________
Noone wrote:
anything
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Feb 12, 2008 1:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Tue Feb 12, 2008 3:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Feb 12, 2008 4:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Tue Feb 12, 2008 6:10 pm    Post subject: Reply with quote

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 :D :D :D


What, exactly, is the point of using parallel make on a non-parallel installation only command?
Back to top
View user's profile Send private message
tanderson
Retired Dev
Retired Dev


Joined: 11 Apr 2007
Posts: 193

PostPosted: Wed Feb 13, 2008 1:28 am    Post subject: Reply with quote

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. :wink:
_________________
No Man is Just a Number!

--The Prisoner
Back to top
View user's profile Send private message
cipherus
Apprentice
Apprentice


Joined: 07 May 2004
Posts: 174

PostPosted: Wed Feb 13, 2008 2:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Rad
Guru
Guru


Joined: 11 Feb 2004
Posts: 401
Location: Bern, Switzerland

PostPosted: Wed Feb 13, 2008 3:06 am    Post subject: Reply with quote

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
View user's profile Send private message
McLink
Apprentice
Apprentice


Joined: 02 Feb 2008
Posts: 183
Location: /dev/chair

PostPosted: Wed Feb 13, 2008 7:36 am    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Feb 13, 2008 12:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Wed Feb 13, 2008 1:53 pm    Post subject: Reply with quote

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. :wink:

For the record, this is highly discouraged :wink:

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
View user's profile Send private message
tanderson
Retired Dev
Retired Dev


Joined: 11 Apr 2007
Posts: 193

PostPosted: Wed Feb 13, 2008 5:46 pm    Post subject: Reply with quote

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. :wink:

For the record, this is highly discouraged :wink:

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
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Wed Feb 13, 2008 6:05 pm    Post subject: Reply with quote

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. :wink:

For the record, this is highly discouraged :wink:

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 :wink:
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Feb 13, 2008 6:56 pm    Post subject: Reply with quote

Yeah, module-rebuild ftw ;P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum