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

overlay.d/05core: support booting ISO completely from RAM #2544

Merged
merged 2 commits into from
Aug 14, 2023

Commits on Aug 14, 2023

  1. overlay.d/05core: drop RHEL8 workarounds for live-generator

    This should be dead code now.
    dustymabe committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    da0bd62 View commit details
    Browse the repository at this point in the history
  2. overlay.d/05core: support booting ISO completely from RAM

    It has been presented to us a use case where the user wants to actually
    "install" directly to the same device that was used to boot the live
    ISO image (i.e. the ISO was written to a block device and then booted
    from). The way the ISO boots today it mounts the ISO at /run/media/iso
    and then mounts the CoreOS rootfs from a file under that mountpoint. In
    this scenario /run/media/iso will be busy and can't be unmounted because
    the root filesystem of the live running system depends on it.
    
    We can adjust the strategy slightly to get a system that runs completely
    from memory (similar to live PXE systems) by just copying the file out
    of /run/media/iso and into memory before doing the rootfs mount, which
    will allow /run/media/iso to be unmounted before the installation
    commences.
    
    This patchset adds a new coreos.liveiso.fromram option to allow
    requesting this new behavior. We could consider making this new
    behavior the default, but we'd need to consider the new RAM requirements.
    For example, before this change on a 2G FCOS system the usage after
    booting looks like:
    
    ```
    [core@localhost ~]$ free -m
                   total        used        free      shared  buff/cache   available
    Mem:            1953         163        1286         125         503        1519
    Swap:              0           0           0
    ```
    
    With this change (and the coreos.liveiso.fromram kernel arguemnt
    specified) the usage looks like:
    
    ```
    [core@localhost ~]$ free -m
                   total        used        free      shared  buff/cache   available
    Mem:            1953         173         688         808        1091         824
    Swap:              0           0           0
    ```
    
    The usage would scale with the size of the rootfs. i.e. RHCOS is larger
    so the memory requirements would be larger too.
    dustymabe committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    1334b72 View commit details
    Browse the repository at this point in the history