Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] New kernel does not boot
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
majoron
Apprentice
Apprentice


Joined: 12 Oct 2005
Posts: 239
Location: Frankfurt

PostPosted: Mon Nov 12, 2018 2:09 pm    Post subject: [solved] New kernel does not boot Reply with quote

Hi,
I have a new PC and I'm having troubles to find a proper kernel config: the kernel does not boot. But I don't know why. It only powers off the computer. There must be some options that prevent the kernel from even being loaded, but no idea of what can it be.

I have tried to run the kernel with kexec, but the kernel provided by the Gentoo installation CD does not allow me to run kexec :?

Any ideas?

BR
_________________
Computers are like air conditioners, they stop working properly if you open Windows


Last edited by majoron on Wed Nov 14, 2018 11:56 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54274
Location: 56N 3W

PostPosted: Mon Nov 12, 2018 3:10 pm    Post subject: Reply with quote

majoron,

Please start with SystemRescueCD. Its Gentoo based.
Either on a CD or a USB stick.

Is this a computer you assembled yourself?
Has it ever done anything except power off ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Cuong Nguyen
Apprentice
Apprentice


Joined: 18 Jan 2018
Posts: 152

PostPosted: Mon Nov 12, 2018 4:10 pm    Post subject: Reply with quote

NeddySeagon,

Is it OK to build new kernel and initramfs with genkernel --all-ramdisk-modules --firmware to make sure vmlinuz will load any modules that not binary compiled into the kernel?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54274
Location: 56N 3W

PostPosted: Mon Nov 12, 2018 4:24 pm    Post subject: Reply with quote

Cuong Nguyen,

Yes.

You will get a big bloated initrd but that won't matter.

genkernel does not build every module in the kernel. It has its own .config file that it uses.
I don't know if it supports NVMe yet, so NVMe users should use the --menuconfig option to check.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Cuong Nguyen
Apprentice
Apprentice


Joined: 18 Jan 2018
Posts: 152

PostPosted: Mon Nov 12, 2018 7:03 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Cuong Nguyen,

Yes.

You will get a big bloated initrd but that won't matter.

genkernel does not build every module in the kernel. It has its own .config file that it uses.
I don't know if it supports NVMe yet, so NVMe users should use the --menuconfig option to check.


Thank you NeddySeagoon

I am still a bit confused to decide whether to put modules into the kernel or just as loadable? What is the rule of thumb here? Can you give some recommendations? I usually borrow kernel config from binary distro like Arch and follow Gentoo Wiki to set configs for special needs like aufs, lvm over luks. Arch Linux puts most of the modules as on disk loadable just like "make allmodconfig".

Is there any tool to debug kernel loading process? Sometimes I got booting stucks and don't know why, so I just opt to release compiler optimizations like march=native to march=x86-64, making lots for trial and error, getting lost along the path.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54274
Location: 56N 3W

PostPosted: Mon Nov 12, 2018 7:42 pm    Post subject: Reply with quote

Cuong Nguyen,

My rules of thumb are to build everything needed to boot, into the kernel.
That way, either no initrd is required, or if you need user space tools to a assemble raid and start LVM, like I do, the initrd does not contain any kernel modules.
That means that the initrd need not be rebuilt for kernel updates. Its just like firmware.

Next everything needed after boot should be a loadable module. This isn't hard and fast.
e.g. I could make amdgpu as a module but I like an early console, so I have amdgpu and its 20 firmware files built into the kernel.

Anything you always use can be built in too, even things you load with module parameters.
Module parameters can be passed on the kernel command line. Modules are much better than built in for parameter trial and error.

Lastly, things you won't need, turn off. Good use of the menu system in the kernel config tools will save a lot of time.
When you turn off a menu, the options on that menu assume sensible default values, usually off.
The example here is if you don't have a TV Tuner, turn the menu off. Don't read all the options and turn them off one by one.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Cuong Nguyen
Apprentice
Apprentice


Joined: 18 Jan 2018
Posts: 152

PostPosted: Tue Nov 13, 2018 3:06 am    Post subject: Reply with quote

NeddySeagoon wrote:

My rules of thumb are to build everything needed to boot, into the kernel.
That way, either no initrd is required, or if you need user space tools to a assemble raid and start LVM, like I do, the initrd does not contain any kernel modules.
That means that the initrd need not be rebuilt for kernel updates. Its just like firmware.


Thank you, more than a year with Gentoo and I am still on the way to maximize its customization capability which helps me a lot in learning the OS. Being scared of not booting I turn on all modules as loadable and include all + firmwares in initrd Kernel is small but initramfs is quite big up to 200MB xz compressed.

Maybe I will start soon next round of gentoo experiment starting from "make tinyconfig" and topup necessary modules into kernel and initrd.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54274
Location: 56N 3W

PostPosted: Tue Nov 13, 2018 10:56 am    Post subject: Reply with quote

Cuong Nguyen,

See kernel seeds for the method and Pappy's preconfigs! for more up to date 'seed' .config files.
The first link is unmaintained but the method is still good.

Keep several kernels, everyone make one that won't boot sometime and its easier go use the grub menu to fix things than find your boot media and do the mounts and chroot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
majoron
Apprentice
Apprentice


Joined: 12 Oct 2005
Posts: 239
Location: Frankfurt

PostPosted: Wed Nov 14, 2018 11:55 am    Post subject: Reply with quote

NeddySeagoon wrote:
majoron,

Please start with SystemRescueCD. Its Gentoo based.
Either on a CD or a USB stick.

Is this a computer you assembled yourself?
Has it ever done anything except power off ?


Hello,
sorry for the sloppy description.
I had follwed the Gentoo Handbook and compiled a kernel, so yes, the system can boot with a pendrive containing the minimal installation image.

When the system was required to boot without the pendrive, from the newly installed kernel, it only halted the system.

I solved it.
I had made a mistake in the "Built-in kernel command line" option (CONFIG_CMDLINE): I'm using UEFI and I need this, but I wrote a wrong PARTUUID there :oops:

Thank you anyway.
_________________
Computers are like air conditioners, they stop working properly if you open Windows
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