Bug 788141

Summary: --initrd-inject=ks.cfg doesn't work with F17 anaconda
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: berrange, crobinso, jforbes, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-13 22:28:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kamil Páral 2012-02-07 15:15:29 UTC
Description of problem:
This used to be true:

       --initrd-inject=PATH
         Add PATH to the root of the initrd fetched with "--location". This can be used to run an automated install without requiring a network hosted kickstart file:

         --initrd-inject=/path/to/my.ks --extra-args "ks=file:/my.ks"


But anaconda in F17 now has very small initrd.img that it throws away before installation and switches root to squashfs.img. Then the kickstart file is not found.

One suggested solution is to inject the file into /updates/ks.cfg in the initrd.img, because that directory gets copied onto the new root. Unfortunately --initrd-inject option does not allow to specify destination path, it always injects into filesystem root.

Please allow somehow to install F17 anaconda without requiring a network hosted kickstart. Either improve --initrd-inject option syntax and allow to specify destination path. Or do this automagically. Or talk to anaconda developers and come up with a better solution. Having to host kickstart files over network is a pain.

The man page documentation will have to change in any case, I believe.

Thanks.

Version-Release number of selected component (if applicable):
anaconda 17.5

Comment 1 Kamil Páral 2012-02-07 15:16:43 UTC
python-virtinst-0.600.1-1.fc16.noarch

The whole bug report is about virt-install, if that wasn't clear. Sorry.

Comment 2 Cole Robinson 2012-02-08 23:41:44 UTC
Where is there an f17 tree to test this with? All the rawhide trees I see don't seem to have actual kernel/initrd available.

Comment 3 Kamil Páral 2012-02-09 13:03:12 UTC
Yup. http://dl.fedoraproject.org/pub/alt/stage/17-Alpha.TC1/

Example (failed) command:

$ virt-install --name AutoQA --ram 1024 --vcpus 1 --os-type linux --disk path=/var/lib/libvirt/images/AutoQA.img,size=8,sparse=false --location http://dl.fedoraproject.org/pub/alt/stage/17-Alpha.TC1/Fedora/x86_64/os/ --network network:default --graphics none --initrd-inject=/usr/share/autotest/tests/rats_install/ks.cfg --extra-args "sshd serial console=ttyS0 root=live:http://dl.fedoraproject.org/pub/alt/stage/17-Alpha.TC1/Fedora/x86_64/os//LiveOS/squashfs.img ks=file:/ks.cfg"

Comment 4 Cole Robinson 2012-02-13 22:28:07 UTC
Hmm, I didn't reproduce using 17-Alpha.TC2. Actually I think this was a lorax bug:

https://bugzilla.redhat.com/show_bug.cgi?id=743135

Which according to the build log here only made it into f17 last week:

http://koji.fedoraproject.org/koji/buildinfo?buildID=298168

Duping to that bug

*** This bug has been marked as a duplicate of bug 743135 ***

Comment 5 Kamil Páral 2012-02-14 09:06:53 UTC
I can confirm that F17 Alpha TC2 seems to copy the kickstart file when injected into initrd. That is a good news, thanks.