Bug 886609 - koan: support for initramfs embeding of ks.cfg on RHEL-7
koan: support for initramfs embeding of ks.cfg on RHEL-7
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Milan Zázrivec
Lukas Pramuk
Depends On:
Blocks: sat560-blockers sat560-rhel7
  Show dependency treegraph
Reported: 2012-12-12 11:42 EST by Milan Zázrivec
Modified: 2013-10-01 17:27 EDT (History)
2 users (show)

See Also:
Fixed In Version: cobbler-2.0.7-34
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-01 17:27:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch for cobbler-2.0.7-15 (1.05 KB, patch)
2012-12-12 11:43 EST, Milan Zázrivec
no flags Details | Diff

  None (edit)
Description Milan Zázrivec 2012-12-12 11:42:55 EST
Description of problem:
This bug report is to make sure koan for RHEL-7, as distributed in RHN Tools
channels will be able to properly embed kickstart file into initramfs for
system re-provisioning.

This is needed for static networking provisioning.

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

How reproducible:

Steps to Reproduce:
1. Reprovision a RHEL-7 system using static networking
2. Check whether the initramfs used contains ks.cfg (kickstart file)
Actual results:
initramfs does not contain ks.cfg

Expected results:
initramfs contains ks.cfg

Additional info:
Comment 1 Milan Zázrivec 2012-12-12 11:43:41 EST
Created attachment 662483 [details]
Patch for cobbler-2.0.7-15
Comment 4 Lukas Pramuk 2013-09-25 11:27:09 EDT
VERIFIED. cobbler-2.0.7-37.el5sat


1.) reprovision any client using RHEL7 ks tree 

@webui: Provisioning - Kickstart - Schedule - click Advanced Configuration, set Network Connection: (o) Use static interface {eth0}
click Schedule Kickstart and Finish and Confirm

# rhn_check -vv
D: do_call kickstart.initiate('<sat>', 'spacewalk-koan', ' ksdevice=eth0 ', 'eth0', '<client>:1', []){'cache_only': None}
initiating spacewalkkoan kickstart
Preserve files! : []
- looking for Cobbler at http://<sat>/cobbler_api
- reading URL: http://<sat>/cblr/svc/op/ks/system/<client>:1
install_tree: http://<sat>/ty/rPywiMvx
downloading initrd initrd.img to /boot/initrd.img
- reading URL: http://<sat>/cobbler/images/server-x86_64-7-distro:1:RedHatSatTeam/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz
- reading URL: http://<sat>/cobbler/images/server-x86_64-7-distro:1:RedHatSatTeam/vmlinuz
- reading URL: http://<sat>/cblr/svc/op/ks/system/<client>:1
- ['/bin/bash', '/var/spool/koan/insert.sh']
mount failed; treating initrd as a cpio archive...
193033 blocks
193067 blocks
- ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz', '--initrd', '/boot/initrd.img', '--args', '"ks=file:ks.cfg ksdevice=eth0 kssendmac lang= text "', '--make-default', '--title=kick1380120305']
- reboot to apply changes
D: Sending back response(0, 'Kickstart initiate succeeded', {})
D: check_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>reboot.reboot</methodName>\n<params>\n</params>\n</methodCall>\n", 'version': 2, 'id': 13}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at 1380120309.19 with expiration of 1380123909.19 seconds.
successfully retrieved authentication token from up2date server
D: logininfo:{'X-RHN-Server-Id': 1000010000, 'X-RHN-Auth-Server-Time': '1380120309.05', 'X-RHN-Auth': 'KY1j8+vkxwOpZItj44VzTg==', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-6', '20130918221710', '1', '1'], ['rhn-tools-rhel-x86_64-server-6', '20130919063532', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>reboot.reboot</methodName>\n<params>\n</params>\n</methodCall>\n", 'version': 2, 'id': 13}
D: handle_action actionid = 13, version = 2
D: do_call reboot.reboot(){'cache_only': None}
Rebooting the system now

2.) pause for a while the provisioning process and check reforged initramdisk file for ks.cfg file presence

# killall -9 shutdown
# cd `mktemp -d`
# gzip -d < /boot/initrd.img | cpio -id
# find -name ks.cfg

# reboot

3.) check RHEL7 anaconda proceeds with automated install successfully

note: the initramdisk was originally compressed using XZ compression, after ksfile insertion initramdisk was compressed using GZIP
Comment 5 Clifford Perry 2013-10-01 17:27:48 EDT
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 


Text from Upgrade Erratum follows:

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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