Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel 3.0.3 blind shot with genkernel?
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
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Tue Aug 23, 2011 10:06 am    Post subject: kernel 3.0.3 blind shot with genkernel? Reply with quote

Hi,
I bet my newly build 3.0.3 kernel will fail to start my machine if I do the following:

Code:

make allmodconfig
genkernel all
 



I did the above many times on different kernels and it would always fail with a message that the root device could not be found.

Wasn't genkernel created for the purpose to start any machine with minimal effort with its initramfs and a bare kernel?

what am I doing wrong?

My thinking is that even if the IDE/SATA is not compiled in the kernel it will nevertheless be there to see the drive and the root partition because
initramfs has it as a module, right? and it will be loaded automatically...
Is a separate knowledge needed on behalf of a user for a machine to start?
I guess not because all livedvds out there start without that knowledge...

where should I be looking for guidance?

thanks

Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Aug 23, 2011 12:04 pm    Post subject: Reply with quote

I don't use the genkernel configurations - I manage my own. So when I started moving to gentoo-sources-3.0.3 I began with my last working configuration and tweaked that for new or changed items. My kernel booted just fine - I seldom have troubles with non-booting kernels, simply because I always start from a working configuration.

Lacking your own starting configuration, I'd suggest looking into "Pappy's Kernel Seeds", well represented here in the forums.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Aug 23, 2011 7:33 pm    Post subject: Reply with quote

I assume you did so, but just in case, did you look at your grub.conf file and see if the stanza for the new kernel was correct?

Maybe all that's wrong is it needs a little edit (compare it with your working kernels).

Also look in /lib/modules and /boot to see if you even have the new kernel and modules installed.

You can also use the .config file from your working kernel, and do it manually.

Just copy it over to the new kernel's source directory (usually /usr/src/linux-whatever), and cd into that directory.

Then edit the makefile at the top and name the extraversion anything you like, which will make the kernel and module directory have new names.

Code:
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 0
EXTRAVERSION = -custom

Then just do make bzImage, and if that goes well do make modules, and then make modules_install.

If all goes well, copy the kernel with
Code:
cp arch/x86/boot/bzImage /boot/3.0.0-custom
(or name it anything you like, but I always use whatever is at the end of "make modules_install" as it will insure the kernel can find the correct modules).

Then add a new stanza for the new kernel in grub.conf. It might not be perfect for kernel 3.0.0, but it will likely boot and run OK. You can always recompile it later and tune it up some.

IMPORTANT! Keep in mind this is for manually configuring kernels that don't need an initrd.img file to boot (just make sure all required stuff is already configured in the kernel itself. There are a few things that can't compiled as modules, and MUST be compiled directly in the kernel in order to boot.

If you've never done it before, and have only used genkernel which IIRC creates an initrd.img, your .config file might not include some needed stuff.

You'll probably need to create an initrd.img for the new kernel. As I recall, it's pretty easy- just one more command at the end of the kernel compiling process (Haven't done an initrd.img in 10 years, so can't recall offhand the exact command- think it's mkinitrd). In any case, it's usually just for nice splash screens.

On the other hand, take a look at this: https://forums.gentoo.org/viewtopic-t-822186-start-0.html For me, initrd isn't worth the trouble.

I keep it simple in grub.conf, and all I've needed for my manually compiled kernels is something like:
Code:
title=[2.6.39-rc4
root (hd0,0)
kernel /boot/2.6.39-rc4-git1 root=/dev/sda3

If I'm using KMS I'll add video=1280x1024-24@75 to the kernel line so I can read the boot-up output better, if I need to.

I agree with depontius- if all the above seems to much trouble, look into Pappy's seeds.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 608
Location: Würzburg, Deutschland

PostPosted: Wed Aug 24, 2011 8:49 am    Post subject: Reply with quote

I agree with despontius and wrc1944: if you are building your kernel yourself (in gentoo you always do) for one specific machine and don't have any special requirements like an encrypted root, an initrd is not worth the trouble. Configure yourself a kernel which has everything needed for boot (disk controller and file systems) built-in, take some time to tweak the configuration, and you should be fine. Tweaking might take some time, but it is not half as subtle as many people seem to think, and once you are done, you can copy the config to any new kernel you will be compiling, do "make oldconfig" and then only adjust any new or modified settings (if you activate CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC, you can access the configuration of the running kernel directly under /proc/config). This way, updating a kernel is near-trivial most of the time, and you will only rarely get any bed surprises.
Back to top
View user's profile Send private message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Wed Aug 24, 2011 3:09 pm    Post subject: Reply with quote

Thank you guys for your input. It did start (the 3.0.3 kernel) but not out of the box.
Using Pappy's seeds allowed me to start faster than "make defconfig", that's for sure.
I am not happy, though. Of the many things that start "red" - meaning "fail" two things bother me.
my /home is an lvm volume. It gets booted but some strange messages come up. Of the top of my head:
LVM some link should've been created, it would not ovewright it".

Also iptables do not start - but that i know how to fix: probably some more settings should be turned on in the kernel.


Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
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