Gentoo Archives: gentoo-user

From: Gregory Shearman <zekeyg@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] genkernel 2 manual
Date: Tue, 23 Oct 2012 22:59:56
Message-Id: 20121023225825.GA8424@pacific.net.au
In linux.gentoo.user, you wrote:
> > I've been using Gentoo for quite a long time, and today I decided to try > compiling the kernel myself, Thing I've never done before. I want a smaller > kernel, a faster boot (without initramfs) and, of course, some fun :).
Good for you. I've rolled my own kernels for around 15 years, but I still use genkernel to build me an initramfs. I require the initramfs because: a) I've got my root filesystem on an LVM partition. b) I've got my /usr directory on a separate partition. This is not a problem, yet, but the udev update is coming! c) I like a fancy boot splash screen during early boot. I'm not that fond of using genkernel to build my initramfs, but it works. I'll probably switch to dracut when it becomes more stable.
> I'm still reading the oficial documentation, but I don't think it will be > enough, so, if anyone of you know some documentation more detailed, I'd > appreciate reading it.
What do you mean by "official documentation"? Do you include the information in the Documentation directory in your latest kernel? Have you tried: $make menuconfig This gives you a good interface for configuring your kernel. If you hit "/" you'll get a search function and there are "help" options for just about every feature you want to include in your new kernel.
> I've just ran 'make xconfig', and I noticed that the configuration is the > same from genkernel (genkernel --menuconfig). Is it good? Should I get an > original .conf, with less garbage, or this is just the 'normal default' > instead of 'genkernel default' as I'm guessing?
I usually start from scratch with a new machine, but in your case you should be able to use your old genkernel .config file and then pare it down to what you require ie what works.
> Is there any tool that can scan my pc and help me out with the .conf or > even generate one? I guess not. There are lots of options that I have no > idea what they are for. I think this will be the fun part, but I think I > can't get a running kernel before I optimize it, so I can do it gradually.
I have had reasonable success with "lshw" (sys-apps/lshw). It generates a list of the hardware on your machine. Unfortanately it won't produce a .config file for you. One option that makes subsequent kernels easier to produce is: CONFIG_IKCONFIG Kernel .config support This feature provides copy of your current Kernel's .config file at /proc/config.gz which you can then extract and use on your new kernel by doing: $ zcat /proc/config.gz > <new-kernel-directory>/.config $ cd <new-kernel-directory> $ make oldconfig
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
3.7MB Yep.. it's bigger than your genkernel generated kernel... 8-) Remember, the first kernel you produce on your own will take a bit of effort, but subsequent kernels are easy. -- Regards, Gregory.