Bug 13548

Summary: dracut initrd hang after kernel upgrade , using lvm2 as root device and regular device as /boot.
Product: Mageia Reporter: marco <ancillottim>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED OLD QA Contact:
Severity: major    
Priority: Normal CC: ancillottim, eeeemail, mageia, tmb
Version: 4   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: dracut-034-12.mga4.src.rpm CVE:
Status comment:

Description marco 2014-06-19 13:02:28 CEST
Description of problem:
I've update kernel from kernel-server-3.12.13-2.mga4-1-1.mga4 to kernel-server-3.12.20-1.mga4-1-1.mga4 ( and also .21 ) and my system stop boot at initrd.
I think it's a dracut problem , I've moved to lvm becouse of dracut was unable to boot from a raid 5 root , now at the first update I get a similar problem , I have some rhel system running with same config ( some with md raid , some with lvm ) and they work like a charm.


Some info:
- The system boot without any problem using old kernel ( and initrd )
- The /boot is located in a little dom of 128MB ( sde )
- The root fs is a raid5 lv built on a vg made by 4 sata pv.
- From the ramdisk shell running a simple "mkdir /mnt ; mount /dev/rootvg/rootlv /mnt" mount the root fs.


How reproducible:
Put the root fs on a lvm raid , also using normal device for /boot and rebuild dracut initrd with:
dracut -f /boot/initrd-3.12.21-server-2.mga4.img  3.12.21-server-2.mga4


Some log:
This is the output of initrd before hang on shell:
[   24.885672] input: HID 04b3:310b as /devices/pci0000:00/0000:00:1d.7/usb4/4-2
/4-2.4/4-2.4.3/4-2.4.3:1.0/input/input8
[   24.885783] hid-generic 0003:04B3:310B.0004: input,hidraw3: USB HID v1.00 Mou
se [HID 04b3:310b] on usb-0000:00:1d.7-2.4.3/input0
[   44.593807] dracut: Scanning devices sda2 sdb2 sdc2 sdd2  for LVM logical vol
umes rootvg/rootlv_rimage_0 rootvg/rootlv_rmeta_0 rootvg/rootlv_rimage_3 rootvg/
rootlv
[   44.626738] dracut: ACTIVE '/dev/rootvg/rootlv' [32.00 GiB] inherit
[   44.626862] dracut: inactive '/dev/rootvg/homelv' [200.00 GiB] inherit
[   44.626973] dracut: inactive '/dev/rootvg/vmlv' [150.00 GiB] inherit
[   44.627085] dracut: inactive '/dev/rootvg/savelv' [1.32 TiB] inherit
[   44.630476] dracut: PARTIAL MODE. Incomplete logical volumes will be processe
d.
[   44.657168] dracut: Unable to change internal LV rootlv_rimage_0 directly
[   44.657288] dracut: Unable to change internal LV rootlv_rmeta_0 directly
[   44.657401] dracut: Unable to change internal LV rootlv_rimage_3 directly
[   54.435864] dracut Warning: Could not boot.
[   54.438511] dracut Warning: /dev/rootvg/rootlv_rimage_0 does not exist
[   54.438965] dracut Warning: /dev/rootvg/rootlv_rimage_3 does not exist
[   54.439412] dracut Warning: /dev/rootvg/rootlv_rmeta_0 does not exist
+ '[' -f /run/initramfs/init.log ']'


Reproducible: 

Steps to Reproduce:
marco 2014-06-19 21:32:19 CEST

CC: (none) => ancillottim

claire robinson 2014-06-24 00:41:47 CEST

CC: (none) => eeeemail, tmb

Thierry Vignaud 2014-06-27 15:36:30 CEST

CC: (none) => mageia

Comment 1 marco 2014-07-07 12:32:53 CEST
Anyone ??
Comment 2 claire robinson 2014-07-07 12:56:43 CEST
Are you looking for a bugfix or workaround? This being bugzilla rather than forums, a bugfix takes time. 

If you want to try a workaround: 

You may need dracut to build a host-only initrd. There is a short non-obvious message about this when you rebuild an initrd. You can force the generation of a host-only initrd by exporting DRACUT_SKIP_FORCED_NON_HOSTONLY=1 before using dracut.

I had an issue with swap on lvm a few months ago after repartitioning a second drive /dev/sdb which had previously had swap space on it. I'll copy the end of the conversation here for you.

----------

On 15/04/14 18:26, Colin Guthrie wrote:
>> I found the files you mentioned but no obvious fault there, just
>> reference to to the swap on lvm, and dracut.conf shows it should be
>> making a hostonly initrd.
>>
>> The main problem seems to be it not creating a hostonly initrd, even
>> with -H and so failing, 'Unable to boot', due to missing
>> /dev/non-hostonly-lvm so it then can't find the logical volumes (not up
>> to speed with lvm terminology yet but I think that's right!) so has no root.
>>
>> It says it's 'due to distro upgrade' and to add
>> DRACUT_SKIP_FORCED_NON_HOSTONLY=1 to force it, but doesn't say where. It
>> looks it might be an environment variable so I'll try exporting it on
>> next attempt.
>
>
> Oh yes, you likely need to bind mount /run too. dracut checks for
> /run/initramfs file (which indicates "booted via dracut-generated
> initrd") and automatically switches to non-hostonly mode. Dracut needs
> to have access to the udev database and during the mga1->2 cycle lvms
> were not initialised properly in the initrd (well they were inited OK,
> but it was porior to udev starting and thus critical metadata was
> missing which caused dracut to fail). The upgrade needed non-host-only
> initrds in order to upgrade smoothly. Once booted with this initrd it
> should be fine.
>
> An interesting question is why a non-host-only initird doesn't work for
> you. This should work fine and allow you to boot.
>
> The /dev/non-hostonly-lvm is a bit of a hack to ensure we bring up
> devices properly in non-hostonly mode. It was needed for /usr if it is
> on LVM. It should automatically timeout and cancel itself but I guess
> this is no longer working.
>
> Anyway, if you get the hostonly initrd working then that should be fine.
>
> Otherwise I'll help you get it working again, but can't until tomorrow
> as heading out shortly.
>
> Longer term, there is better news as I've seem commits that actually
> make dracut more robust against udev in this case which should make some
> of these (apparently fragile) hacks to cover corner cases no longer needed.
>
> Col
>

Thanks for your help Colin, it's back up and running \o/

Once I'd exported DRACUT_SKIP_FORCED_NON_HOSTONLY=1, dracut created a hostonly initrd and it rebooted normally. Wish I'd noticed that before.

Phew!

Claire 

----------
Comment 3 marco 2014-07-10 23:18:30 CEST
no way , also rebuilding initrd after exporting the variable I get the same result.

I'll wait for a bugfix.

Also strange is that working initrd based on 3.12.13 is ~ 10MB , the non working based on 3.12.21 is only 3MB.
Comment 4 claire robinson 2014-07-11 09:03:17 CEST
Did you remember to bind mount run (and the rest) before creating the initrd ?
Comment 5 Samuel Verschelde 2015-09-21 13:18:43 CEST
Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we weren't 
able to fix it before Mageia 4's end of life. If you are able to reproduce it 
against a later version of Mageia, you are encouraged to click on "Version" and 
change it against that version of Mageia. If it's valid in several versions, 
select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/
Comment 6 Marja Van Waes 2015-10-27 06:56:11 CET
As announced over a month ago, Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer maintained, which means that it will not receive any further security or bug fix updates.

This issue may have been fixed in a later Mageia release, so, if you still see it and didn't already do so: please upgrade to Mageia 5 (or, if you read this much later than this is written: make sure you run a currently maintained Mageia version)

If you are able to reproduce it against a maintained version of Mageia, you are encouraged to 
1. reopen this bug report, by changing the "Status" from "RESOLVED - OLD" to "REOPENED"
2. click on "Version" and change it against that version of Mageia. If you know it's valid in several versions, select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.
3. give as much relevant information as possible. If you're not an experienced bug reporter and have some time: please read this page:
https://wiki.mageia.org/en/How_to_report_a_bug_properly

If you see a similar issue, but are _not_sure_ it is the same, with the same cause, then please file a new bug report and mention this one in it (please include the bug number, too). 


If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].
[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/

Status: NEW => RESOLVED
Resolution: (none) => OLD