[SOLVED] problems with kernel upgrade and dracut

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] problems with kernel upgrade and dracut

Postby magfan » Aug 27th, '12, 09:34

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?
Last edited by magfan on Aug 28th, '12, 07:50, edited 1 time in total.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: problems with kernel upgrade and dracut

Postby Ken-Bergen » Aug 27th, '12, 09:49

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.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: problems with kernel upgrade and dracut

Postby magfan » Aug 27th, '12, 09:53

Great! How can I do it?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: problems with kernel upgrade and dracut

Postby Ken-Bergen » Aug 27th, '12, 10:09

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.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: problems with kernel upgrade and dracut

Postby magfan » Aug 27th, '12, 13:20

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.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: problems with kernel upgrade and dracut

Postby macxi » Aug 27th, '12, 14:05

Hi,

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

macxi
 
Posts: 462
Joined: Apr 22nd, '11, 02:54
Location: Portugues of Brazil

Re: problems with kernel upgrade and dracut

Postby magfan » Aug 27th, '12, 15:10

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.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest