osbuild / osbuild-composer

An HTTP service for building bootable OS images.
https://www.osbuild.org
Apache License 2.0
160 stars 108 forks source link

Kickstart insufficient when booting iso #2255

Open caveman2003 opened 2 years ago

caveman2003 commented 2 years ago

Describe the bug After creating the ISO and booting i get "Kickstart insufficient"

Environment

To Reproduce

[[packages]] name = "sssd" version = "*"

[customizations] hostname = "rhel8custom"

[[customizations.user]] name = "automation" description = "Automation user for Ansible" password = "$6$Ql2Zn4rxd.........F."

key = "PUBLIC-SSH-KEY"

home = "/home/automation/" shell = "/bin/bash" groups = ["wheel"] uid = 9999

gid = NUMBER

* changed source to point to RHEL satellite 

* create ISO:

composer-cli blueprints push rhel8_custom.toml

composer-cli compose start RHEL8_CUSTOM image-installer
composer-cli compose status composer-cli compose image UUID


No erorrs durinng image build, that finish correctly (after 30min) 

aee75147-f830-4d86-a1e3-c08417e69a1b FINISHED Thu Feb 3 15:01:05 2022 RHEL8_CUSTOM 8.5.1 image-installer


* build VMware vm with:  1 CPU, 8 GB RAM, 60 GB disk, network, and as CDROM the iso file created. 
boot the vm normaly then after few sec i get: 

Kickstart insufficient

**Expected behavior**
Expect an proper installed RHEL8

**Additional context**
If i select the storage and then only press "c" to continue vm install is working fine and at the end i have an RHEL with installed sssd and user automation ... 

Additional problem; i need to press "ENTER" at the end to boot the installed system also network is not activated (DHCP).

![virtual_disk](https://user-images.githubusercontent.com/35966082/152497233-e6a8c70a-87fc-4503-81d5-8c6adf59e903.PNG)

My questions are: 
* what is missing here ? LVM?
* seems that the default ks do not contain reboot command ?

How to fix it? 
linionbb commented 2 years ago

Hi I'm encountering the same issue (rhel 8.6), using an .iso for Vmware. osbuild works fine.

I always get the messsage "Kickstart insufficient" in Anaconda...

Did you ever figure this out?

My blueprint: ` name = "rhel86" description = "golden image" version = "0.0.26" packages = [] modules = [] groups = [] distro = ""

[customizations] hostname = "golden-image-rhel86" installation_device = "/dev/sda"

[[customizations.user]] name = "guest" description = "guest" password = "dummy" groups = ["wheel"] [customizations.firewall] ports = ["22:tcp"] [customizations.services] enabled = ["sshd"]

[[customizations.filesystem]] mountpoint = "/" size = 8589934592 [[customizations.filesystem]] mountpoint = "/var" size = 5368709120 `

bcl commented 2 years ago

The best thing to do is to open a bug at https://bugzilla.redhat.com and attach the kickstart from the iso that is failing. And if you can, the logs from anaconda which can be found under /tmp/ while it is trying to install.

ardrigh commented 1 year ago

The Kickstart file created by Image Builder for tar/ISO files only includes a single line to load a liveimage.

# cat original-ks.cfg
liveimg --url file:///run/install/repo/liveimg.tar.gz

This appears in the Graphical installer in the image I created using the hosted Image Builder on Red Hat website.

When Anaconda starts it has no information for disk partitioning, causing the error message "Kickstart insufficient".

In the graphical installer, you have to select the disk partitioning for the install to continue.

Once the install is complete, Anaconda has created a more complete kickstart file:

# cat anaconda-ks.cfg
#version=RHEL8
# Use live disk image installation
liveimg --url="file:///run/install/repo/liveimg.tar.gz"
# Use graphical install
graphical
....
%end

This error breaks automated installs. I was doing this as a test to see if the ISO creation would work with Terraform and vSphere. It will always fail due to this error.

This bug makes providing a "custom" disk layout a mandatory setting.

ardrigh commented 1 year ago

Hi I'm encountering the same issue (rhel 8.6), using an .iso for Vmware. osbuild works fine.

I always get the messsage "Kickstart insufficient" in Anaconda...

Did you ever figure this out?

My blueprint: ` name = "rhel86" description = "golden image" version = "0.0.26" packages = [] modules = [] groups = [] distro = ""

[customizations] hostname = "golden-image-rhel86" installation_device = "/dev/sda"

[[customizations.user]] name = "guest" description = "guest" password = "dummy" groups = ["wheel"] [customizations.firewall] ports = ["22:tcp"] [customizations.services] enabled = ["sshd"]

[[customizations.filesystem]] mountpoint = "/" size = 8589934592 [[customizations.filesystem]] mountpoint = "/var" size = 5368709120 `

I suspect you are getting the error because you do not have a full disk layout configured. You would need to add /boot and swap space at a minimum.

KyabeSama31 commented 1 year ago

Hi there ! I'm having the same problem that is described here.. I'm trying to create a fully kickstarted ISO with a complete filesystem, a hostname, an user etc...

Here's the osbuild and composer-cli version: osbuild 65 and composer-cli v35.5

Here's my TOML file (I had to comment timezone, locale and service because osbuild didn't recognized these customizations. That's for another issue):

name = "deployHost"
description = "kickstart image to create DeployHosts"
version = "0.0.9"
distro = "rhel-90"

[[packages]]
name = "ansible-collection-chocolatey-chocolatey"
version = "1.4.*"

[[packages]]
name = "ansible-collection-chocolatey-chocolatey"
version = "1.4.*"

[[packages]]
name = "ansible-collection-ansible-posix"
version = "1.4.*"

[[packages]]
name = "ansible-collection-community-general"
version = "4.8.*"

[[packages]]
name = "ansible-collection-community-libvirt"
version = "1.2.*"

[[packages]]
name = "ansible-collection-community-mysql"
version = "3.5.*"

[[packages]]
name = "ansible-collection-community-rabbitmq"
version = "1.2.*"

[[packages]]
name = "ansible-collection-microsoft-sql"
version = "1.2.*"

[[packages]]
name = "ansible-collection-netbox-netbox"
version = "3.9.*"

[[packages]]
name = "ansible-collection-redhat-rhel_mgmt"
version = "1.1.*"

[[packages]]
name = "ansible-collection-containers-podman"
version = "1.10.*"

[[packages]]
name = "ansible-core"
version = "2.13.*"

[[packages]]
name = "code"
version = "1.77.*"

[[packages]]
name = "firefox"
version = "102.9.*"

[[packages]]
name = "git"
version = "2.31.*"

[[packages]]
name = "git-core"
version = "2.31.*"

[[packages]]
name = "git-core-doc"
version = "2.31.*"

[[packages]]
name = "vim-common"
version = "*"

[[packages]]
name = "vim-enhanced"
version = "*"

[[packages]]
name = "vim-filesystem"
version = "*"

[[packages]]
name = "vim-minimal"
version = "*"

#[[packages]]
#name = "xrdp"
#version = "*"
#
#[[packages]]
#name = "xrdp-selinux"
#version = "*"

[[customizations.user]]
name = "admin"
description = "default user"
password = "$6$zG4.2L9QwzoxVGhL$8ij/hcbTVK0tZjALt3urUtUfIIrMacuQyEhFGcEu/Ui6ER8tBEWwb/n9gSvkjvOik9.XzlGShBadUImVMEob1."
#key = "PUBLIC-SSH-KEY"
home = "/home/admin/"
shell = "/usr/bin/bash"
groups = ["users", "wheel"]
uid = 1000

[customizations]
hostname = "deployhost"

#[customizations.timezone]
#timezone = "Europe/Paris"

#[customizations.locale]
#languages = ["en_US.UTF-8"]
#keyboard = "fr"

#[customizations.services]
#enabled = ["sshd"]

[[customizations.filesystem]]
mountpoint = "/home"
size = "10 GiB"
[[customizations.filesystem]]
mountpoint = "/boot"
size = "2 GiB"
[[customizations.filesystem]]
mountpoint = "/var"
size = "10 GiB"
[[customizations.filesystem]]
mountpoint = "/var/log"
size = "5 GiB"
[[customizations.filesystem]]
mountpoint = "/var/log/audit"
size = "10 GiB"
[[customizations.filesystem]]
mountpoint = "/"
size = "30 GiB"

This works great when I generate a vmdk but when I create an ISO, the kickstart look like this:

liveimg --url file:///run/install/repo/liveimg.tar
user --name admin --password $6$zG4.2L9QwzoxVGhL$8ij/hcbTVK0tZjALt3urUtUfIIrMacuQyEhFGcEu/Ui6ER8tBEWwb/n9gSvkjvOik9.XzlGShBadUImVMEob1. --iscrypted --shell /usr/bin/bash --uid 1000 --groups users,wheel --homedir /home/admin

I followed the Redhat documentation as well as the osbuild documentation

I realize that the versions I'm using are way behind the latests but I'm working in an offline infra and I just cached the appstream and BaseOS. I tried installing from sources but I had too much issues with the dependancies...

KyabeSama31 commented 1 year ago

So I had a chat on #osbuild on Libera.Chat and this is a normal behavior. image

We just have to wait until this is added into the tool

ardrigh commented 1 year ago

I created a ticket about adding support to pass through a kickstart file: https://github.com/osbuild/osbuild-composer/issues/3416

If that's not the option that is taken, then defining disk layout via TOML files needs to support more than a single disk for it to be useful.