I downloaded a newer-than-suse kernel source from kernel.org and did ‘sudo make install’. The kernel and modules were built,
and copied to /boot. But no matching initrd was created, and thus the kernel won’t boot.
I looked at docs for dracut, etc., and noticed the original initrd has a set of about 15-20 modules, with various modules left out.
I also observed that the latest kernel update has an initrd.
It will take me some time to figure out how to use dracut to duplicate the opensuse modules list. I am guessing thee list will not
be identical to that produced by ‘dracut --hostonly’.
Is there a script anywhere that would do the kernel build and make a matching initrd?
Hi, assuming that you can boot your 42.2 system with a “standard” kernel and you just want an initrd to boot the same system with your newly built (and already installed) kernel, simply issuing the following in a superuser terminal will do the trick:
dracut --kver <your new kernel version here>
If your needs are different you should describe them in detail (and possibly wait for an answer by a kernel expert…)
But please be aware that newer kernels already configured for Leap are available here: http://download.opensuse.org/repositories/Kernel:/stable/standard and their installation will trigger the build process for a matching initrd.
Sorry, modules should be in lib/modules, but they didn’t get there for my 4.10 build. I have kernel source in my home tree, which is customary for embedded cross development using ARM, etc.
Possibly this is an issue. I did ‘sudo make -n modules install’; the copying appears to be done by scripts/mod/modpost, which is an executable.
There are quite a few versions in the list of packages. All of them are 4.10+, which is what I need. Which one is best for someone who wants to work with new drivers and dbus, and not modify the kernel?
Oops, I misread previous msg. ‘sudo make modules_install’ placed the modules in lib/modules.
Then ‘sudo dracut --kver 4.10.0-11’ built the initrd and placed it under /boot. It did emit a lot of messages about missing modules,
but ‘sudo lsinitrd -m’ shows the same modules as in 4.49.16-default.
However the result didn’t boot.
So I might be better to switch to one of the kerrnels in the repo. Is there any documentation concerening the changes or goals of changing?
|
|
| Some mce errors output for all kernels
|
|
[1.79xxxx] Kernel panic - not syncing VFS; unable to mount root fs on unknown-block(0,0)
[1.79xxxx] CPU: 1 PID: 1 …
[1.79xxxx] Hardware name: Dell …
[1.79xxxx] Call Trace
[1.79xxxx] dump_stack+…
[1.79xxxx] panic+…
[1.79xxxx] mount_block_root+…
[1.79xxxx] prepare_namespace+…
[1.79xxxx] kernel_init_freeable+…
[1.79xxxx] ? set_debug_rodata+…
[1.79xxxx] ? rest_init+…
[1.79xxxx] kernel_init+…
[1.79xxxx] ret_from_fork+…
[1.79xxxx] Kernel Offset: disabled
[1.79xxxx] — end Kernel Panic - …
My current thinking is to switch to one of the suse kernels mentioned above, instead of investing a lot of time investigating why the one built from kernel.org source doesn’t.
BTW I configured the kernel by ‘make oldconfig’ and entering no to all the new features it reported. The new feature I need was hardwired to be included in the kernel.
After switching to suse 4.4.49-16 source I found the build scripts run dracut automatically to build the initrd.
This is the simplest solution to my original problem.