Wednesday, June 07, 2017

Installing Tribblix on Vultr using iPXE

One of the new features introduced in Tribblix 0m20 is that booting and installing using iPXE now works.

Updated: Over time, I retire older versions of Tribblix. I've updated the text here, but not the images, to cover versions that are currently supported. Check the current list of available versions that can be installed using iPXE.

Here's an example of using this functionality to install a server running Tribblix in the Vultr cloud. A similar mechanism ought to work for any other provider that allows iPXE boot.

I'm assuming you have signed up and logged in, then go to deploy a server.

First choose where you want to deploy the server. I'm in the UK, so London is a good choice.


Then the critical bit, selecting the Server Type. The bit you want here is in a slightly confusing location, under the "Upload ISO" tab. But then select the "iPXE" radio button and put in the value http://pkgs.tribblix.org/m35/ipxe.txt


The other key option is Server Size. As with many providers, there's a simple scale. For testing, an instance with 1G of memory is more than adequate.


The deploy it. After a few seconds of installing you can then click the link to manage the server (or the 3 dots at the right), and then view the console, which uses VNC.

If you're reasonably quick you get to see the initial iPXE screen, and can see it downloading the images:


What you can see here is that it's downloaded the original ipxe script we specified. This looks like:

#!ipxe
dhcp
kernel /m35/platform/i86pc/kernel/amd64/unix
initrd /m35/platform/i86pc/boot_archive
boot
 
Which just says to set up the network using dhcp (this might have already been done, but if you're booting off an ipxe iso it may not have been, so we do it anyway), then download the kernel and the boot archive, then boot from what you've just downloaded.

The kernel and the boot archive are on the iso, I've just unpacked them on the server (so the URL given above for the ipxe script will be reasonably permanent for anybody to use). The only slight tweak I've had to make is that the original boot archive is actually gzip compressed and iPXE can't handle that, so it's been uncompressed. The boot archive also now contains the /usr file system as well, rather than it being split off as before. While I'm sure you could mangle the system to download it and sort things out, it's so much easier to put it inside the boot archive.

Then you get into the normal installer, so log in as jack, su to root, and see what disk(s) are available using the new diskinfo tool. Then you can install Tribblix to that disk:



Don't bother adding additional overlays at this point. It won't work - and you'll get an error about not being able to install overlays (you'll get the error anyway because the installer always tries to add some packages that aren't needed in the live environment). This will be fixed in a future update, but it's relatively harmless.

The other thing you should do before the installation is to change the passwords for root and jack. If you change them before running the installer then the change will propagate to the installed system (because all it's doing is a copy). You really don't want the system to boot up wide open to the internet with the default (and well known) passwords.

Once the (pretty quick) install finishes, it'll look like this:


That's just like a normal install, other than the missing overlays. Then just reboot and you'll soon see the new loader, followed by the system booting.

Due to the missing overlays, you'll get an error about the intrd service failing. You'll have to log in (ssh will work at this point) and then add at least the base overlay:

zap install-overlay base

Plus whatever other overlays you might want. Then you can clear the intrd service and you're good to go.

5 comments:

John said...

Hello, the ipxe script is missing.

Peter Tribble said...

The ipxe script is different for each version, so changes over time (and old versions will be removed). The currently supported ones are listed at:

http://www.tribblix.org/install.html#ipxe

Guido said...

I tried with the latest ipxe script, http://pkgs.tribblix.org/m25lx.1/ipxe.txt

I selct the default keyboard [47]. then su as root.

But running `diskinfo` returns,

"Unable to hold topo snapshot: empty topology"

COuld it be something changed over at Vultr?

Peter Tribble said...

I've seen diskinfo fail that way occasionally too. Sometimes if you run format (which usually works) it will clear whatever problem is affecting diskinfo - I expect something in the device tree hasn't been fully initialized.

Guido said...

Thank you, using `format` I was able to know where to install to. Installing Tribblix on Vultr was very straightforward. I like Tribblix more and more. Thank you for your work.