Tip: Install OS via netboot.xyz without ISO support

ehabehab Content Writer
edited March 16 in LES Talk

It can happen your vm provider has a broken iso mount or does not support it at all. You can install your OS using netboot.xyz the following way:

1- Have your vm already installed with one of the provided templates e.g: debian 9. ssh into your vm as root install the ipxe package:

# apt-get install ipxe
# update-grub

Get your ip, gateway from your vm info email, provider cp or on debian this way and store it as it will be needed later.

# cat /etc/network/interfaces
or
# ip r

# reboot

2- From your vnc or console, you should be able to see similar grub menu

after you press enter then quickly keep pressing CTRL+B ,or you can set to boot from CD only in you cp... then you should

enter your ip info you stored from the above step 1 like show in next image

if your vm supports ipv6 then it may try to configure it so you press enter like shown:

let it boot and should be good :)

I wrote this article when i got a HH vm and uploading iso is broken at time of this article.

References :
1- https://unix.stackexchange.com/questions/190865/is-it-possible-to-add-some-pxe-network-boot-option-to-grub
2- http://www.panticz.de/Install-GRUB-iPXE-netboot

Thanked by (1)Ympker

Comments

  • ehabehab Content Writer
    edited December 2020

    @AnthonySmith @vyas @Ympker @Not_Oles @Mason

    hopefully this will help all the HH iso lost souls.

  • ehabehab Content Writer

    wish i knew how to do this since 3 years ago.

  • vyasvyas OGContent Writer
    edited December 2020

    @ehab said:
    wish i knew how to do this since 3 years ago.

    Don't we all ?
    :-)
    Nice and short How To btw

    p.s

    Upgraded to Debain Bullseye while moving from Debian 9, lack of coffee is my excuse

    Thanked by (1)ehab

    VPS reviews | | MicroLXC | English is my nth language.

  • InceptionHostingInceptionHosting Hosting ProviderOG
    edited December 2020

    @ehab said:
    wish i knew how to do this since 3 years ago.

    I wish I knew how to do this 3 days ago...

    Thanked by (2)ehab Asim

    https://inceptionhosting.com
    Please do not use the PM system here for Inception Hosting support issues.

  • I like it! :) Congrats!

    Thanked by (1)ehab

    Tom. 穆坦然. Not Oles. Happy New York City guy visiting Mexico! How is your 文言文?
    The MetalVPS.com website runs very speedily on MicroLXC.net! Thanks to @Neoon!

  • InceptionHostingInceptionHosting Hosting ProviderOG

    Thanks for the guide @ehab

    https://inceptionhosting.com
    Please do not use the PM system here for Inception Hosting support issues.

  • Thanks for the guide. It is illustrative and done easy step by step

    Thanked by (1)ehab

    Dentistry is my passion

  • mikhomikho AdministratorHosting ProviderOG

    thanks alot!
    This finally made it possible for me to install my OS on an old Dedicated server.

    Follow up tip, if you have a IPMI or iLo that messes with you.
    I installed Centos, selected the text-based installation and was then asked if I wanted a VNC server started instead of running the text-based installation.

    Much faster and more stable then my "broken" IPMI.

    Thanked by (1)ehab
  • aRNoLDaRNoLD OG
    edited December 2020

    Imgur

    Unlucky, that's what I experience from Vultr.

    System halt...

  • ehabehab Content Writer

    @aRNoLD said:

    did you try another booting another os?

  • @ehab said:

    @aRNoLD said:

    did you try another booting another os?

    No, I copied from the thread. Debian OS is my fav and recently deployed. If Debian fails, users around the globe may encounter the same issue. Probably Vultr has sth. wrong.

  • Arch won't work out it seems

  • cybertechcybertech OGBenchmark King

    is there a Centos version of this?

    I bench YABS 24/7/365 unless it's a leap year.

  • ehabehab Content Writer

    @cybertech said:
    is there a Centos version of this?

    not sure, but you can add the kernel and update the grub yourself.

    Thanked by (1)cybertech
  • cybertechcybertech OGBenchmark King

    @ehab said:

    @cybertech said:
    is there a Centos version of this?

    not sure, but you can add the kernel and update the grub yourself.

    Thanks, used Debian 9 instead and followed this guide. Works pefect :D

    Thanked by (1)ehab

    I bench YABS 24/7/365 unless it's a leap year.

  • aRNoLDaRNoLD OG
    edited March 2021

    @cybertech said:
    is there a Centos version of this?

    guess the following two lines could do the job ( and the third to finalize the boot menu). you may have to adjust the GRUB_TIMEOUT value, making it larger so the screen may stop for a while rather than splash away when you get into the VNC.

    sudo wget https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn -O /boot/netboot.xyz.lkrn
    
    sudo sed -i '$a menuentry "Boot from http://netboot.xyz" {\n\ \ \ \ linux16 /boot/netboot.xyz.lkrn\n}' /etc/grub.d/40_custom
    
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg && sudo reboot
    
    Thanked by (1)ehab
  • it looks CloudCone's VPS/KVM doesn't support this booting method. have updated grub and menu but when rebooting there's no ipxe item on the screen. guess theirs are not compatible.

  • ehabehab Content Writer
    edited March 2021

    @aRNoLD said:

    install debian
    then

    # apt-get install ipxe
    # grub-reboot "Network boot (iPXE)"
    # reboot
    

    have vnc open and this should get into the ipxe boot, try it.

  • apt install ipxe produce the following output

    Unpacking ipxe (1.0.0+git-20190125.36a4c85-1) ...
    Setting up ipxe (1.0.0+git-20190125.36a4c85-1) ...
    Searching for GRUB installation directory ... found: /boot/grub
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
    Searching for splash image ... none found, skipping ...
    Found kernel: /boot/vmlinuz-4.19.0-14-amd64
    Found kernel: /boot/vmlinuz-4.19.0-5-amd64
    Updating /boot/grub/menu.lst ... done
    

    the second line, grub-reboot "Network boot (iPXE)" produced the following

    Searching for GRUB installation directory ... found: /boot/grub
    Probing devices to guess BIOS drives. This may take a long time.
    
        GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
    
           [ Minimal BASH-like line editing is supported.   For
             the   first   word,  TAB  lists  possible  command
             completions.  Anywhere else TAB lists the possible
             completions of a device/filename. ]
    grub> savedefault --once --default=Network boot (iPXE)
    
    Error 23: Error while parsing number
    grub> quit
    
    Do you want to reboot now? [y/N]
    

    then from the splash screen, it said "Falling back to Grub Legacy" and then gave only four options of original OS/Debian booting, but without ipxe options.

    guess CloudCone doesn't support ipxe booting?

  • ehabehab Content Writer

    @aRNoLD is it a kvm? just asking since you grabbed all the text! how did you do that :)

  • aRNoLDaRNoLD OG
    edited March 2021

    @ehab said:
    @aRNoLD is it a kvm? just asking since you grabbed all the text! how did you do that :)

    https://imgur.com/a/AQf6272

    Yes, the control panel shows its platform is KVM. That's one point that I feel weird.

    the text is copied from SSH terminal.

  • ehabehab Content Writer

    i have some credit with them, when i get time i will try to have me some fun.

  • I noticed that some Live CDs or even network boot won't really boot at all and just stucks at the initramfs fallback terminal or even kernel panic
    on static IP configuration, must be something, or probably they need DHCP to work

  • ehabehab Content Writer

    @valkyrie said:

    if the provider does not have DHCP you must manually add those in the boot menu command line "press e" or at the seed file. But if you get a kernel panic then either ram is not enough or you are an unlucky b* :) j/k

  • @ehab said:

    @valkyrie said:

    if the provider does not have DHCP you must manually add those in the boot menu command line "press e" or at the seed file. But if you get a kernel panic then either ram is not enough or you are an unlucky b* :) j/k

    Okay will def trying that later to see it works

  • @cybertech said:
    is there a Centos version of this?

    yum install ipxe-bootimgs
    

    or maybe, it depends

    yum install efibootmgr
    

    but I am not sure how to run them, the specific commands.

    from URL: https://rpmfind.net/linux/RPM/centos/7.9.2009/x86_64/Packages/ipxe-bootimgs-20180825-3.git133f4c.el7.noarch.html , and you'll see there are several files

    /usr/share/doc/ipxe-bootimgs-20180825
    /usr/share/doc/ipxe-bootimgs-20180825/COPYING
    /usr/share/doc/ipxe-bootimgs-20180825/COPYING.GPLv2
    /usr/share/doc/ipxe-bootimgs-20180825/USAGE
    /usr/share/ipxe
    /usr/share/ipxe/ipxe-snponly-x86_64.efi
    /usr/share/ipxe/ipxe.dsk
    /usr/share/ipxe/ipxe.efi
    /usr/share/ipxe/ipxe.iso
    /usr/share/ipxe/ipxe.lkrn
    /usr/share/ipxe/ipxe.usb
    /usr/share/ipxe/undionly.kpxe

Sign In or Register to comment.