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

install: Re-implement hostns to work around supermin #203

Merged
merged 1 commit into from
Nov 11, 2023

Commits on Nov 11, 2023

  1. install: Re-implement hostns to work around supermin

    I'm experimenting with doing `bootc install` in a supermin VM
    like we do in coreos-assembler, but hit upon the fact that supermin's
    `/sbin/init` implementation incorrectly does `chroot()` instead of
    a `pivot_root`:
    
    https://github.com/libguestfs/supermin/blob/5230e2c3cd07e82bd6431e871e239f7056bf25ad/init/init.c#L288
    
    The problem here then is doing `nsenter` just takes us into the
    original rootfs, and all the real content is in `/root`.
    
    Re-implement this by re-executing our own binary and doing the `setns()`
    and `chroot()` dance internally, because we can't really do it
    with external binaries.
    
    Signed-off-by: Colin Walters <walters@verbum.org>
    cgwalters committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    395021a View commit details
    Browse the repository at this point in the history