Skip to content

Commit 4a367fc

Browse files
committed
photon-os-installer: 2.8-5 - fix interactive install + UI output overlay
Carry three installer patches for the 5.0 build until they land upstream: - 0003 isoInstaller interactive (no-kickstart) install fix - 0004 add btrfs-progs when a btrfs partition is selected - 0005 tdnf: capture install output (no /etc/os-release overlay on the UI) Change-Id: Idaa484981f2d7730817420501f2f65cf8d321ada
1 parent e29303e commit 4a367fc

4 files changed

Lines changed: 147 additions & 1 deletion

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
From ad38512caefb9525a4d9cde74f7e736887930346 Mon Sep 17 00:00:00 2001
2+
From: Daniel Casota <dcasota@gmail.com>
3+
Date: Thu, 4 Jun 2026 15:24:46 +0200
4+
Subject: [PATCH] isoInstaller: fix interactive (no-kickstart) ISO install
5+
6+
Booting the ISO interactively (no ks= boot param, no -c config, no VMware
7+
guestinfo.kickstart.*) was broken by two coupled regressions:
8+
9+
1) _load_ks_config_platform()/_load_ks_config_vmware() returned None when
10+
no platform kickstart exists; __init__ then crashed at
11+
'if "live" not in install_config' with:
12+
TypeError: argument of type 'NoneType' is not a container or iterable
13+
Fix: return an empty {} config instead of None.
14+
15+
2) The 'live' block unconditionally stamped install_config['live']=True,
16+
making the empty interactive config truthy. installer.configure() only
17+
runs the UI configurator when 'not install_config', so the UI was
18+
skipped and _check_install_config() raised 'No disk configured'.
19+
Fix: only stamp 'live' on a non-empty (kickstart) config; leave the
20+
interactive config empty so the UI runs (live then defaults via
21+
_add_defaults()).
22+
23+
Regression introduced by 9fc8733 on top of 0a72c3a.
24+
25+
Co-Authored-By: Daniel Casota <dcasota@gmail.com>
26+
---
27+
photon_installer/isoInstaller.py | 17 ++++++++++++++---
28+
1 file changed, 14 insertions(+), 3 deletions(-)
29+
30+
diff --git a/photon_installer/isoInstaller.py b/photon_installer/isoInstaller.py
31+
index dd0bed7..f2b3e67 100644
32+
--- a/photon_installer/isoInstaller.py
33+
+++ b/photon_installer/isoInstaller.py
34+
@@ -79,8 +79,12 @@ class IsoInstaller(object):
35+
else:
36+
install_config = self._load_ks_config_platform(verify=not insecure_installation)
37+
38+
- # 'live' should be True for iso installs
39+
- if 'live' not in install_config:
40+
+ # 'live' should be True for iso installs. Only stamp it on an actual
41+
+ # (non-empty) kickstart config. For an interactive install the config
42+
+ # is empty here and must stay falsy, otherwise installer.configure()
43+
+ # ('if not install_config and ui_config') skips the UI configurator
44+
+ # and _check_install_config() fails with "No disk configured".
45+
+ if install_config and 'live' not in install_config:
46+
install_config['live'] = True
47+
48+
if insecure_installation and install_config is not None:
49+
@@ -164,7 +168,10 @@ class IsoInstaller(object):
50+
if CommandUtils.is_vmware_virtualization():
51+
return self._load_ks_config_vmware(verify=verify)
52+
else:
53+
- return None
54+
+ # No platform-provided kickstart: fall back to an interactive
55+
+ # install with an empty config. Returning None here makes the
56+
+ # caller crash at "if 'live' not in install_config".
57+
+ return {}
58+
59+
def _load_ks_config_vmware(self, verify=True):
60+
try:
61+
@@ -191,6 +198,10 @@ class IsoInstaller(object):
62+
print(
63+
f"Failed to run vmtoolsd, do you have open-vm-tools installed? Error: {e}"
64+
)
65+
+ # No guestinfo kickstart (data/url both absent) or vmtoolsd missing:
66+
+ # fall back to an interactive install with an empty config instead of
67+
+ # returning None, which would crash at "if 'live' not in install_config".
68+
+ return {}
69+
70+
def mount_media(self, photon_media, mount_path=Defaults.MOUNT_PATH):
71+
"""Mount the external media"""
72+
--
73+
2.43.7
74+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/photon_installer/installer.py b/photon_installer/installer.py
2+
index 7c50b29..7b9ab39 100644
3+
--- a/photon_installer/installer.py
4+
+++ b/photon_installer/installer.py
5+
@@ -2343,6 +2343,10 @@ password_pbkdf2 {grub_user} {grub_password_hash}
6+
# add lvm2 package to install list
7+
self._add_packages_to_install('lvm2')
8+
9+
+ # add btrfs-progs if any partition uses btrfs
10+
+ if any(p.get('filesystem') == 'btrfs' for p in partitions):
11+
+ self._add_packages_to_install('btrfs-progs')
12+
+
13+
# Create partitions_data (needed for mk-setup-grub.sh)
14+
for partition in partitions:
15+
if 'mountpoint' in partition and not partition.get('shadow', False):
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 43ea3a467cfc4c4abb2690e17fe3ab5e619f19cf Mon Sep 17 00:00:00 2001
2+
From: Daniel Casota <dcasota@gmail.com>
3+
Date: Thu, 4 Jun 2026 22:05:37 +0200
4+
Subject: [PATCH] tdnf: capture install output so it doesn't overlay the curses
5+
UI
6+
7+
execute(do_json=False) used subprocess.check_call(), inheriting the
8+
installer's stdout/stderr. During a UI install that overlays the curses
9+
progress bar with tdnf/rpm messages (e.g. file paths like /etc/os-release).
10+
Capture the output and send it to the log instead.
11+
12+
Co-Authored-By: Daniel Casota <dcasota@gmail.com>
13+
---
14+
photon_installer/tdnf.py | 14 +++++++++++++-
15+
1 file changed, 13 insertions(+), 1 deletion(-)
16+
17+
diff --git a/photon_installer/tdnf.py b/photon_installer/tdnf.py
18+
index 8d98b8e..567dd61 100644
19+
--- a/photon_installer/tdnf.py
20+
+++ b/photon_installer/tdnf.py
21+
@@ -177,7 +177,19 @@ class Tdnf:
22+
23+
return retval, out_json
24+
else:
25+
- return subprocess.check_call(args)
26+
+ # Capture output and route it to the log instead of inheriting the
27+
+ # parent's stdout/stderr. During a UI (curses) install the latter
28+
+ # overlays the progress bar with tdnf/rpm messages such as file
29+
+ # paths (e.g. /etc/os-release).
30+
+ process = subprocess.Popen(
31+
+ args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
32+
+ )
33+
+ for line in process.stdout:
34+
+ self.logger.info(line.decode('utf-8', errors='replace').rstrip())
35+
+ retval = process.wait()
36+
+ if retval != 0:
37+
+ raise subprocess.CalledProcessError(retval, args)
38+
+ return retval
39+
40+
def run(self, args=None, do_json=True):
41+
# Fix mutable default arguments issue
42+
--
43+
2.43.7
44+

SPECS/photon-os-installer/photon-os-installer.spec

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Summary: Photon OS Installer
66
Name: photon-os-installer
77
Version: 2.8
8-
Release: 2%{?dist}
8+
Release: 5%{?dist}
99
Group: System Environment/Base
1010
Vendor: VMware, Inc.
1111
Distribution: Photon
@@ -17,6 +17,9 @@ Source1: license.txt
1717

1818
Patch0: 0001-Use-mkpasswd-to-generate-password-hash.patch
1919
Patch1: 0002-fix-up-old-public_key-syntax-for-backward-compatibil.patch
20+
Patch2: 0003-isoInstaller-fix-interactive-NoneType-crash.patch
21+
Patch3: 0004-installer-add-btrfs-progs.patch
22+
Patch4: 0005-tdnf-capture-install-output.patch
2023

2124
BuildRequires: python3-devel
2225
BuildRequires: python3-pyinstaller
@@ -71,6 +74,16 @@ rm -rf %{buildroot}
7174
%{_bindir}/photon-iso-builder
7275

7376
%changelog
77+
* Thu Jun 04 2026 Daniel Casota <dcasota@gmail.com> 2.8-5
78+
- installer: add btrfs-progs when a btrfs partition is selected (dcasota patch-1)
79+
- tdnf: capture install output so it no longer overlays the curses UI
80+
with file paths like /etc/os-release
81+
* Thu Jun 04 2026 Daniel Casota <dcasota@gmail.com> 2.8-4
82+
- isoInstaller: also fix interactive UI being skipped ("No disk configured")
83+
by only stamping 'live' on a non-empty kickstart config (regression 9fc8733)
84+
* Thu Jun 04 2026 Daniel Casota <dcasota@gmail.com> 2.8-3
85+
- isoInstaller: fix TypeError crash on interactive (no-kickstart) install
86+
when install_config is None (regression from upstream 9fc8733/0a72c3a)
7487
* Fri May 15 2026 Vamsi Krishna Brahmajosyula <vamsi-krishna.brahmajosyula@broadcom.com> 2.8-2
7588
- Extended to build for subrelease 91 and above
7689
* Tue Apr 28 2026 Oliver Kurth <oliver.kurth@broadcom.com> 2.8-1

0 commit comments

Comments
 (0)