Bug 1418500
Summary: | livemedia-creator fails when using %include to specify partitioning | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | jcastran | ||||
Component: | lorax | Assignee: | Brian Lane <bcl> | ||||
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.3 | CC: | bcl, cww, decandia, jcastran, jstodola, pbokoc, sbueno | ||||
Target Milestone: | rc | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | lorax-19.6.95-1 | Doc Type: | No Doc Update | ||||
Doc Text: |
undefined
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 1488423 (view as bug list) | Environment: | |||||
Last Closed: | 2018-04-10 17:38:04 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1420851, 1478303 | ||||||
Attachments: |
|
%include doesn't work with livemedia-creator, you need a flattened kickstart. https://rhinstaller.github.io/lorax/livemedia-creator.html#kickstarts lmc is used to create live iso's and disk images and while it does use Anaconda for the installation it really isn't designed to support advanced partitioning, especially the %pre + %include trick. Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. Brian, I understand your point, but would you be willing to update the docs to be more specific about the fact that you *must* flatten the kickstart file? The example is a bit like 'hey this is a simple thing I tried', it's not exactly clear that you must flatten the file because %include syntax is not supported. -Mike Hello, I am reopening this bug. Customer has requested if we can update the documentation to clearly state this (or if it's already stated, where?) Thanks, John Castranio Red Hat This is now documented in /usr/share/doc/lorax-$VERSION/README.livemedia-creator: ... livemedia-creator parses the 'part /' entry to determine how big a disk image needs to be created. This means that the common kickstart technique of using %pre to generate a partition scheme for use with %include will not work. There needs to be a 'part /' entry in the main part of the kickstart. Only one kickstart file is supported, so if your kickstart is built from a number of %include commands it needs to be flattened into a single file with ksflatten first. Verified with lorax-19.6.101-1.el7. 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. https://access.redhat.com/errata/RHBA-2018:0947 |
Created attachment 1246931 [details] Anaconda Logs from failed livemedia-creator 01783248 Description of problem: when using a kickstart that has the following: %pre echo "part / --fstype=ext4 --size=4000" > /tmp/partition echo "part swap --size=1000" >> /tmp/partition %end Then instead of defining the partitioning in the kickstart, you would use: %include /tmp/partition Which for a normal installation, replaces the %include with the contents of the file specified. What we found is that instead, the installation fails because there were "No Disks Selected" "Not enough space for installation" (This works if you don't use %pre and %include) Looking in the shell (virsh console) we can see that the /tmp/partition file does get created. I was able to add the kernel line "text" to stop the installation from dying immediately upon error (defaults to cmdline) Command: livemedia-creator --make-disk --ks=rhel7-minimal.ks --iso=rhel-server-7.3-x86_64-boot.iso --image-name=reproducer.img --ram=10240 --tmp=/var/tmp/ Version-Release number of selected component (if applicable): lorax-19.6.78-1.el7.x86_64 How reproducible: Everytime Steps to Reproduce: 1. Create a file with %pre that contains kickstart commands (See above) 2. Replace the partitioning with %include /tmp/filename 3. Run the livemedia-creator command Command: livemedia-creator --make-disk --ks=rhel7-minimal.ks --iso=rhel-server-7.3-x86_64-boot.iso --image-name=reproducer.img --ram=10240 --tmp=/var/tmp/ Actual results: livemedia-creator fails with: Install failed: virt_install failed Looking at console view of install you can see Installation Destination (No Disks Selected) The installation was stopped due to incomplete spokes detected while running in non-interactive cmdline mode. Edit your kickstart file and retry installation. The following mandatory spokes are not completed: Installation Destination Expected results: livemedia-creator creates an img file Additional info: