Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootable container ISO installer fails to initialize dbus.socket #391

Closed
lzap opened this issue Apr 25, 2024 · 13 comments
Closed

Bootable container ISO installer fails to initialize dbus.socket #391

lzap opened this issue Apr 25, 2024 · 13 comments
Labels
area/anaconda-iso Issues relating to the unattended Anaconda ISO area/target-os This issue relates to a specific target OS

Comments

@lzap
Copy link
Contributor

lzap commented Apr 25, 2024

Hello, trying the build the following bootc:

FROM quay.io/centos-bootc/centos-bootc-dev:stream9

RUN dnf -y install httpd && \
    systemctl enable httpd && \
    mv /var/www /usr/share/www && \
    sed -ie 's,/var/www,/usr/share/www,' /etc/httpd/conf/httpd.conf && \
    touch /HTTPD_DEMO

RUN rm /usr/share/httpd/noindex -rf
COPY index.html /usr/share/www/html
EXPOSE 80

The resulting ISO can be installed locally via removable media, however, it fails to initialize dbus, thus network manager and the network is offline. That is not a problem for removable media installation, it is for PXE installation.

image

@ochosi ochosi transferred this issue from osbuild/osbuild-composer Apr 25, 2024
@mvo5
Copy link
Collaborator

mvo5 commented Apr 25, 2024

Fwiw, I tried to debug this with uay.io/centos-bootc/centos-bootc:stream9 and AFAICT dbus.socket is not failing there, trying -dev now.

@mvo5
Copy link
Collaborator

mvo5 commented Apr 25, 2024

Sorry, I cannot reproduce this, here is what I did:

$ cat Containerfile
FROM quay.io/centos-bootc/centos-bootc-dev:stream9

RUN dnf -y install httpd && \
    systemctl enable httpd && \
    mv /var/www /usr/share/www && \
    sed -ie 's,/var/www,/usr/share/www,' /etc/httpd/conf/httpd.conf && \
    touch /HTTPD_DEMO

RUN rm /usr/share/httpd/noindex -rf
COPY index.html /usr/share/www/html
EXPOSE 80
$ touch index.html
$ sudo podman build -f Containerfile  -t image-issue391
$ mkdir output
$ sudo podman run --rm -it --privileged --pull=newer  --security-opt label=type:unconfined_t -v $(pwd)/output:/output  quay.io/centos-bootc/bootc-image-builder:latest --type iso --local localhost/image-issue391
...
$ cd output/bootiso
$ sudo truncate -s 10G test-disk.img
$ kvm -cpu host -m 1500 -snapshot -cdrom install.iso  -boot d test-disk.img 
...

in the booted image I did "sendkey ctrl-alt-f2" and ran "systemctl --failed" and "systemctl status dbus.socket" and got no errors. When running "nmcli" in the booted iso (while it was installing) I saw that it was connected on the ethernet port.

What am I missing :) ?

@cgwalters
Copy link
Contributor

, however, it fails to initialize dbus

Do you have /var/run as a physical directory? CentOS/centos-bootc#140 (comment)

@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

@mvo5 here is the repo: https://quay.io/repository/lzapletal/fedora-eln-bootc-httpd-test

Are you PXE booting it or do you boot from removable media?

@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

@cgwalters is a symlink to ../run

image

@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

Correction, dbus.socket is not failing, it does not appear to be enabled.

image

Trying to start it ends with:

image

@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

I just noticed I was using -dev trying again with quay.io/centos-bootc/centos-bootc:stream9 instead but getting.

xorriso : FAILURE : Image size 1095584s exceeds free space on media 785896s

@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

So tried to build a clean (base) Fedora ELN, the same result when I PXE boot it.

@cgwalters cgwalters added area/anaconda-iso Issues relating to the unattended Anaconda ISO area/target-os This issue relates to a specific target OS labels Apr 25, 2024
@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

So uay.io/centos-bootc/centos-bootc:stream9 does boot up correctly, however hitting something different. Need to figure that one out:

image

@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

Ok increased VM size to 10GB RAM and it installed, after boot it fails with:

image

But I am getting there. Now I will try to build my own container of top of the correct base image.

@lzap
Copy link
Contributor Author

lzap commented Apr 25, 2024

Looks like I was missing this in my KS:

%post
bootc switch --mutate-in-place --transport registry quay.io/lzapletal/fedora-eln-bootc-httpd-test
%end

And it works now. So the root cause was I was using -dev version. I am closing, if you run into this just reopen. Thanks for help.

@lzap lzap closed this as completed Apr 25, 2024
@achilleas-k
Copy link
Member

Looks like I was missing this in my KS:

%post
bootc switch --mutate-in-place --transport registry quay.io/lzapletal/fedora-eln-bootc-httpd-test
%end

This should be added automatically by bootc-image-builder when building an ISO. How was it missing? Were you replacing the ks with your own?

@lzap
Copy link
Contributor Author

lzap commented Apr 29, 2024

Yeah I am doing PXE installation. Still I am running into an issue when booting the system - bootc is unable to find a commit or something. Not sure why it does not work with my KS: https://gist.github.com/lzap/3ade88a6f8d63ff98af4d0e7cd670059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/anaconda-iso Issues relating to the unattended Anaconda ISO area/target-os This issue relates to a specific target OS
Projects
None yet
Development

No branches or pull requests

4 participants