Bug 906716

Summary: 41.1/SLE12-SP1: dracut breaks boot on missing swap volume
Product: [openSUSE] openSUSE Distribution Reporter: Marcos Mello <marcosfrm>
Component: BasesystemAssignee: Daniel Molkentin <daniel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: aschnell, bwiedemann, fvogt, oneukum, sfalken, trenn
Version: Leap 42.1Flags: daniel: needinfo? (bwiedemann)
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Marcos Mello 2014-11-23 13:16:43 UTC
I removed a hard drive containing a swap volume and my system does not boot anymore. It waits indefinitely for the missing swap device.

The behaviour (no timeout) was questioned by Thomas:

http://thread.gmane.org/gmane.linux.kernel.initramfs/3786

First, I tried omit 'resume' module without sucess. It took some time to find an apparently SUSEism nowaitforswap="yes" that fixed it.

I see this patch on Factory. But it does not appear to be applied on 13.2:

https://build.opensuse.org/package/view_file/openSUSE:Factory/dracut/0046-dracut-Do-not-wait-for-swap-device.patch?expand=1

So, for now, I think nowaitforswap="yes" must be assumed when we omit the 'resume' module at least (my server does not hibernate...).

dracut-037-17.6.1.x86_64
Comment 1 Thomas Renninger 2014-12-09 14:45:32 UTC
I agree, but:
- this is only needed in rare cases (like for you removed swap hard drive)
- it is really nasty to implement it, because of systemd generated mount units

Julian may have a look if there are no more important other issues anymore.
Not sure whether it is worth it to add this functionality.
Comment 2 Marcos Mello 2014-12-14 16:57:38 UTC
Yes, it is an unusual use case.

Hopefully upstream will fix it soon:

http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=e1e4ee9d7c
Comment 3 Oliver Neukum 2015-04-08 09:12:30 UTC
(In reply to Thomas Renninger from comment #1)
> I agree, but:
> - this is only needed in rare cases (like for you removed swap hard drive)

Unfortunately no, it isn't rare. The same issue arises if
you run mkswap during manual error recovery because the UUID
won't match anymore.
Comment 4 Bernhard Wiedemann 2016-10-05 08:34:59 UTC
I am hitting this on 42.1 atm.
using rd.debug I can see dracut-initqueue:32-52
being repeated for 180 seconds
and then the boot is still not progressing
not even with init=/bin/bash
Comment 5 Bernhard Wiedemann 2017-02-07 17:48:38 UTC
How about using the nofail mount option for the swap line in fstab?
or some equivalent.
Comment 12 Swamp Workflow Management 2017-05-18 16:22:16 UTC
SUSE-RU-2017:1333-1: An update that has 7 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1008648,1019938,1032576,1035743,906716,947670,955592
CVE References: 
Sources used:
SUSE Linux Enterprise Server 12-SP1 (src):    dracut-037-98.2
SUSE Linux Enterprise Desktop 12-SP1 (src):    dracut-037-98.2
Comment 13 Daniel Molkentin 2017-05-29 09:02:42 UTC
Fixed