Kick start installer.
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 692
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Folks,
Could you please add two features to the installer?
a) My understanding, if the package is unresolved, the kick-start installer just crashes. ( check picture)
"additional_packages": [
"vim",
"gcc",
"git",
"wget",
"linux-rt",
"linux-rt-devel",
"wget",
"make",
"meson",
"build-essential",
"ninja-build",
"nasm",
"lshw"
],
The root cause here is the unresolved package name. lshw. Note I put files in noarch and x86, but I think the installer doesn't use the file name to resolve rpm but uses something different.
Note that the installer crashed, but it doesn't give a name of the package, so if you have ten packages, you don't know which one it doesn't like. i.e., in json list, which one caused a crash?
It probably makes sense to wrap that call. with Try. Except. and write to /var/intaller.log
-
Can you provide an example of how to use additional_rpm and explain the logic?
In my case, I use meson and a set of other toolchains in post. I.e. I compile a bunch of staff. -
Can you please provide the option to run something post-install after reboot?
i.e., not post-install but post-reboot.
Example let's assume I do kick-start and upgrade the kernel
"linux-rt",
"linux-rt-devel"
Now in my post, I need to compile, let's say, IAVF or any other driver that uses /usr/src/linux, so I need to link the kernel header to one that the system will use post boot.
You can check the build I do
https://github.com/spyroot/photon_rt
Reproduction steps
Example json I generate.
I believe cause package list.
{
"hostname": "photon-machine",
"password": {
"crypted": false,
"text": "VMware1!"
},
"disk": "/dev/sda",
"partitions": [
{
"mountpoint": "/",
"size": 0,
"filesystem": "ext4",
"lvm": {
"vg_name": "vg1",
"lv_name": "rootfs"
}
},
{
"mountpoint": "/root",
"size": 8192,
"filesystem": "ext4",
"lvm": {
"vg_name": "vg1",
"lv_name": "root"
}
},
{
"mountpoint": "/boot",
"size": 8192,
"filesystem": "ext4"
}
],
"packagelist_file": "packages_rt.json",
"additional_packages": [
"vim",
"gcc",
"git",
"wget",
"linux-rt",
"linux-rt-devel",
"wget",
"make",
"meson",
"build-essential",
"ninja-build",
"nasm",
"lshw"
],
"postinstallscripts": [
"post.sh",
"overwrite.env"
],
"search_path": [
"/mnt/media",
"/tmp",
"/mnt/media/direct_rpms",
"/mnt/media/git_images",
"/mnt/media/direct",
"/"
],
"postinstall": [
"#!/bin/sh",
"sed -i 's/PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config",
"yum list installed > /installed.before.log",
"rpm -qa > /rpm.installed.before.log",
"ls /mnt/* > list.log",
"systemctl disable --now systemd-timesyncd",
"sed -i 's/tx_timestamp_timeout.*/tx_timestamp_timeout 100/g' /etc/ptp4l.conf",
"sed -i 's/eth0/eth4/g' /etc/sysconfig/ptp4l",
"systemctl enable ptp4l.service phc2sys.service",
"echo \"v=$(ls /mnt/cdrom/direct_rpms/*.rpm | wc -l); echo \"number of rpms in cdrom $v\"",
"echo \"v=$(ls /mnt/media/direct_rpms/*.rpm | wc -l); echo \"number of rpms in cdrom $v\"",
"echo \"Installing rpms from media\"; tdnf install -y /mnt/media/direct_rpms/*.rpm",
"tdnf \"Installing rpms from cdrom\"; install -y /mnt/cdrom/direct_rpms/*.rpm",
"tdnf \"Installing rpms from tmp\"; install -y /tmp/direct_rpms/*.rpm",
"echo \"copy direct_rpms from /mnt/media\"; mkdir -p /direct_rpms; cp /mnt/media/direct_rpms/*.rpm /direct_rpms",
"echo \"copy direct_rpms from /mnt/cdrom\"; mkdir -p /direct_rpms; cp /mnt/cdrom/direct_rpms/*.rpm /direct_rpms",
"echo \"copy direct from /mnt/media\"; mkdir -p /direct; cp /mnt/media/direct/* /direct",
"echo \"copy direct from /mnt/cdrom rpms\"; mkdir -p direct; cp /mnt/cdrom/direct/* /direct",
"echo \"copy git_images from /mnt/media\"; mkdir -p /git_images; cp /mnt/media/git_images/* /git_images",
"echo \"copy git_images from /mnt/cdrom\"; mkdir -p /git_images; cp /mnt/cdrom/git_images/* /git_images",
"tdnf install dmidecode lshw -y",
"tdnf update -y",
"tdnf upgrade -y",
"yum -y update >> /etc/postinstall",
"yum -y install gcc meson git wget numactl make curl nasm >> /etc/postinstall",
"yum -y install python3-pip unzip zip gzip build-essential zlib-devel >> /etc/postinstall",
"yum -y install lshw findutils vim-extra elfutils-devel cmake cython3 python3-docutils >> /etc/postinstall",
"yum -y install libbpf-devel libbpf libpcap-devel libpcap libmlx5 libhugetlbfs >> /etc/postinstall"
],
"linux_flavor": "linux-rt",
"photon_docker_image": "photon:3.0",
"network": {
"type": "dhcp"
}
}
Expected behavior
a) Expected behavior won't crash; Expected behavior writes to a log so you can see exact package it failed to detect with some msg that explains why.
b) It makes sense to explain if you need additional rpm like lshw or any other form noarch or x86 where to put them and how to register them, so the installer resolves.
And for a post, I think it makes sense to have post_install post_first_reboot because if you swap kernel as I explained, if you post installer driver and require actually /usr/src/header
Right now, I parse grub and trying to figure out what is future -> kernel on the next boot, but that is not right.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the kick-start installer code that processes additional_packages, additional_rpm, postinstall, and the requested post-reboot phase. Reproduce the configuration with the unresolved lshw package and inspect how package lookup and installer logging behave. Done should include identifiable package failures, documented RPM usage, and a defined post-reboot workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100