[PATCH] Default to /images/install.img if no dir is given in stage2=hd: (#528809)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This should (partly) fix installation from boot.iso dd'ed on USB.
The BZ from comment is for Fedora, there is also corresponding rhel6 BZ
(#549398), but see note (2) below.

(1) If not specified in stage2= parameter, stage2 had to be set in UI which made
(due to invalidRepoParam set to 1 in hdinstall.c) --repo parameter for stage 2
reset from stage2 ("hd:...") whereas in this case (boot.iso) the parameter is
expected to be empty (meaning: use the repos in /etc/yum.repos.d).

(2) boot.iso options for rhel contain askmethod anyway (unlike in Fedora) so
stage2 will be set in UI anyway and thus --repo will be reset from
stage2 value to "hd:..." again

(3) UI asking can happen also if the usb device is not settled yet when trying to
mount stage 2.

(4) I couldn't came up with any case of "stage2=hd:" case where we wouldn't
want the proposed change (the default).

Another option to approach the bug could be to append "/images/install.img" to
"hd:LABEL="XXX" in buildinstall.
---
 loader/hdinstall.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/loader/hdinstall.c b/loader/hdinstall.c
index ea39095..4397dc2 100644
--- a/loader/hdinstall.c
+++ b/loader/hdinstall.c
@@ -151,8 +151,11 @@ char * mountHardDrive(struct installMethod * method,
         /* if exist, duplicate */
         if (kspartition)
             kspartition = strdup(kspartition);
-        if (ksdirectory)
+        if (ksdirectory) {
             ksdirectory = strdup(ksdirectory);
+        } else {
+            ksdirectory = strdup("/images/install.img");
+        }
 
         if (!kspartition || !ksdirectory) {
             logMessage(ERROR, "missing partition or directory specification");
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux