Page 1 of 1

[SOLVED] problems with kernel upgrade and dracut

PostPosted: Aug 27th, '12, 09:34
by magfan
I have several problems with the new kernel upgrade and dracut.

After upgrading from kernel-server-3.3.6 to kernel-server-3.3.8 I could successfully boot only once. From the second time on booting fails. Unfortunately, wrong links are not the main reason although there are also present (https://forums.mageia.org/en/viewtopic.php?f=7&t=3375&p=24966&hilit=kernel+upgrade#p24966). But the system does not boot even if I use the correct config and System.map files.

I thought I could easily create a new initrd with dracut, but here I run into a bunch of problems because dracut uses the running kernel. In case of the Mageia-2-Rescue-CD this is kernel-desktop-3.3.6. So, I cannot create a new initrd for any of the installed kernels (kernel-server-3.3.*). For this I would have to boot the desired kernel which I cannot...

On my other workstation the situation is even worse, because there I have to explicitly load the megaraid_sas module already for the installation of Mageia 2. And if I have to make any changes to the initrd via dracut I have to include megaraid_sas manuallly. Since the module st for tape drives is not included automatically I will have to call dracut for sure. My first attempt to create a initrd with dracut -f --add-drivers "megaraid_sas st" was not successful: the system does not boot...

How could I solve these problems?

Re: problems with kernel upgrade and dracut

PostPosted: Aug 27th, '12, 09:49
by Ken-Bergen
but here I run into a bunch of problems because dracut uses the running kernel.
Only by default. You can specify any installed kernel and have a new initrd built for it.

Re: problems with kernel upgrade and dracut

PostPosted: Aug 27th, '12, 09:53
by magfan
Great! How can I do it?

Re: problems with kernel upgrade and dracut

PostPosted: Aug 27th, '12, 10:09
by Ken-Bergen
magfan wrote:Great! How can I do it?
I'm running Mageia 1 at the moment so don't have dracut but
Code: Select all
man dracut
should give you an idea.

Re: problems with kernel upgrade and dracut

PostPosted: Aug 27th, '12, 13:20
by magfan
Well, it seems that the following line will do what I want:
Code: Select all
# dracut --add-drivers "megaraid_sas st" initrd-test.img 3.3.8-server-2.mga2

At least the required modules are included which is not the case with initrd-3.3.8-server-2.mga2.img
Code: Select all
# lsinitrd /boot/initrd-test.img | grep sas
-rw-r--r--   1 root     root        33108 Jul 31 00:10 lib/modules/3.3.8-server-2.mga2/kernel/drivers/scsi/megaraid/megaraid_sas.ko.xz
-rw-r--r--   1 root     root        12296 Jul 31 00:10 lib/modules/3.3.8-server-2.mga2/kernel/drivers/scsi/scsi_transport_sas.ko.xz
-rw-r--r--   1 root     root        27584 Jul 31 00:09 lib/modules/3.3.8-server-2.mga2/kernel/drivers/message/fusion/mptsas.ko.xz
#


I am waiting for a good moment to reboot. There are too many people logged in right now.

Re: problems with kernel upgrade and dracut

PostPosted: Aug 27th, '12, 14:05
by macxi
Hi,

The site "The Inquirer" published a text about this subject:


Re: problems with kernel upgrade and dracut

PostPosted: Aug 27th, '12, 15:10
by magfan
macxi wrote:Hi,

The site "The Inquirer" published a text about this subject:



Yes, I also found this article following the link in my first posting. But my problem is different. In my case the initrd itself does not contain required kernel modules. My mistake was that I assumed that the option "--add-drivers" would simply add specific drivers to an existing initrd. But what really happens is that dracut re-creates the initrd and adds the specified driver. What I did not know is that it does not include all required modules of the currently running kernel by default. Therefore, after adding the module st for tape drives a ramdisk without megaraid_sas support was created. So, the boot device (LSI MegaRAID SAS) was not found.