Installing AlmaLinux 9.1 With Low RAM and More Useful Install Info

SystemSystem Administrator
edited January 2023 in Help
This discussion was created from comments split from: VirMach - Complain - Moan - Praise - Chit Chat.
Thanked by (1)lemoncube
«1

Comments

  • I am running into a small challenge. I want to install AlmaLinux 9.1 via ISO. So, I go to SolusVM, mount netboot.xyz and start the installer.

    Due to low RAM (1.2GB) only, the installer fails immediately.

    In a regular scenario, creating a ticket to mount ISO would be the way, but, here, it may take time...

    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    Thanks in advance

  • @localhost said:
    I am running into a small challenge. I want to install AlmaLinux 9.1 via ISO. So, I go to SolusVM, mount netboot.xyz and start the installer.

    Due to low RAM (1.2GB) only, the installer fails immediately.

    In a regular scenario, creating a ticket to mount ISO would be the way, but, here, it may take time...

    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    Thanks in advance

    Install CentOS and convert to Alma

    Thanked by (1)localhost
  • @fluttershy said:

    Install CentOS and convert to Alma

    Thanks, thats an option I have tried before and would like to put it back on the cards as the last resort.

  • @localhost said:
    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    My go-to for these systems is

    • Install locally using my own qemu instance , targeting a small (eg, 2GB disk )
    • Boot the VPS into rescue mode
    • Push the image directly unto /dev/vda (curl -o /dev/vda )
    • Reboot into the image
    • use 'growpart' and 'resize2fs' to snag the full disk size
  • @erk said: My go-to for these systems is

    this is now my go to for a preinstalled LUKS setup now, works so much better and I can have all of my default apps preinstalled, just change hostname, LUKS key, etc

    but I do it via ssh transfer.

    Thanked by (1)localhost
  • @localhost said:
    I am running into a small challenge. I want to install AlmaLinux 9.1 via ISO. So, I go to SolusVM, mount netboot.xyz and start the installer.

    Due to low RAM (1.2GB) only, the installer fails immediately.

    In a regular scenario, creating a ticket to mount ISO would be the way, but, here, it may take time...

    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    Thanks in advance

    Does Alma 8.7 sound bad for you?

    Alternatively, you can use Netboot or CentOS to Alma converter, they works as intended.

    Thanked by (1)localhost
  • Is kickstart a option for almalinux?
    Never used it for alma but for debian you can install with preseed file on boxes with lower than 512MiB ram since netboot.xyz utilizes initrd and linux image rather than full iso to boot on preseeded installations.

    Thanked by (1)localhost
  • @erk said:

    @localhost said:
    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    My go-to for these systems is

    • Install locally using my own qemu instance , targeting a small (eg, 2GB disk )

    Any pointers on how I can do this on windows? Or wsl?

    • Boot the VPS into rescue mode

    This is the new target vps. Correct?

    • Push the image directly unto /dev/vda (curl -o /dev/vda )

    Can you share the full command?

    • Reboot into the image

    What does this mean? Just rebooting the vps regularly?

    • use 'growpart' and 'resize2fs' to snag the full disk size

    Thanks, this is what I am looking for probably. > @dgc1980 said:

    @erk said: My go-to for these systems is

    this is now my go to for a preinstalled LUKS setup now, works so much better and I can have all of my default apps preinstalled, just change hostname, LUKS key, etc

    but I do it via ssh transfer.

    I want this exactly. Luks...
    Can you share your steps here or DM please?

  • @Fritz said:

    @localhost said:
    I am running into a small challenge. I want to install AlmaLinux 9.1 via ISO. So, I go to SolusVM, mount netboot.xyz and start the installer.

    Due to low RAM (1.2GB) only, the installer fails immediately.

    In a regular scenario, creating a ticket to mount ISO would be the way, but, here, it may take time...

    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    Thanks in advance

    Does Alma 8.7 sound bad for you?

    Alternatively, you can use Netboot or CentOS to Alma converter, they works as intended.

    I tried 8.7. But installer failed same way via netwoot.xyz

  • @lemoncube said:
    Is kickstart a option for almalinux?
    Never used it for alma but for debian you can install with preseed file on boxes with lower than 512MiB ram since netboot.xyz utilizes initrd and linux image rather than full iso to boot on preseeded installations.

    How do you do this in Debian? Maybe I can improvise off the same.
    I would be surprised if AlmaLinux doesn't support Kickstart

    Any pointers? Thnx

  • @localhost said:

    @erk said:

    @localhost said:
    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    My go-to for these systems is

    • Install locally using my own qemu instance , targeting a small (eg, 2GB disk )

    Any pointers on how I can do this on windows? Or wsl?

    I suggest WSL - You can run qemu (slow mode) without tweaks; and there are guides to enable "qemu-kvm" in WSL2 if you do this often enough.

    All commands are 'as root' - prepend 'sudo' or 'sudo bash' first

    • Make space for the disk image (I 'cheat' and do a netboot overlaid on the disk image, then wipe it during the install - you can also do the distinct disk image
    dd if=/dev/zero of=disk.img bs=1M count=2048  
     curl -O https://boot.netboot.xyz/ipxe/netboot.xyz.img
    dd if=netboot.xyz.img of=disk.img conv=notrunc
    

    That sets up the disk image, and you can tweak the 'count' if you need it larger

    apt-get install qemu-system
    qemu-system-x86_64 -cpu Opteron_G5 -m 4g -smp 1 -drive file=drive.img,format=raw -vnc 0.0.0.0:2 
    
    

    (If you enable KVM in WSL2, you'd change that to '-cpu host -enable-kvm) .. '-cpu EPYC' might be closer, but doesn't matter unless you are doing Linux-From-Scratch

    You connect in with your choice of 'vnc client' to port 5902 on localhost (WSL allows linux ports to be accessible to windows clients

    You will find it at the 'netboot prompt' and can install normally - Qemu sets up outgoing NAT internet by default ( but you can't ssh in yet)

    I'm not sure this will work under qemu on wsl to test the SSH:

    qemu-system-x86_64 -cpu Opteron_G5 -m 4g -smp 1 -drive file=drive.img,format=raw -vnc 0.0.0.0:2 -netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=n1
    

    this forwards '2222' (abitrary) to the guest's port 22 so you can ssh in

    Setting up Almalinux with Luks is left as an exercise - I do it on Debian (with the initramfs cryptunlock).

    Once you are done with this, save the image somewhere.

    • Boot the VPS into rescue mode

    This is the new target vps. Correct?

    Yes.

    • Push the image directly unto /dev/vda (curl -o /dev/vda )

    Can you share the full command?

    I put the image up on a web server with an obscure name . Yes, it's mildly insecure (although with LUKS, it's encrypted... )

    In rescue mode on the target vps:

    apt-get update; apt-get install curl
    curl -o /dev/vda https://<my obscure url>
    

    (You may need to add '-k' depending on whether letsencrypt certs are recognized by the rescue mode install )

    The ssh version is probably easier to do this once:

    in WSL:
    ```
    dd if=disk.img bs=1M | ssh root@RESCUEIP dd of=/dev/vda status=progress
    ````

    • Reboot into the image

    What does this mean? Just rebooting the vps regularly?

    THis means exitting rescue-mode on the solusvm side - at which point when the VPS reboots, it boots from the drive image
    If anything was messed up in the above steps, you'll see it on the novnc window

  • edited January 2023

    @localhost said: How do you do this in Debian?

    I just checked with almalinux, and the option is there, too.

    just upload your kickstart file to an easy-to-type url and submit it to this option in netboot.xyz after selecting your desired version, and hopefully, it will take care of everything else.

    Thanked by (1)localhost
  • @erk said:

    @localhost said:

    @erk said:

    @localhost said:
    AlmaLinux 9.1 once installed, works wonders even with 1GB RAM. Question is, can I mount the ISO somehow via rescue and start the install?

    It would be nice if there is an alternative to get me up and running with AlmaLinux 9.1?

    My go-to for these systems is

    • Install locally using my own qemu instance , targeting a small (eg, 2GB disk )

    Any pointers on how I can do this on windows? Or wsl?

    I suggest WSL - You can run qemu (slow mode) without tweaks; and there are guides to enable "qemu-kvm" in WSL2 if you do this often enough.

    All commands are 'as root' - prepend 'sudo' or 'sudo bash' first

    • Make space for the disk image (I 'cheat' and do a netboot overlaid on the disk image, then wipe it during the install - you can also do the distinct disk image
    dd if=/dev/zero of=disk.img bs=1M count=2048  
     curl -O https://boot.netboot.xyz/ipxe/netboot.xyz.img
    dd if=netboot.xyz.img of=disk.img conv=notrunc
    

    That sets up the disk image, and you can tweak the 'count' if you need it larger

    apt-get install qemu-system
    qemu-system-x86_64 -cpu Opteron_G5 -m 4g -smp 1 -drive file=drive.img,format=raw -vnc 0.0.0.0:2 
    
    

    (If you enable KVM in WSL2, you'd change that to '-cpu host -enable-kvm) .. '-cpu EPYC' might be closer, but doesn't matter unless you are doing Linux-From-Scratch

    You connect in with your choice of 'vnc client' to port 5902 on localhost (WSL allows linux ports to be accessible to windows clients

    You will find it at the 'netboot prompt' and can install normally - Qemu sets up outgoing NAT internet by default ( but you can't ssh in yet)

    I'm not sure this will work under qemu on wsl to test the SSH:

    qemu-system-x86_64 -cpu Opteron_G5 -m 4g -smp 1 -drive file=drive.img,format=raw -vnc 0.0.0.0:2 -netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=n1
    

    this forwards '2222' (abitrary) to the guest's port 22 so you can ssh in

    Setting up Almalinux with Luks is left as an exercise - I do it on Debian (with the initramfs cryptunlock).

    Once you are done with this, save the image somewhere.

    • Boot the VPS into rescue mode

    This is the new target vps. Correct?

    Yes.

    • Push the image directly unto /dev/vda (curl -o /dev/vda )

    Can you share the full command?

    I put the image up on a web server with an obscure name . Yes, it's mildly insecure (although with LUKS, it's encrypted... )

    In rescue mode on the target vps:

    apt-get update; apt-get install curl
    curl -o /dev/vda https://<my obscure url>
    

    (You may need to add '-k' depending on whether letsencrypt certs are recognized by the rescue mode install )

    The ssh version is probably easier to do this once:

    in WSL:
    ```
    dd if=disk.img bs=1M | ssh root@RESCUEIP dd of=/dev/vda status=progress
    ````

    • Reboot into the image

    What does this mean? Just rebooting the vps regularly?

    THis means exitting rescue-mode on the solusvm side - at which point when the VPS reboots, it boots from the drive image
    If anything was messed up in the above steps, you'll see it on the novnc window

    This is terrific. Appreciate your detailed notes here. I will definitely give it a go later. I may pick your brain again in sometime.

  • @lemoncube said:

    @localhost said: How do you do this in Debian?

    I just checked with almalinux, and the option is there, too.

    just upload your kickstart file to an easy-to-type url and submit it to this option in netboot.xyz after selecting your desired version, and hopefully, it will take care of everything else.

    Well I haven't worked with Kickstart. Will need to read off that first and get a little familiar

    Thank you

  • @localhost said: Well I haven't worked with Kickstart.

    I remember the RHEL would generate a kickstart file after a standard manual installation. You can get one on another vps or local qemu instance. Red Hat has a tool to generate it online but requires registering.
    Docs for Centos 8

  • @lemoncube said:

    @localhost said: How do you do this in Debian?

    I just checked with almalinux, and the option is there, too.

    just upload your kickstart file to an easy-to-type url and submit it to this option in netboot.xyz after selecting your desired version, and hopefully, it will take care of everything else.

    So, i got a kickstart config created (from fresh install) and put it on a temp web server and set the URL in netboot.xyz kickstart file location.

    After that, what do I need to do? I selected the Graphical Install, and it failed.

    What am I missing? Thanks

  • Ok, some new updates.

    I remembered my post from a long time ago to install Windows on Kimsufi, and I do recollect using Windows Server iso for a fresh install via qemu...

    I am currently in Rescue
    AlmaLinux ISO is available at /tmp/AlmaLinux-9.1-x86_64-minimal.iso

    /tmp/qemu-system-x86_64 -net nic -net user,hostfwd=tcp::2222-:22 -localtime -enable-kvm -cpu core2duo,+nx -smp 1 -usbdevice tablet -k en-us -cdrom /tmp/AlmaLinux-9.1-x86_64-minimal.iso -boot d -hda /dev/vda -vnc :1

    When I run the above, it is not able to find the cdrom disc... where I have validated the same available in the said location

    Any help? Thanks

  • @localhost said:
    Ok, some new updates.

    I remembered my post from a long time ago to install Windows on Kimsufi, and I do recollect using Windows Server iso for a fresh install via qemu...

    I am currently in Rescue
    AlmaLinux ISO is available at /tmp/AlmaLinux-9.1-x86_64-minimal.iso

    /tmp/qemu-system-x86_64 -net nic -net user,hostfwd=tcp::2222-:22 -localtime -enable-kvm -cpu core2duo,+nx -smp 1 -usbdevice tablet -k en-us -cdrom /tmp/AlmaLinux-9.1-x86_64-minimal.iso -boot d -hda /dev/vda -vnc :1

    When I run the above, it is not able to find the cdrom disc... where I have validated the same available in the said location

    Any help? Thanks

    Which 'stage' are you getting the error?
    Is it the initial Linux command-line where it says "cannot find file /tmp/ ... "?
    Or is it aftre you connect with 'vnc', and you get the error that the SEABIOS cannot boot from cdrom?

    If it's the seabios, there's some wierdness in some qemu installs with the emulated bios .
    If the ISO is "hybrid" (eg, you can write it to a USB stick and boot), you could just do -hda path-to-iso -hdb path-to-image

    If you are trying to run qemu-kvm on the target system ( /dev/vda as target ) - check whether the ISO properly transfered
    "Rescue mode' basically is attaching an ISO and booting it into a ramdisk overlay - so you are in the same position as netboot where you are splitting limited memory between the AlmaLinux ISO and the operating system

  • @erk said:

    @localhost said:
    Ok, some new updates.

    I remembered my post from a long time ago to install Windows on Kimsufi, and I do recollect using Windows Server iso for a fresh install via qemu...

    I am currently in Rescue
    AlmaLinux ISO is available at /tmp/AlmaLinux-9.1-x86_64-minimal.iso

    /tmp/qemu-system-x86_64 -net nic -net user,hostfwd=tcp::2222-:22 -localtime -enable-kvm -cpu core2duo,+nx -smp 1 -usbdevice tablet -k en-us -cdrom /tmp/AlmaLinux-9.1-x86_64-minimal.iso -boot d -hda /dev/vda -vnc :1

    When I run the above, it is not able to find the cdrom disc... where I have validated the same available in the said location

    Any help? Thanks

    Which 'stage' are you getting the error?
    Is it the initial Linux command-line where it says "cannot find file /tmp/ ... "?
    Or is it aftre you connect with 'vnc', and you get the error that the SEABIOS cannot boot from cdrom?

    Here, when the qemu is running and trying to boot

    If it's the seabios, there's some wierdness in some qemu installs with the emulated bios .
    If the ISO is "hybrid" (eg, you can write it to a USB stick and boot), you could just do -hda path-to-iso -hdb path-to-image

    If you are trying to run qemu-kvm on the target system ( /dev/vda as target ) - check whether the ISO properly transfered
    "Rescue mode' basically is attaching an ISO and booting it into a ramdisk overlay - so you are in the same position as netboot where you are splitting limited memory between the AlmaLinux ISO and the operating system

    I think i found the issue, the ISO was not completely downloaded, as the target system under rescue has just 1GB of disk available... I missed the abrupt download stop of the ISO.

    Guess, I am back to square 1.

  • erkerk
    edited January 2023

    @localhost said:
    I think i found the issue, the ISO was not completely downloaded, as the target system under rescue has just 1GB of disk available... I missed the abrupt download stop of the ISO.

    Guess, I am back to square 1.

    Not necessarily.

    Try partitioning the disk, so that you have 1 big partition (which will get deleted while you install), and a smaller ~4GB partition at the end where you'll download the ISO to.

    So you'll have VDA1 which will be 20GB or so (guessing from flash sale)
    and VDA is 4GB whihc should be enough for the ISO
    use 'curl -o /dev/vda2 https://ALMAISOURL'
    and just change your command-line to point the cdrom to /dev/vda2
    (I think qemu will let you get away with vda as the hda and vd2 as the cdrom at the same time ... if not, this gets a little bit more complicated)

  • @erk said:

    @localhost said:
    I think i found the issue, the ISO was not completely downloaded, as the target system under rescue has just 1GB of disk available... I missed the abrupt download stop of the ISO.

    Guess, I am back to square 1.

    Not necessarily.

    Try partitioning the disk, so that you have 1 big partition (which will get deleted while you install), and a smaller ~4GB partition at the end where you'll download the ISO to.

    So you'll have VDA1 which will be 20GB or so (guessing from flash sale)
    and VDA is 4GB whihc should be enough for the ISO
    use 'curl -o /dev/vda2 https://ALMAISOURL'
    and just change your command-line to point the cdrom to /dev/vda2
    (I think qemu will let you get away with vda as the hda and vd2 as the cdrom at the same time ... if not, this gets a little bit more complicated)

    I liked this approach. I created 2 partitions on /dev/vda1 = 25Gb, /dev/vda2 = 10GB

    I mounted /dev/vda2 on /mnt/iso and was able to start the qemu and check the same via vnc...

    Now, I see the AlmaLinux 9.1 install screen. I select the first option to install. Next, there is nothing but a blank window... its been like that for a long time. Is there a way to add some debug options for qemu?

    command I run:
    /tmp/qemu-system-x86_64 -net nic -net user,hostfwd=tcp::2222-:22 -localtime -enable-kvm -cpu core2duo,+nx -smp 1 -usbdevice tablet -k en-us -cdrom /mnt/iso/AlmaLinux-9.1-x86_64-minimal.iso -boot d -hda /dev/vda1 -vnc :1

    Or its going crazy because /mnt/iso = /dev/vda2 and -hda /dev/vda1 is pointing to the same disk...

    Thanks

  • @localhost said: Or its going crazy because /mnt/iso = /dev/vda2 and -hda /dev/vda1 is pointing to the same disk...

    since you are doing it on the same system as you are installing on
    I would suggest installing like wireguard or something, to mount a nfs drive to mount the iso. or maybe you can try using rclone mount to mount the http of the alma iso, I will give this a try shortly and let you know.

  • @dgc1980 said:

    @localhost said: Or its going crazy because /mnt/iso = /dev/vda2 and -hda /dev/vda1 is pointing to the same disk...

    since you are doing it on the same system as you are installing on
    I would suggest installing like wireguard or something, to mount a nfs drive to mount the iso. or maybe you can try using rclone mount to mount the http of the alma iso, I will give this a try shortly and let you know.

    Thanks so much, ill wait for your finding

  • edited January 2023

    using rescue image

    apt update && apt install curl screen wget -y
    
    curl -Ok https://downloads.rclone.org/rclone-current-linux-amd64.zip
    unzip rclone-current-linux-amd64.zip
    cd rclone-*-linux-amd64
    
    screen
    
    ./rclone config
        n
        alma
        http
        http://mirror.mia.velocihost.net
        y
        q
    
    
    mkdir /tmp/alma
    ./rclone mount -v alma:/almalinux/9.1/isos/x86_64/ /tmp/alma
    
    ** detach   ctrl+a d
    
    wget -qO- /tmp https://cdn.rodney.io/content/blog/files/vkvm.tar.gz | tar xvz -C /tmp
    
    /tmp/qemu-system-x86_64 -net nic -net user,hostfwd=tcp::2222-:22 -localtime -enable-kvm -cpu core2duo,+nx -smp 1 -usbdevice tablet -k en-us -cdrom /tmp/alma/AlmaLinux-9.1-x86_64-minimal.iso -boot d -hda /dev/vda -vnc :1
    

    enjoy

    Thanked by (1)localhost
  • seems it is not going past that for me, sshfs mount now, will post again

    Thanked by (1)localhost
  • @dgc1980 said:
    seems it is not going past that for me, sshfs mount now, will post again

    I got this same screen and didn't move past!

    Thanks for the effort and will wait for your next update 😊

  • looks like it is not booting past that, I would suggest using qemu locally, install it to a raw image, then ssh the raw image to the server and resize it.

  • @dgc1980 said:
    looks like it is not booting past that, I would suggest using qemu locally, install it to a raw image, then ssh the raw image to the server and resize it.

    So, please if you don't mind, walking me through this once?

    I have access a few idling vps where fresh AlmaLinux 9.1 is installed (via iso).... 1gb ram and 10gb disk.

    Is there any way I could dump these on the virmach rescue?

    Thanks in advance

    Ps sorry I thought it was an easy task, but I am getting info overload on so many things and I am feeling a little lost. So your guidance and patience will be highly appreciated.

    Thanks again.

  • edited January 2023

    @dgc1980 said:
    looks like it is not booting past that, I would suggest using qemu locally, install it to a raw image, then ssh the raw image to the server and resize it.

    dd if=/dev/sda | gzip | ssh root@target 'gzip -d | dd of=/dev/sda'

    if is my source, of is new target?

    Is this something which would work?

  • if you just want to clone a vps from one to another,

    boot both systems into rescue

    on the one already installed

    dd if=/dev/vda bs=4M | ssh root@SECOND dd of=/dev/vda status=progress

    then reboot the destination, login via ssh, I would also suggest resetting the ssh fingerprints

    Thanked by (3)ehab FrankZ lemoncube
Sign In or Register to comment.