New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RHEL7 backport of inst.ks=cdrom fixes #235
Merged
wgwoods
merged 5 commits into
rhinstaller:rhel7-branch
from
wgwoods:rhel7-ks-cdrom-fixes
Jul 23, 2015
Merged
RHEL7 backport of inst.ks=cdrom fixes #235
wgwoods
merged 5 commits into
rhinstaller:rhel7-branch
from
wgwoods:rhel7-ks-cdrom-fixes
Jul 23, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wgwoods
force-pushed
the
rhel7-ks-cdrom-fixes
branch
from
July 22, 2015 21:55
07651c7
to
b4c6368
Compare
Add a couple of utility functions: * tell_user() sends a message to the log and the screen via plymouth; if plymouth isn't running we send it to the console instead. * dev_is_cdrom() tells you whether the given device is a CDROM (according to udev). Related: rhbz#1122104 (cherry picked from commit abfa908)
Apparently this is a thing: some people do installs in secure environments where they have no network and aren't allowed to use USB devices; all they can use is optical media. So they have the install disc, and another cdrom that contains their kickstart. So: the user boots the install DVD with "inst.ks=cdrom[:/path/ks.cfg]", and once udev notices the disc we run both fetch-kickstart-disk and anaconda-diskroot¹. Normally, anaconda-diskroot would mount the installer DVD here, but we need to be able to eject it, so anaconda-diskroot instead ignores it and quietly exits. Meanwhile, fetch-kickstart-disk tries to grab the kickstart and fails (because we're looking at the install DVD!), so it asks the user to insert the CDROM containing the kickstart. So: when the user ejects the DVD and inserts their kickstart CD, fetch-kickstart-disk will fetch the kickstart and ask for the install media back. Finally, the user re-inserts the DVD, anaconda-diskroot mounts it, and off we go! ¹I'm assuming the ordering is undefined. It might be predictable in reality but it's probably better if we don't rely on that. Resolves: rhbz#1122104 (cherry picked from commit 5d016ef)
Commit 5d016ef added support for doing cdrom-swapping while doing "inst.ks=cdrom[:...]". But it turns out that if you're slow to swap the discs, we'll hit dracut's retry timeout and it'll drop to the emergency shell. So, in response to User Requests, we now disable the timeout entirely when using "inst.ks=cdrom[:...]"; dracut will wait forever for the kickstart and/or installer media, and if anything goes wrong you're just stuck and you'll need to reset. Resolves: rhbz#1168902 (cherry picked from commit bc6378b)
fetch-kickstart-disk and anaconda-diskroot are *executed*, not sourced, so they don't get the default dracut environment, so "$kickstart" isn't set, so "str_starts $kickstart cdrom" is always false, so the user never gets any of the "Please insert CDROM containing '$path'..." messages. Set "$kickstart" from the boot args, and then this all works as expected. Related: rhbz#1168902 (cherry picked from commit 672ee4f)
anaconda-lib has the `when_any_cdrom_appears` function for this exact purpose, so use that instead of handcrafting the udev rule. Related: rhbz#1168902 (cherry picked from commit fdee9c2)
wgwoods
force-pushed
the
rhel7-ks-cdrom-fixes
branch
from
July 22, 2015 21:56
b4c6368
to
8f5bece
Compare
These all look good to me too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is basically the same as #234, except it turns out that a couple of the pre-requisite commits either never made it to RHEL7 or got dropped in the rebase. So I've added bd99015 and 8e5b65d, and now CDROM-swapping with
inst.ks=cdrom
should work in RHEL7. Yaaayyyyyyyyy~~~