Bug 851362

Summary: anaconda-generator fails to source in dracut-lib.sh, missing from /run/initramfs/
Product: [Fedora] Fedora Reporter: Jesse Keating <jkeating>
Component: anacondaAssignee: David Cantrell <dcantrell>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: anaconda-maint-list, dcantrell, g.kaviyarasu, hamzy, harald, jonathan, vanmeeuwen+fedora, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lorax-18.20-1.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-16 19:24:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jesse Keating 2012-08-23 22:49:07 UTC
anaconda-generator runs after the pivot, but uses some dracut functionality.  It tries to source in /run/initramfs/usr/lib/dracut-lib.sh but that doesn't exist, so the call to getargbool fails.

Not sure why that part of the initramfs went away, maybe cleanup for memory.

This bug manifests itself in no longer being able to cause the ssh server to start.

Comment 1 Jesse Keating 2012-08-23 22:52:33 UTC
Ah hah.  It's the anaconda-cleanup-initramfs service that does it.

mkdir -p /boot
initramfs=/boot/initramfs-$(uname -r).img
find /run/initramfs/usr | cpio -co 2>/dev/null | $gzip -c > $initramfs
rm -rf /run/initramfs/usr

Maybe if we run this service /after/ the generator?

Comment 2 Jesse Keating 2012-08-24 16:47:08 UTC
Incorrect assumption.  The clean up script doesn't whack it, the file doesn't exist in the first place.  Dracut images are no longer being ran with a --prefix, so all the content is directly in /, so there is nothing for anaconda to find in /run/initramfs/ any more.

Not sure what is going to need to be changed here to make this work again.

Comment 3 Will Woods 2012-08-24 18:12:48 UTC
In F17 we ran dracut with '--prefix /run/initramfs' to make the initramfs available after switch_root. This is disallowed by dracut in F18.

So: is there a way to make the initramfs available after switch-root in F18 dracut? Or should we move anything that we want to persist after switch-root to /run/initramfs/state? Or some other location?

Comment 4 Harald Hoyer 2012-09-06 12:20:52 UTC
(In reply to comment #3)
> In F17 we ran dracut with '--prefix /run/initramfs' to make the initramfs
> available after switch_root. This is disallowed by dracut in F18.
> 
> So: is there a way to make the initramfs available after switch-root in F18
> dracut? Or should we move anything that we want to persist after switch-root
> to /run/initramfs/state? Or some other location?

Do you need the initramfs version? Or can you just install the dracut package in the anaconda image and have /usr/lib/dracut/... ?

Of course you can still copy files to /run/initramfs as you need them.

Comment 5 Jesse Keating 2012-09-06 22:36:53 UTC
We decided to add the dracut-lib.sh file back into stage2 and make use of it from there.  Lorax and anaconda patches sent.

Comment 6 Fedora Update System 2012-09-08 00:21:49 UTC
lorax-18.18-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/lorax-18.18-1.fc18

Comment 7 Fedora Update System 2012-09-08 19:24:39 UTC
Package lorax-18.18-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lorax-18.18-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-13600/lorax-18.18-1.fc18
then log in and leave karma (feedback).

Comment 8 Mark Hamzy 2012-09-11 18:36:10 UTC
[anaconda root@sharpie /]# ls /run/initramfs/usr/lib/dracut-lib.sh
ls: cannot access /run/initramfs/usr/lib/dracut-lib.sh: No such file or directory

Comment 9 Jesse Keating 2012-09-11 18:46:41 UTC
(In reply to comment #8)
> [anaconda root@sharpie /]# ls /run/initramfs/usr/lib/dracut-lib.sh
> ls: cannot access /run/initramfs/usr/lib/dracut-lib.sh: No such file or
> directory

The lorax update has to go with an anaconda update to use it from the new location.  That's on master, so it'll be post-alpha for this issue to be fixed.

Use of an updates.img containing commit e8ff240f953963a8b6cbc2d0c54a5b7b1493c29f from master should work though.

Comment 10 Mark Hamzy 2012-09-11 19:20:42 UTC
[root@bluebill anaconda]# git cherry-pick e8ff240f953963a8b6cbc2d0c54a5b7b1493c29f
[detached HEAD 5771646] Use the real path to dracut-lib.sh (#851362)
 Author: Jesse Keating <jkeating>
 1 file changed, 1 insertion(+), 1 deletion(-)
[root@bluebill anaconda]# make updates && scp updates.img root.ibm.com:/var/www/html/updates-newui.img
Using tag: anaconda-18.6.6-1
Including data/systemd/anaconda-generator
5 blocks
 64.9%
updates.img ready


boot: linux vnc ip=9.5.250.145::9.5.250.1:255.255.255.0:sharpie.rchland.ibm.com:eth0:none ip=9.5.252.203::9.5.252.1:255.255.255.0::eth1:none nameserver=9.10.244.100 bootdev=eth0 sshd=1 live.updates=http://chukar.rchland.ibm.com/updates-newui.img


[hamzy@hamzy-tp-w510 ~]$ ssh root.ibm.com
ssh: connect to host sharpie.rchland.ibm.com port 22: Connection refused

Comment 11 Jesse Keating 2012-09-11 21:15:28 UTC
Hrm, can you run /updates/lib/systemd/system-generators/anaconda-generator (with sh -x) and post the output here?

It should be looking for /usr/lib/dracut/modules.d/99base/dracut-lib.sh

Comment 12 Jesse Keating 2012-09-11 23:15:28 UTC
Never mind, I ran this myself.  The lorax version needed to make this work is still in updates-testing.  I'm not sure if it was used to create RC2 or not.  Probably not as this isn't a blocker bug.

Comment 13 Fedora Update System 2012-09-17 19:43:36 UTC
lorax-18.19-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/lorax-18.19-1.fc18

Comment 14 Fedora Update System 2012-09-19 15:03:58 UTC
lorax-18.20-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/lorax-18.20-1.fc18