Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information