Bug 851362 - anaconda-generator fails to source in dracut-lib.sh, missing from /run/initramfs/
anaconda-generator fails to source in dracut-lib.sh, missing from /run/initra...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-23 18:49 EDT by Jesse Keating
Modified: 2013-01-09 22:36 EST (History)
8 users (show)

See Also:
Fixed In Version: lorax-18.20-1.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-16 15:24:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jesse Keating 2012-08-23 18:49:07 EDT
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 18:52:33 EDT
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 12:47:08 EDT
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 14:12:48 EDT
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 08:20:52 EDT
(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 18:36:53 EDT
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-07 20:21:49 EDT
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 15:24:39 EDT
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 14:36:10 EDT
[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 14:46:41 EDT
(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 15:20:42 EDT
[root@bluebill anaconda]# git cherry-pick e8ff240f953963a8b6cbc2d0c54a5b7b1493c29f
[detached HEAD 5771646] Use the real path to dracut-lib.sh (#851362)
 Author: Jesse Keating <jkeating@redhat.com>
 1 file changed, 1 insertion(+), 1 deletion(-)
[root@bluebill anaconda]# make updates && scp updates.img root@chukar.rchland.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@sharpie.rchland.ibm.com
ssh: connect to host sharpie.rchland.ibm.com port 22: Connection refused
Comment 11 Jesse Keating 2012-09-11 17:15:28 EDT
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 19:15:28 EDT
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 15:43:36 EDT
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 11:03:58 EDT
lorax-18.20-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/lorax-18.20-1.fc18

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