Bug 1883709

Summary: anaconda: TUI installer refuses to rsync LiveCD to disk
Product: [Fedora] Fedora Reporter: Mikhail Novosyolov <m.novosyolov>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: anaconda-maint-list, jkonecny, jonathan, kellin, vanmeeuwen+fedora, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-25 16:48:54 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:

Description Mikhail Novosyolov 2020-09-30 00:00:23 UTC
If running with "inst.text" in cmdline in LiveCD (just append "inst.text" to default cmdline in Fedora 32 LiveCD or Fedora Rawhide daily build LiveCD), the installer either freezes on selecting installation source or suggests to choose between a network repository, CD ROM etc. (I tried Fedora Rawhide, Anaconda freezes there in this case; in ROSA Anaconda 32 suggests to make a choice).

But there is no reason to be unable to rsync LiveCD as in GUI mode!

To work around this bug we have made the following patch. Unfortunately, a colleague of mine, who investigated this problem, did not find the place in Anaconda's code where installation source is set to fix this problem properly, so here is just a workaround.

--
From: Mikhail Novosyolov <m.novosyolov>
Date: Wed, 30 Sep 2020 00:26:49 +0300
Subject: [PATCH] HACK: use LiveCD as source in TUI

By default TUI asks the user to choose a software source between CD, a network repo etc.
We want it to be able to rsync from LiveCD as the GUI installer does.

If a kickstart has not been specified in either kernel cmdline or via CLI arguments,
load a specially crafted kickstart file /usr/share/anaconda/anaconda-livecd-text.ks which contains only one line:
liveimg --url=file:///dev/mapper/live-base
(also note rhbz#1874434)

This is a hack as a better solution has not been implemented due to complexity and lack of time.

Co-authored-by: Oleg Solovev <o.solovev>
---
 anaconda.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/anaconda.py b/anaconda.py
index 4c4c9176f..6950536b1 100755
--- a/anaconda.py
+++ b/anaconda.py
@@ -264,6 +264,15 @@ if __name__ == "__main__":
     from pyanaconda.core.kernel import kernel_arguments
     (opts, depr) = parse_arguments(boot_cmdline=kernel_arguments)
 
+    # XXX ROSA hack
+    livecd_install = True
+    # opts.ks is loaded above in parse_arguments() (from CLI args)
+    if opts.ksfile:
+        livecd_install = False
+    if livecd_install:
+        opts.ksfile='/usr/share/anaconda/anaconda-livecd-text.ks'
+    #/
+
     from pyanaconda.core.configuration.anaconda import conf
     conf.set_from_opts(opts)
 
-- 

/usr/share/anaconda/anaconda-livecd-text.ks in rosa2019.1 for now is the following:

%include /usr/share/anaconda/interactive-defaults.ks
liveimg --url=file:///dev/mapper/live-base

(https://abf.io/import/anaconda/blob/a32a132226/anaconda-livecd-text.ks)

Comment 1 Mikhail Novosyolov 2020-12-07 17:44:47 UTC
Fixed by running TUI with --liveinst --method=livecd:/dev/mapper/live-base as /usr/sbin/liveinst does
https://abf.io/import/anaconda/commit/81b3e2d5a9e62a5b38b0521f483226aaf6b0f326

Comment 2 Fedora Program Management 2021-04-29 16:39:31 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2021-05-25 16:48:54 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.