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

booting live iso to ram #1558

Open
j-landru opened this issue Jul 6, 2022 · 1 comment
Open

booting live iso to ram #1558

j-landru opened this issue Jul 6, 2022 · 1 comment
Labels
kind/enhancement New feature or request

Comments

@j-landru
Copy link

j-landru commented Jul 6, 2022

Is your feature request related to a problem? Please describe.

As stated in #1271, I plan to use immutable elemental-toolkit derivative booting from a single live iso, with no install, for each cluster node. This card to document "to ram" live booting; also called toram on some distributions as well as docache under Gentoo:

Cons : ram space consumption on each node to store squashfs rootfs, so only usable for small sized iso file (about half GiB in my case for an alpine based elemental-toolkit derivative);

Pro :

  • I/O reads from rootfs at ram speed ;
  • in case of remote iso file shared through network link (SAN, iscsi, PXE/NFS/HTTPS, ...), that virtual CD drive network link is released after node boot as virtual CD is unmounted ; only COS_PERSISTENT labeled drive has to be maintained mounted ;
  • iso file update (pointing to the latest version) can be done asynchronously with no active node disruption. Nodes always restart from the latest/current iso version.

Describe alternatives you've considered

As elemental build-iso initramfs is dracut based set rd.live.ram to 1 in grub.cfg kernel entry

Here my personalized grub.cfg overlayed on iso file using overlay-iso flag of elemental-build-iso tool.

search --no-floppy --file --set=root /boot/kernel.xz
set default=0
set timeout=10
set timeout_style=menu
set linux=linux
set initrd=initrd
if [ "${grub_cpu}" = "x86_64" -o "${grub_cpu}" = "i386" -o "${grub_cpu}" = "arm64" ];then
    if [ "${grub_platform}" = "efi" ]; then
        if [ "${grub_cpu}" != "arm64" ]; then
            set linux=linuxefi
            set initrd=initrdefi
        fi
    fi
fi
if [ "${grub_platform}" = "efi" ]; then
    echo "Please press 't' to show the boot menu on this console"
fi
set font=($root)/boot/${grub_cpu}/loader/grub2/fonts/unicode.pf2
if [ -f ${font} ];then
    loadfont ${font}
fi
menuentry "abcd4cirrus-os" --class os --unrestricted {
    echo Loading kernel...
    $linux ($root)/boot/kernel.xz cdroot root=live:CDLABEL=COS_LIVE rd.live.dir=/ rd.live.squashimg=rootfs.squashfs rd.live.ram=1 console=tty1 console=ttyS0
    echo Loading initrd...
    $initrd ($root)/boot/rootfs.xz
}

if [ "${grub_platform}" = "efi" ]; then
    hiddenentry "Text mode" --hotkey "t" {
        set textmode=true
        terminal_output console
    }
fi
@j-landru j-landru added the kind/enhancement New feature or request label Jul 6, 2022
@frelon
Copy link
Contributor

frelon commented May 12, 2023

Hi @j-landru, sorry for the delay on this.

I put up this issue to track in the elemental-cli #1764 that should make this live-booting possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants