Bug 1288769 - Failure to restore initramfs results in corrupted raid set on shutdown/reboot
Summary: Failure to restore initramfs results in corrupted raid set on shutdown/reboot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-05 22:35 UTC by Rolf Fokkens
Modified: 2016-01-10 19:23 UTC (History)
4 users (show)

Fixed In Version: dracut-043-63.git20151211.fc23
Clone Of:
Environment:
Last Closed: 2016-01-10 19:23:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rolf Fokkens 2015-12-05 22:35:09 UTC
Description of problem: Since upgrading tot F23 my PC always boots repairing its mdraid 5 set. Further investigation showed that no pivot_root to initramfs happens.

Version-Release number of selected component (if applicable):
dracut-043-61.git20151120.fc23.x86_64

How reproducible: 100% for me


Steps to Reproduce:
1. upgrade Fedora 22 -> Fedora 23 (or just install Fedora 23, I'm not sure)
2. Build a rootfs on an mdraid set
3. Reboot
4. Notice the mdraid rebuild after boot

Actual results:
Always mdraid rebuild after (re)boot.

Expected results:
No mdraid rebuild after (re)boot

Additional info:
The issue seems to be cause by the fact that /usr/lib/dracut/dracut-initramfs-restore fails. It specifically fails on the line "mount -o ro /boot &>/dev/null" which makes sense (on my system) because /boot is booted already. The "set -e" command earlier forces the dracut-initrams-restore to bail out.

A workaround on my system is to do "mount -o remount,ro /boot &>/dev/null" instead. But I'm not sure what the intention of the mount is, if the intention is just to make sure that /boot is mount a proper solution might be "mount -o ro /boot &>/dev/null || true"

Comment 1 Rolf Fokkens 2015-12-10 16:14:57 UTC
My laptop has no mdraid, but suffers from the same issue:

[root@localhost ~]# journalctl -u dracut-shutdown
...
-- Reboot --
Dec 10 15:57:05 localhost.localdomain systemd[1]: Starting Restore /run/initramfs on shutdown...
Dec 10 15:57:05 localhost.localdomain systemd[1]: Started Restore /run/initramfs on shutdown.
Dec 10 16:01:35 localhost.localdomain systemd[1]: Stopping Restore /run/initramfs on shutdown...
Dec 10 16:01:36 localhost.localdomain systemd[1]: dracut-shutdown.service: Control process exited, code=exited status=32
Dec 10 16:01:36 localhost.localdomain systemd[1]: Stopped Restore /run/initramfs on shutdown.
Dec 10 16:01:36 localhost.localdomain systemd[1]: dracut-shutdown.service: Unit entered failed state.
Dec 10 16:01:36 localhost.localdomain systemd[1]: dracut-shutdown.service: Failed with result 'exit-code'.
Dec 10 16:01:36 localhost.localdomain dracut-initramfs-restore[3600]: mount: /dev/sda2 is already mounted or /boot busy
Dec 10 16:01:36 localhost.localdomain dracut-initramfs-restore[3600]: /dev/sda2 is already mounted on /boot

After fixing this:

-- Reboot --
Dec 10 16:45:32 localhost.localdomain systemd[1]: Starting Restore /run/initramfs on shutdown...
Dec 10 16:45:32 localhost.localdomain systemd[1]: Started Restore /run/initramfs on shutdown.
Dec 10 16:49:11 localhost.localdomain systemd[1]: Stopping Restore /run/initramfs on shutdown...
Dec 10 16:49:13 localhost.localdomain systemd[1]: Stopped Restore /run/initramfs on shutdown.

Comment 2 Rolf Fokkens 2015-12-14 13:20:12 UTC
Seems to be fixed upstream since July:
https://github.com/haraldh/dracut/commit/da5304aabcb7c1b541a8eeabc69627f05ad47c09

Comment 3 Fedora Update System 2016-01-08 11:03:04 UTC
dracut-043-63.git20151211.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7ca7599efc

Comment 4 Fedora Update System 2016-01-09 04:27:04 UTC
dracut-043-63.git20151211.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7ca7599efc

Comment 5 Fedora Update System 2016-01-10 19:23:49 UTC
dracut-043-63.git20151211.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.