Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Genkernel and kernel config file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
HMC
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jul 2005
Posts: 79
Location: Australia

PostPosted: Sat Jul 13, 2013 4:37 pm    Post subject: Genkernel and kernel config file Reply with quote

Hi,

I am certain these questions have been asked, but I haven't been able to find them...

The 'genkernel all' command is producing an unexpected result. That is, genkernel is looking to /etc/kernels/ for the kernel config file and if it doesn't exist, uses a generic configuration file /usr/share/genkernel/... The desired behaviour is to use the kernel configuration file from the source directory.

Is there an easy way to set genkernel to use the source directory kernel configuration file.


Another unrelated problem with genkernel... I use lvm over a luks encrypted disk and with genkernel versions after 3.45.x produce 'scattered' boot messages that don't stop at the disk password prompt. Typing the password blind after the prompt flashes past boots the system properly. Any thoughts on what might cause this?

Regards

Anne Marie
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Sat Jul 13, 2013 7:42 pm    Post subject: Reply with quote

Hi HMC,

You need a working /usr/src/linux/.config!
Then the easiest way is to copy this file to /etc/kernels/kernel-config-x86_64-3.10.0-gentoo (this is the file name in my case).
Both files will be synchronized when you "genkernel all" used in the future.

The default kernel-config ist very old:
/usr/share/genkernel/defaults/kernel-config wrote:

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24-gentoo-r4
# Thu Apr 17 08:21:12 2008
#


So if you have a very good (perfect) .config, copy this file to /usr/share/genkernel/defaults/kernel-config and you have a new startpoint.

Ma
_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Jul 13, 2013 8:38 pm    Post subject: Re: Genkernel and kernel config file Reply with quote

HMC wrote:
...Is there an easy way to set genkernel to use the source directory kernel configuration file[?]
Yes. It's described in the man page. See the --oldconfig command line option or the OLDCONFIG option in /etc/genkernel.conf (which also has its own man page). :wink:

You may also be interested in setting CLEAN="no" in the genkernel.conf file. You can always override it on the command line (--clean) when you want to start fresh.

Note that, by default and by design, genkernel uses canned "build the kitchen sink as modules" configurations that are shipped with genkernel itself. Most people use it that way but there's nothing at all wrong with using it the way you're saying you want to, either.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
HMC
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jul 2005
Posts: 79
Location: Australia

PostPosted: Sat Jul 13, 2013 8:45 pm    Post subject: Reply with quote

Yes, I have a working config in /usr/src/linux/. It used to be the default behaviour to use this config, but somewhere that changed.

I currently copy the config saved to the default save location in the source directory from the source directory to /etc/kernels/ or specify the config at the command line.

Anne Marie.

PS. HMC is my dad.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Thu Jul 18, 2013 11:17 pm    Post subject: Reply with quote

This is the script that I use when there is a kernel update

Code:
#! /bin/bash

zcat /proc/config.gz >/root/config.now
cp /root/config.now /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
cp .config /root/config.new
genkernel --menuconfig --install --kernel-config=/root/config.new  --bootloader=grub all
Back to top
View user's profile Send private message
HMC
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jul 2005
Posts: 79
Location: Australia

PostPosted: Mon Jul 22, 2013 1:32 pm    Post subject: Reply with quote

Tony0945 wrote:
This is the script that I use when there is a kernel update

Code:
#! /bin/bash

zcat /proc/config.gz >/root/config.now
cp /root/config.now /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
cp .config /root/config.new
genkernel --menuconfig --install --kernel-config=/root/config.new  --bootloader=grub all


Thanks,

I had been using something like this for some time, but I had little detour back to the Windows world (I need this to remind me why I changed in the first place) and didn't recreate it. It just surprised me that genkerel uses a different default to menuconfig. That seems to have changed sometime in the last 4 months or so.

The option used in my new genkernel-all script is: "--kernel-config=$PWD/.config" so that it points at the working directory.

There also seems to be changes for the better to the handling of /etc/genkernel.conf during updates, but I just went ahead and put all of the options in the script.

The only other task for that script is to rebuild modules (eg vbox) against the new kernel.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Mon Jul 22, 2013 11:05 pm    Post subject: Reply with quote

I have a script somewhere that does that, but it's not on this box. I'll look for it.

Meanwhile, if you use any binary X drivers that need to be linked or have emerged an update to X11, run this to rebuild all the X packages. It shouldn't take long. I often run it when in doubt as I hate to boot the new kernel and have it hang on X.

Code:
emerge -1 $(qlist -IC x11-drivers)


I got this command a few years ago from a member on this forum.
Back to top
View user's profile Send private message
HMC
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jul 2005
Posts: 79
Location: Australia

PostPosted: Tue Jul 23, 2013 9:29 am    Post subject: Reply with quote

Please, anyone doing an X upgrade should know that and you're entirely off on your own tangent.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Wed Jul 24, 2013 3:56 am    Post subject: Reply with quote

Sorry. Thought you were looking for help with build scripts.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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